Compare commits
104 Commits
DeveloperT
...
f11a9536f0
Author | SHA1 | Date | |
---|---|---|---|
f11a9536f0 | |||
c7bdcf0104 | |||
df026499d5 | |||
a3aa4157b8 | |||
8f3268e1bc | |||
5721d440e9 | |||
505c396283 | |||
643e6bc94f | |||
76502e6d97 | |||
851a0b3810 | |||
fd8dbb4c8b | |||
4ffd994c5e | |||
a34828113a | |||
461329468c | |||
35de5df04d | |||
4f0548fd60 | |||
5c1d96cc51 | |||
57049c0c52 | |||
31326e1c91 | |||
3c60994a0a | |||
773cc42346 | |||
f46a1f39dc | |||
b7175bf77f | |||
ec22232aa8 | |||
f303cd2236 | |||
f40cef4416 | |||
fbca97d38d | |||
28bd2cba5c | |||
4b35f73bbf | |||
f4706eb126 | |||
21bcb90558 | |||
ae48ac0cae | |||
cb4979d5bc | |||
7d3ae74e1f | |||
9d680aa500 | |||
0d50b1c2fe | |||
75e034863f | |||
3b42de1571 | |||
668472286e | |||
e00d34c99d | |||
9fb496dfb3 | |||
f4eaa4a3ef | |||
5d50ed6bdf | |||
d7ace4eaf9 | |||
16a4d335ea | |||
ba69bb0772 | |||
455940caa2 | |||
439344757e | |||
ad912691c9 | |||
237144aff6 | |||
810332d558 | |||
f8431d0ba1 | |||
57c3bfa16a | |||
61f1077608 | |||
8877e968b9 | |||
4575c90bee | |||
21279a87ae | |||
3d5ad4a17e | |||
9bb7b044a8 | |||
dc8f2f7561 | |||
829dbf84da | |||
7b156c17f8 | |||
cbf7cbc164 | |||
b04faa816e | |||
517ebe2902 | |||
03d0d314e3 | |||
3e804c5cce | |||
ee2b8b538e | |||
fdfd34fe92 | |||
2d6fb6523b | |||
3084bf3982 | |||
5ba51e8392 | |||
fb5eb43e34 | |||
b154056276 | |||
c67b8f9ca1 | |||
95e4181360 | |||
32dffbe56b | |||
6b3c8d373b | |||
db29107f47 | |||
355537f2ab | |||
0729ef0c21 | |||
6fe82bfd0f | |||
39bf072363 | |||
da7c384fd8 | |||
95130fd9a0 | |||
978e2344a3 | |||
c9bf45602c | |||
aa160b2036 | |||
f82b32d351 | |||
e519dc9a57 | |||
f020c37db9 | |||
5a4ec3b6b1 | |||
2602d6c9d2 | |||
ff403583d7 | |||
c5577cc2bd | |||
78be6e5dc1 | |||
b954a41375 | |||
0100a11cfe | |||
04cf2e8534 | |||
be00724818 | |||
274d93c61a | |||
7dc4c30436 | |||
028ef4bc31 | |||
42124d65c7 |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
49
PROMS/Formats/frmFormatCopy.Designer.cs
generated
49
PROMS/Formats/frmFormatCopy.Designer.cs
generated
@@ -33,8 +33,6 @@ namespace Formats
|
||||
this.btnCopyFormats = new DevComponents.DotNetBar.ButtonX();
|
||||
this.btnBrowse = new DevComponents.DotNetBar.ButtonX();
|
||||
this.buttonX2 = new DevComponents.DotNetBar.ButtonX();
|
||||
this.labelX2 = new DevComponents.DotNetBar.LabelX();
|
||||
this.LstBxExcludeFiles = new DevComponents.DotNetBar.ListBoxAdv();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// txbxPROMSFormatsPath
|
||||
@@ -66,7 +64,7 @@ namespace Formats
|
||||
//
|
||||
this.btnCopyFormats.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnCopyFormats.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnCopyFormats.Location = new System.Drawing.Point(232, 156);
|
||||
this.btnCopyFormats.Location = new System.Drawing.Point(152, 68);
|
||||
this.btnCopyFormats.Name = "btnCopyFormats";
|
||||
this.btnCopyFormats.Size = new System.Drawing.Size(84, 27);
|
||||
this.btnCopyFormats.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
@@ -90,7 +88,7 @@ namespace Formats
|
||||
//
|
||||
this.buttonX2.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.buttonX2.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.buttonX2.Location = new System.Drawing.Point(409, 156);
|
||||
this.buttonX2.Location = new System.Drawing.Point(329, 68);
|
||||
this.buttonX2.Name = "buttonX2";
|
||||
this.buttonX2.Size = new System.Drawing.Size(75, 23);
|
||||
this.buttonX2.Style = DevComponents.DotNetBar.eDotNetBarStyle.StyleManagerControlled;
|
||||
@@ -98,52 +96,17 @@ namespace Formats
|
||||
this.buttonX2.Text = "Exit";
|
||||
this.buttonX2.Click += new System.EventHandler(this.buttonX2_Click);
|
||||
//
|
||||
// labelX2
|
||||
//
|
||||
//
|
||||
//
|
||||
//
|
||||
this.labelX2.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.labelX2.Location = new System.Drawing.Point(12, 41);
|
||||
this.labelX2.Name = "labelX2";
|
||||
this.labelX2.Size = new System.Drawing.Size(200, 23);
|
||||
this.labelX2.TabIndex = 5;
|
||||
this.labelX2.Text = "Excluding Format Files that Start with:";
|
||||
//
|
||||
// LstBxExcludeFiles
|
||||
//
|
||||
this.LstBxExcludeFiles.AutoScroll = true;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.LstBxExcludeFiles.BackgroundStyle.Class = "ListBoxAdv";
|
||||
this.LstBxExcludeFiles.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.LstBxExcludeFiles.CausesValidation = false;
|
||||
this.LstBxExcludeFiles.CheckStateMember = null;
|
||||
this.LstBxExcludeFiles.ContainerControlProcessDialogKey = true;
|
||||
this.LstBxExcludeFiles.DragDropSupport = true;
|
||||
this.LstBxExcludeFiles.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.LstBxExcludeFiles.LicenseKey = "F962CEC7-CD8F-4911-A9E9-CAB39962FC1F";
|
||||
this.LstBxExcludeFiles.Location = new System.Drawing.Point(57, 70);
|
||||
this.LstBxExcludeFiles.Name = "LstBxExcludeFiles";
|
||||
this.LstBxExcludeFiles.ShowToolTips = false;
|
||||
this.LstBxExcludeFiles.Size = new System.Drawing.Size(134, 76);
|
||||
this.LstBxExcludeFiles.TabIndex = 6;
|
||||
this.LstBxExcludeFiles.Text = "listBoxAdv1";
|
||||
//
|
||||
// frmFormatCopy
|
||||
// Form1
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(496, 191);
|
||||
this.Controls.Add(this.LstBxExcludeFiles);
|
||||
this.Controls.Add(this.labelX2);
|
||||
this.ClientSize = new System.Drawing.Size(496, 107);
|
||||
this.Controls.Add(this.buttonX2);
|
||||
this.Controls.Add(this.btnBrowse);
|
||||
this.Controls.Add(this.btnCopyFormats);
|
||||
this.Controls.Add(this.labelX1);
|
||||
this.Controls.Add(this.txbxPROMSFormatsPath);
|
||||
this.Name = "frmFormatCopy";
|
||||
this.Name = "Form1";
|
||||
this.Text = "Form1";
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -156,8 +119,6 @@ namespace Formats
|
||||
private DevComponents.DotNetBar.ButtonX btnCopyFormats;
|
||||
private DevComponents.DotNetBar.ButtonX btnBrowse;
|
||||
private DevComponents.DotNetBar.ButtonX buttonX2;
|
||||
private DevComponents.DotNetBar.LabelX labelX2;
|
||||
private DevComponents.DotNetBar.ListBoxAdv LstBxExcludeFiles;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -14,11 +14,7 @@ namespace Formats
|
||||
public frmFormatCopy()
|
||||
{
|
||||
InitializeComponent();
|
||||
foreach (string excludeThis in excludeThese)
|
||||
{
|
||||
LstBxExcludeFiles.Items.Add(excludeThis);
|
||||
}
|
||||
SetDefaults();
|
||||
SetDefaults();
|
||||
}
|
||||
|
||||
private void SetDefaults()
|
||||
@@ -96,11 +92,10 @@ namespace Formats
|
||||
if (!txbxPROMSFormatsPath.Text.EndsWith(@"\")) txbxPROMSFormatsPath.Text += @"\";
|
||||
}
|
||||
|
||||
public string[] excludeThese = { "WPS", "WPB", "VCBEPP" };
|
||||
|
||||
private bool ExcludeFromCopy(string fn)
|
||||
{
|
||||
// don't copy formats whos file name starts with..
|
||||
string[] excludeThese = { "WPS", "WEP", "WPB", "VCBEPP" };
|
||||
foreach (string excludeThis in excludeThese)
|
||||
if (fn.ToUpper().StartsWith(excludeThis)) return true;
|
||||
return false;
|
||||
|
@@ -112,9 +112,9 @@
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@@ -264,11 +264,9 @@ namespace ROEditor
|
||||
File.Delete(FstNew); // remove ROFST.NEW
|
||||
if (OrphanedRecords.Length > 0)
|
||||
{
|
||||
using (StreamWriter sw = new StreamWriter(Path.Combine(FstDir, @"Orphaned RO Records.txt"), false))
|
||||
{
|
||||
sw.Write(OrphanedRecords.ToString());
|
||||
sw.Close();
|
||||
}
|
||||
StreamWriter sw = new StreamWriter(VlnSettings.TemporaryFolder + @"\Orphaned RO Records.txt");
|
||||
sw.Write(OrphanedRecords.ToString());
|
||||
sw.Close();
|
||||
MessageBox.Show("The file Orphaned RO Records.txt has been created", "Warning - Orphan RO Record");
|
||||
}
|
||||
|
||||
|
@@ -19,7 +19,6 @@ using System.Drawing;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Linq;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
@@ -144,8 +143,6 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
#endregion
|
||||
#region SortingChildren
|
||||
private static bool IsInManualOrderNullFix = false;
|
||||
|
||||
[NonSerialized]
|
||||
public Csla.SortedBindingList<FolderInfo> _SortedChildFolders;
|
||||
public Csla.SortedBindingList<FolderInfo> SortedChildFolders
|
||||
@@ -154,29 +151,6 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
if (ChildFolders != null)
|
||||
{
|
||||
//B2025-018 Issues with folder order in tree view
|
||||
// if any ChildFolders with a missing Manual Order
|
||||
// set them to the end of the list
|
||||
// use IsInManualOrderNullFix - so, if setting ChildFolders Currently,
|
||||
// do not try to set them (thus creating an infinite loop)
|
||||
if (!IsInManualOrderNullFix && ChildFolders.Any(x => x.ManualOrder == null))
|
||||
{
|
||||
IsInManualOrderNullFix = true;
|
||||
foreach (FolderInfo fi in ChildFolders.Where(x => x.ManualOrder == null))
|
||||
{
|
||||
using (FolderInfo parfolderinfo = FolderInfo.Get(fi.ParentID))
|
||||
{
|
||||
using (Folder fldr = fi.Get())
|
||||
{
|
||||
fldr.ManualOrder = parfolderinfo.NewManualOrder(9999);
|
||||
fldr.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
RefreshChildFolders();
|
||||
IsInManualOrderNullFix = false;
|
||||
}
|
||||
|
||||
if (_SortedChildFolders == null)
|
||||
{
|
||||
_SortedChildFolders = new SortedBindingList<FolderInfo>(ChildFolders);
|
||||
@@ -192,10 +166,6 @@ namespace VEPROMS.CSLA.Library
|
||||
return _SortedChildFolders;
|
||||
}
|
||||
}
|
||||
|
||||
//B2025-018 Issues with folder order in tree view
|
||||
//Note: this should be called from the parent item
|
||||
//As you want to put this into the sorted order of the parent item
|
||||
public double? NewManualOrder(int index)
|
||||
{
|
||||
double? retval = 1;
|
||||
@@ -204,27 +174,13 @@ namespace VEPROMS.CSLA.Library
|
||||
else if (index == 0)
|
||||
{
|
||||
if (retval >= SortedChildFolders[index].ManualOrder) // If one is too big, then divide first value in half
|
||||
retval = SortedChildFolders[index].ManualOrder / 2.0;
|
||||
retval = SortedChildFolders[index].ManualOrder / 2;
|
||||
}
|
||||
else if (SortedChildFolders.Count > index)
|
||||
{
|
||||
//B2025-018 Issues with folder order in tree view
|
||||
//filter to just items with the same parent
|
||||
//want new order to be halfway between the previous item
|
||||
//and the next ManualOrder
|
||||
var tmp = SortedChildFolders.Where(x => x.ParentID == FolderID);
|
||||
var lbound = SortedChildFolders[index - 1].ManualOrder;
|
||||
var ubound = tmp.OrderBy(y => y.ManualOrder).FirstOrDefault(x => x.ManualOrder > lbound)?.ManualOrder;
|
||||
if (ubound != null)
|
||||
{
|
||||
retval = ((ubound - lbound) / 2.0) + lbound;
|
||||
}
|
||||
else
|
||||
{
|
||||
//in this case, item before is highest for that parent
|
||||
//so just make this 1 more
|
||||
retval = lbound + 1;
|
||||
}
|
||||
retval += SortedChildFolders[index - 1].ManualOrder; // Just go to the next whole number
|
||||
if (retval >= SortedChildFolders[index].ManualOrder)
|
||||
retval = (SortedChildFolders[index - 1].ManualOrder + SortedChildFolders[index].ManualOrder) / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@@ -805,21 +805,7 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
// B2025-020 Null Reference fix. Added check for valid index into the TransitionTypeList
|
||||
if (!forceConvertToText)
|
||||
{
|
||||
if (traninfo.TranType >= itemInfo.ActiveFormat.PlantFormat.FormatData.TransData.TransTypeList.Count)
|
||||
{
|
||||
forceConvertToText = true;
|
||||
TranFixCount++;
|
||||
itemInfo.MyContent.FixTransitionText(traninfo, itemInfo, "Reason for Change: Transition type is not available");
|
||||
using (Content content = Content.Get(itemInfo.MyContent.ContentID))
|
||||
{
|
||||
content.FixTransitionText(traninfo, true);
|
||||
content.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!forceConvertToText)
|
||||
{
|
||||
if (itemInfo.MyProcedure.ItemID != traninfo.MyItemToID.MyProcedure.ItemID) //different proc
|
||||
|
@@ -769,15 +769,6 @@ namespace VEPROMS.CSLA.Library
|
||||
tmp.MyParent = myParent;
|
||||
tmp.Name = name;
|
||||
tmp.ShortName = shortName;
|
||||
|
||||
//B2025-018 Issues with folder order in tree view
|
||||
//if no manual order is set, add it at the end
|
||||
if (myParent != null)
|
||||
{
|
||||
using (FolderInfo parfolderinfo = FolderInfo.Get(myParent.FolderID))
|
||||
tmp.ManualOrder = parfolderinfo.NewManualOrder(9999);
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
public static Folder New(Folder myParent, Connection myConnection, string name, string title, string shortName, Format myFormat, double? manualOrder, string config, DateTime dts, string usrID)
|
||||
@@ -793,15 +784,6 @@ namespace VEPROMS.CSLA.Library
|
||||
tmp.Config = config;
|
||||
tmp.DTS = dts;
|
||||
tmp.UsrID = usrID;
|
||||
|
||||
//B2025-018 Issues with folder order in tree view
|
||||
//if no manual order is set, add it at the end
|
||||
if (myParent != null && manualOrder == null)
|
||||
{
|
||||
using (FolderInfo parfolderinfo = FolderInfo.Get(myParent.FolderID))
|
||||
tmp.ManualOrder = parfolderinfo.NewManualOrder(9999);
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
public static Folder MakeFolder(Folder myParent, Connection myConnection, string name, string title, string shortName, Format myFormat, double? manualOrder, string config, DateTime dts, string usrID)
|
||||
@@ -831,15 +813,6 @@ namespace VEPROMS.CSLA.Library
|
||||
tmp.MyFormat = myFormat;
|
||||
tmp.ManualOrder = manualOrder;
|
||||
tmp.Config = config;
|
||||
|
||||
//B2025-018 Issues with folder order in tree view
|
||||
//if no manual order is set, add it at the end
|
||||
if (myParent != null && manualOrder == null)
|
||||
{
|
||||
using (FolderInfo parfolderinfo = FolderInfo.Get(myParent.FolderID))
|
||||
tmp.ManualOrder = parfolderinfo.NewManualOrder(9999);
|
||||
}
|
||||
|
||||
return tmp;
|
||||
}
|
||||
public static Folder MakeFolder(Folder myParent, Connection myConnection, string name, string title, string shortName, Format myFormat, double? manualOrder, string config)
|
||||
|
@@ -2812,27 +2812,23 @@ namespace Volian.Controls.Library
|
||||
int f2 = -1;
|
||||
string uniquename = _LastFolderInfo.MyParent.UniqueChildName("New Folder");
|
||||
int myindex = SelectedNode.Index + ((newtype == MenuSelections.FolderAfter) ? 1 : 0);
|
||||
//B2025-018 Issues with folder order in tree view
|
||||
//since before/after folder is at same level as current folder
|
||||
//so need to use the parents order to determine where to place it
|
||||
using (FolderInfo parfolderinfo = FolderInfo.Get(parentfolder.MyParent.FolderID))
|
||||
{ double? myorder = parfolderinfo.NewManualOrder(myindex);
|
||||
using (Folder folder = Folder.MakeFolder(parentfolder.MyParent, parentfolder.MyConnection, uniquename, string.Empty, "Short Name", null, myorder, string.Empty, DateTime.Now, VlnSettings.UserID))
|
||||
FolderInfo parfolderinfo = FolderInfo.Get(parentfolder.FolderID);
|
||||
double? myorder = parfolderinfo.NewManualOrder(myindex);
|
||||
using (Folder folder = Folder.MakeFolder(parentfolder.MyParent, parentfolder.MyConnection, uniquename, string.Empty, "Short Name", null, myorder, string.Empty, DateTime.Now, VlnSettings.UserID))
|
||||
{
|
||||
ShowBrokenRules(folder.BrokenRulesCollection);
|
||||
SetLastValues(FolderInfo.Get(folder.FolderID));
|
||||
if (OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(uniquename, folder.FolderConfig)) == DialogResult.OK)
|
||||
{
|
||||
ShowBrokenRules(folder.BrokenRulesCollection);
|
||||
SetLastValues(FolderInfo.Get(folder.FolderID));
|
||||
if (OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(uniquename, folder.FolderConfig)) == DialogResult.OK)
|
||||
{
|
||||
folder.Save();
|
||||
tn = new VETreeNode((IVEDrillDownReadOnly)_LastFolderInfo);
|
||||
if (newtype == MenuSelections.FolderBefore) SelectedNode.Parent.Nodes.Insert(SelectedNode.Index, tn);
|
||||
if (newtype == MenuSelections.FolderAfter) SelectedNode.Parent.Nodes.Insert(SelectedNode.Index + 1, tn);
|
||||
}
|
||||
else
|
||||
f2 = folder.FolderID;
|
||||
folder.Save();
|
||||
tn = new VETreeNode((IVEDrillDownReadOnly)_LastFolderInfo);
|
||||
if (newtype == MenuSelections.FolderBefore) SelectedNode.Parent.Nodes.Insert(SelectedNode.Index, tn);
|
||||
if (newtype == MenuSelections.FolderAfter) SelectedNode.Parent.Nodes.Insert(SelectedNode.Index + 1, tn);
|
||||
}
|
||||
if (f2 != -1) Folder.Delete(f2);
|
||||
else
|
||||
f2 = folder.FolderID;
|
||||
}
|
||||
if (f2 != -1) Folder.Delete(f2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user