C2018-039: Upgrade – User Control of Format
This commit is contained in:
parent
dcefdc8754
commit
e2392f5fec
@ -30,7 +30,7 @@ namespace AdjustBuildRevision
|
||||
string outline = line;
|
||||
if (line.Contains("AssemblyVersion") || line.Contains("AssemblyFileVersion"))
|
||||
{
|
||||
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("1.5.yyMM.dHH") + "\")");
|
||||
outline = Regex.Replace(line, @"([0-9]*)\.([0-9]*)\.([0-9]*)\.([0-9]*)""\)", DateTime.Now.ToString("1.6.yyMM.dHH") + "\")");
|
||||
// if (outline != line)
|
||||
// {
|
||||
// Console.WriteLine("Before: '{0}'", line);
|
||||
|
File diff suppressed because it is too large
Load Diff
Binary file not shown.
BIN
PROMS/Formats/genmacall/base.svg
Normal file
BIN
PROMS/Formats/genmacall/base.svg
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1151,7 +1151,7 @@ namespace VEPROMS
|
||||
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
|
||||
if (si.IsApproved == 1)
|
||||
{
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS); // "true tell export to convert ROs and Transitions to text
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi, MyFrmVEPROMS, (E_UCFImportOptions)0); // "true tell export to convert ROs and Transitions to text
|
||||
dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace
|
||||
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
|
||||
dlg.ExportItem(xd, pi, "procedure");
|
||||
|
@ -6,6 +6,7 @@ using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using Volian.Controls.Library;
|
||||
using Volian.Base.Library;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
@ -39,8 +40,10 @@ namespace VEPROMS
|
||||
set { _ExternalTransitionItem = value; }
|
||||
}
|
||||
private Dictionary<int, int> floatFoldout;
|
||||
private Dictionary<int, string> oldFormat;
|
||||
private Dictionary<string, int> newFormat;
|
||||
private Dictionary<int, string> importedFormat;
|
||||
private Dictionary<string, int> existingFormat;
|
||||
private Dictionary<string, string> renamedUCFFormatName; // if format is renamed, this is its new name so references to it can be made
|
||||
private Dictionary<int, int> renamedUCFFormatId; // if format is renamed, this is its old->new formatid
|
||||
private int oldRODbID;
|
||||
private int newRODbID;
|
||||
private FolderInfo _MyNewFolder;
|
||||
@ -65,24 +68,30 @@ namespace VEPROMS
|
||||
xa.InnerText = value;
|
||||
return xa;
|
||||
}
|
||||
public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS)
|
||||
public dlgExportImport(string mode, FolderInfo folderInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset)
|
||||
{
|
||||
UCFImportDefaultFromSettings = frset;
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyMode = mode;
|
||||
MyFolder = folderInfo;
|
||||
InitializeComponent();
|
||||
this.Text = mode + " Dialog for " + folderInfo.Name;
|
||||
}
|
||||
public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS)
|
||||
public dlgExportImport(string mode, DocVersionInfo docVersionInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset)
|
||||
{
|
||||
UCFImportDefaultFromSettings = frset;
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyMode = mode;
|
||||
MyDocVersion = docVersionInfo;
|
||||
InitializeComponent();
|
||||
if (mode.ToUpper().Contains("FORMAT"))
|
||||
this.Text = mode;
|
||||
else
|
||||
this.Text = mode + " Dialog for " + docVersionInfo.Name + " of " + docVersionInfo.MyFolder.Name;
|
||||
}
|
||||
public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS)
|
||||
public dlgExportImport(string mode, ProcedureInfo procedureInfo, frmVEPROMS myFrmVEPROMS, E_UCFImportOptions frset)
|
||||
{
|
||||
UCFImportDefaultFromSettings = frset;
|
||||
MyFrmVEPROMS = myFrmVEPROMS;// Save frmVEPROMS for Import to shutoff SessionPing
|
||||
_MyMode = mode;
|
||||
MyProcedure = procedureInfo;
|
||||
@ -105,20 +114,43 @@ namespace VEPROMS
|
||||
}
|
||||
pnlExport.Dock = DockStyle.Fill;
|
||||
pnlImport.Dock = DockStyle.Fill;
|
||||
if (_MyMode.ToLower() == "export")
|
||||
int formsize = 2;
|
||||
if (_MyMode.ToLower().Contains("export"))
|
||||
{
|
||||
// if doing formats, make various controls invisible:
|
||||
if (_MyMode.ToUpper().Contains("FORMAT"))
|
||||
{
|
||||
cbxExportAudits.Visible = false;
|
||||
lblExportProcedure.Visible = lblExportSection.Visible = lblExportStep.Visible = false;
|
||||
pbExportProcedure.Visible = pbExportSection.Visible = pbExportStep.Visible = false;
|
||||
lblExportTime.Visible = false;
|
||||
formsize = 4;
|
||||
}
|
||||
sfd.InitialDirectory = PEIPath;
|
||||
pnlExport.BringToFront();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (_MyMode.ToUpper().Contains("FORMAT"))
|
||||
{
|
||||
cbxImportAudits.Visible = false;
|
||||
lblImportProcedure.Visible = lblImportSection.Visible = lblImportStep.Visible = false;
|
||||
pbImportProcedure.Visible = pbImportSection.Visible = pbImportStep.Visible = false;
|
||||
lblExportTime.Visible = false;
|
||||
formsize = 4;
|
||||
}
|
||||
ofd.InitialDirectory = PEIPath;
|
||||
pnlImport.BringToFront();
|
||||
}
|
||||
this.Height = this.Height / 2;
|
||||
this.Height = this.Height / formsize;
|
||||
}
|
||||
private void btnExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_MyMode.ToUpper().Contains("FORMAT"))
|
||||
{
|
||||
txtExport.Text = string.Format(@"{0}\{1}.pxml", PEIPath, "UCF");
|
||||
return;
|
||||
}
|
||||
if (MyFolder != null)
|
||||
{
|
||||
//Database.SelectedDatabase
|
||||
@ -158,7 +190,19 @@ namespace VEPROMS
|
||||
{
|
||||
btnExport.Enabled = false;
|
||||
string msg = "Finished Exporting:\n\n";
|
||||
if (MyFolder != null)
|
||||
if (_MyMode.ToUpper().Contains("FORMAT"))
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
MyStart = DateTime.Now;
|
||||
btnDoExport.Enabled = false;
|
||||
lblExportStatus.Text = "Performing Export of UC Formats";
|
||||
SaveExportUCF();
|
||||
|
||||
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
||||
lblExportStatus.Text = "Format Export Completed in " + elapsed.ToString();
|
||||
this.Cursor = Cursors.Default;
|
||||
}
|
||||
else if (MyFolder != null)
|
||||
{
|
||||
this.Cursor = Cursors.WaitCursor;
|
||||
MyStart = DateTime.Now;
|
||||
@ -181,6 +225,9 @@ namespace VEPROMS
|
||||
pbExportProcedure.Maximum = 1;
|
||||
XmlDocument xd = new XmlDocument();
|
||||
ExportItem(xd, MyProcedure, "procedure");
|
||||
XmlElement xe = xd.CreateElement("formats");
|
||||
xd.DocumentElement.AppendChild(xe);
|
||||
ExportFormats(FormatInfoList.GetFormatInfoListUsed(), xe, "formats", false);
|
||||
xd.Save(txtExport.Text);
|
||||
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
||||
lblExportStatus.Text = "Export Completed in " + elapsed.ToString();
|
||||
@ -188,12 +235,33 @@ namespace VEPROMS
|
||||
}
|
||||
// added message to user when export of a procedure or procedure set has completed
|
||||
if (successfullExport)
|
||||
{
|
||||
if (!_MyMode.ToUpper().Contains("FORMAT"))
|
||||
msg += MyProcedure;
|
||||
else
|
||||
msg += "Formats";
|
||||
}
|
||||
else
|
||||
msg = "Could not complete export";
|
||||
MessageBox.Show(msg, "Export", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
btnCloseExport.Enabled = true;
|
||||
}
|
||||
|
||||
private void SaveExportUCF()
|
||||
{
|
||||
lblExportStatus.Text = "Exporting UC Formats...";
|
||||
Application.DoEvents();
|
||||
XmlDocument xd = new XmlDocument();
|
||||
XmlElement xe = xd.CreateElement("ucformats");
|
||||
xd.AppendChild(xe);
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
foreach (FormatInfo fi in fil)
|
||||
{
|
||||
if (fi.Config != null && fi.Config != "")
|
||||
ExportFormat(xe, fi, "ucformat");
|
||||
}
|
||||
xd.Save(txtExport.Text);
|
||||
}
|
||||
private void SaveExportData()
|
||||
{
|
||||
XmlDocument xd = new XmlDocument();
|
||||
@ -228,7 +296,26 @@ namespace VEPROMS
|
||||
_DidProcessTransitions = false; // B2017-076 to know if we processed any transition (used in status message at the end of importing)
|
||||
_DidProcessROs = false; // B2017-076 to know if we processed any transition (used in status message at the end of importing)
|
||||
//LoadImportDataReader();
|
||||
if (MyFolder != null) // import a folder - a .expx file
|
||||
if (_MyMode.ToUpper().Contains("FORMAT"))
|
||||
{
|
||||
TurnChangeManagerOff.Execute();
|
||||
MyFrmVEPROMS.DisablePing = true;// Turn-off SessionPing
|
||||
bool result = TryToImportUCFs(ref isImported, ref canceledPressed);
|
||||
MyFrmVEPROMS.DisablePing = false;// Turn-on SessionPing
|
||||
TurnChangeManagerOn.Execute();
|
||||
if (!result) return;
|
||||
if (isImported)
|
||||
{
|
||||
TimeSpan elapsed = DateTime.Now.Subtract(MyStart);
|
||||
lblImportStatus.Text = "Format Import Completed in " + elapsed.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
btnImport.Enabled = true;
|
||||
btnDoImport.Enabled = true;
|
||||
}
|
||||
}
|
||||
else if (MyFolder != null) // import a folder - a .expx file
|
||||
{
|
||||
TurnChangeManagerOff.Execute();
|
||||
MyFrmVEPROMS.DisablePing = true;// Turn-off SessionPing
|
||||
@ -289,6 +376,71 @@ namespace VEPROMS
|
||||
btnCloseImport.PerformClick();
|
||||
}
|
||||
}
|
||||
|
||||
private bool TryToImportUCFs(ref bool isImported, ref bool canceledPressed)
|
||||
{
|
||||
try
|
||||
{
|
||||
existingFormat = new Dictionary<string, int>();
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
foreach (FormatInfo fi in fil)
|
||||
existingFormat.Add(fi.Name, fi.FormatID);
|
||||
XmlDocument xd = new XmlDocument();
|
||||
xd.Load(txtImport.Text);
|
||||
XmlNodeList nl = xd.SelectNodes("ucformats/ucformat");
|
||||
foreach (XmlNode nd in nl)
|
||||
{
|
||||
int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText);
|
||||
string name = nd.Attributes.GetNamedItem("name").InnerText;
|
||||
string config = null;
|
||||
XmlNode cfg = nd.Attributes.GetNamedItem("config");
|
||||
if (cfg != null) config = cfg.InnerText;
|
||||
string pname = nd.Attributes.GetNamedItem("pname").InnerText;
|
||||
string description = null;
|
||||
XmlNode descript = nd.Attributes.GetNamedItem("description");
|
||||
if (descript != null) description = descript.InnerText;
|
||||
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||
if (!existingFormat.ContainsKey(pname)) return false;
|
||||
int pid = existingFormat[pname];
|
||||
Format pformat = Format.Get(pid);
|
||||
if (existingFormat.ContainsKey(name)) // this UCF already exists in database, just update the record.
|
||||
{
|
||||
FormatInfo exFI = FormatInfo.Get(existingFormat[name]);
|
||||
if (exFI.Config != config)
|
||||
{
|
||||
using (Format f = Format.Get(exFI.FormatID))
|
||||
{
|
||||
f.Name = name;
|
||||
f.MyParent = pformat;
|
||||
f.Description = description;
|
||||
f.UserID = userid;
|
||||
f.DTS = dts;
|
||||
f.Config = config;
|
||||
f.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
else // doesn't exist in the database, add it
|
||||
{
|
||||
|
||||
Format rec = Format.MakeFormat(pformat, name, description, null, null, dts, userid);
|
||||
rec.Config = config;
|
||||
rec.Save();
|
||||
}
|
||||
}
|
||||
isImported = true;
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.StackTrace, ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
|
||||
_MyLog.Warn("Failed during UC Formats Import", ex);
|
||||
this.Close();
|
||||
isImported = false;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
private bool TryToImportProcedure(ref bool isImported, ref bool canceledPressed)
|
||||
{
|
||||
try
|
||||
@ -411,7 +563,14 @@ namespace VEPROMS
|
||||
}
|
||||
#endregion
|
||||
} // end - need to select RO Path
|
||||
|
||||
bool didImp = LoadFormats(xd, "procedure/formats/format");
|
||||
if (!didImp)
|
||||
{
|
||||
this.Cursor = Cursors.Default;
|
||||
this.btnImport.Enabled = true; // allow user to select a different export file to import
|
||||
this.btnDoImport.Enabled = true; // allow user to change mind and perform the import
|
||||
return false; // Return False to Indicate that the Import did not succeed
|
||||
}
|
||||
// use resolvedProcNum to determine if procedure is 'unique', i.e. if the procedure number exists
|
||||
// and user does not overwrite or copy, then the procedure should NOT be imported. Fix for B2016-045
|
||||
bool resolvedProcNum = true;
|
||||
@ -472,8 +631,28 @@ namespace VEPROMS
|
||||
ImportProcedureNew(xd);
|
||||
isImported = true;
|
||||
}
|
||||
if (isImported && UCFImportCase==E_UCFImportOptions.LoadForSetOnly) UpdateFormatForUCFInSet();
|
||||
return true;// Import Suceeded
|
||||
}
|
||||
private void UpdateFormatForUCFInSet()
|
||||
{
|
||||
// this gets called if the UCFImportCase == LoadForSetOnly, i.e. only items in this PROCEDURE Set whose formats point to a
|
||||
// UCF format should point to the updated (copied) UCF format.
|
||||
if (renamedUCFFormatId == null) return;
|
||||
foreach (int key in renamedUCFFormatId.Keys)
|
||||
{
|
||||
using (ContentInfoList cil = ContentInfoList.FixFormatIDAfterImport(MyDocVersion.VersionID.ToString(), renamedUCFFormatId[key], key))
|
||||
{
|
||||
foreach (ContentInfo ci in cil)
|
||||
{
|
||||
using (Content c = ci.Get())
|
||||
{
|
||||
ContentInfo.Refresh(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Added Error Handling to assure that Change Manager is turned-on regardless of success or failure of the import
|
||||
private void TryToLoadImportDataDocument()
|
||||
{
|
||||
@ -490,13 +669,13 @@ namespace VEPROMS
|
||||
{
|
||||
//add imported procedure
|
||||
floatFoldout = new Dictionary<int, int>();
|
||||
oldFormat = new Dictionary<int, string>();
|
||||
newFormat = new Dictionary<string, int>();
|
||||
importedFormat = new Dictionary<int, string>();
|
||||
existingFormat = new Dictionary<string, int>();
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
foreach (FormatInfo fi in fil)
|
||||
{
|
||||
oldFormat.Add(fi.FormatID, fi.Name);
|
||||
newFormat.Add(fi.Name, fi.FormatID);
|
||||
importedFormat.Add(fi.FormatID, fi.Name);
|
||||
existingFormat.Add(fi.Name, fi.FormatID);
|
||||
}
|
||||
Old2NewItem = new Dictionary<int, int>();
|
||||
Old2NewContent = new Dictionary<int, int>();
|
||||
@ -519,13 +698,13 @@ namespace VEPROMS
|
||||
private void ImportProcedureCopy(XmlDocument xd)
|
||||
{
|
||||
floatFoldout = new Dictionary<int, int>();
|
||||
oldFormat = new Dictionary<int, string>();
|
||||
newFormat = new Dictionary<string, int>();
|
||||
importedFormat = new Dictionary<int, string>();
|
||||
existingFormat = new Dictionary<string, int>();
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
foreach (FormatInfo fi in fil)
|
||||
{
|
||||
oldFormat.Add(fi.FormatID, fi.Name);
|
||||
newFormat.Add(fi.Name, fi.FormatID);
|
||||
importedFormat.Add(fi.FormatID, fi.Name);
|
||||
existingFormat.Add(fi.Name, fi.FormatID);
|
||||
}
|
||||
Old2NewItem = new Dictionary<int, int>();
|
||||
Old2NewContent = new Dictionary<int, int>();
|
||||
@ -558,13 +737,13 @@ namespace VEPROMS
|
||||
private bool ImportProcedureOverwrite(XmlDocument xd, ProcedureInfo pi)
|
||||
{
|
||||
floatFoldout = new Dictionary<int, int>();
|
||||
oldFormat = new Dictionary<int, string>();
|
||||
newFormat = new Dictionary<string, int>();
|
||||
importedFormat = new Dictionary<int, string>();
|
||||
existingFormat = new Dictionary<string, int>( );
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
foreach (FormatInfo fi in fil)
|
||||
{
|
||||
oldFormat.Add(fi.FormatID, fi.Name);
|
||||
newFormat.Add(fi.Name, fi.FormatID);
|
||||
importedFormat.Add(fi.FormatID, fi.Name);
|
||||
existingFormat.Add(fi.Name, fi.FormatID);
|
||||
}
|
||||
Old2NewItem = new Dictionary<int, int>();
|
||||
Old2NewContent = new Dictionary<int, int>();
|
||||
@ -620,7 +799,14 @@ namespace VEPROMS
|
||||
ze.Extract(PEIPath, ExtractExistingFileAction.OverwriteSilently);
|
||||
XmlDocument xd = new XmlDocument();
|
||||
xd.Load(fn);
|
||||
LoadFormats(xd);
|
||||
bool didImp = LoadFormats(xd, "folder/formats/format");
|
||||
if (!didImp)
|
||||
{
|
||||
this.Cursor = Cursors.Default;
|
||||
this.btnImport.Enabled = true; // allow user to select a different export file to import
|
||||
this.btnDoImport.Enabled = true; // allow user to change mind and perform the import
|
||||
return; // Return False to Indicate that the Import did not succeed
|
||||
}
|
||||
Folder ff = AddFolder(Folder.Get(MyFolder.FolderID), xd);
|
||||
if (ff == null)
|
||||
{
|
||||
@ -699,22 +885,239 @@ namespace VEPROMS
|
||||
c.Save();
|
||||
}
|
||||
}
|
||||
|
||||
// note that his is only used when importing a folder
|
||||
private void LoadFormats(XmlDocument xd)
|
||||
private E_UCFImportOptions UCFImportDefaultFromSettings;
|
||||
private E_UCFImportOptions UCFImportCase = E_UCFImportOptions.LoadOnlyImported;
|
||||
Dictionary<string, string> existingCopyFCName = new Dictionary<string, string>();
|
||||
// note that this is used when importing a folder or a procedure (procedure was added for UCF changes)
|
||||
private bool LoadFormats(XmlDocument xd, string xmlpath)
|
||||
{
|
||||
oldFormat = new Dictionary<int, string>();
|
||||
XmlNodeList nl = xd.SelectNodes("folder/formats/format");
|
||||
existingFormat = new Dictionary<string, int>();
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
foreach (FormatInfo fi in fil)
|
||||
existingFormat.Add(fi.Name, fi.FormatID);
|
||||
|
||||
importedFormat = new Dictionary<int, string>();
|
||||
XmlNodeList nl = xd.SelectNodes(xmlpath);
|
||||
|
||||
bool conflictingUCFdata = false;
|
||||
List<string> existingFC = new List<string>();
|
||||
List<string> importedFC = new List<string>();
|
||||
List<string> fname = new List<string>();
|
||||
|
||||
foreach (XmlNode nd in nl)
|
||||
{
|
||||
string copyOfUCF = null;
|
||||
// see if any of the imported formats are 'UCF' formats, i.e. have config data. If they are UCF,
|
||||
// see if this is different that what is in the database. If it is, the user needs to decide
|
||||
// whether to associate sections with existing UCF format or the new one. All UCF formats will be
|
||||
// connected the same way, i.e. existing or new.
|
||||
int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText);
|
||||
string name = nd.Attributes.GetNamedItem("name").InnerText;
|
||||
string config = null;
|
||||
XmlNode cfg = nd.Attributes.GetNamedItem("config");
|
||||
if (cfg != null) config = cfg.InnerText;
|
||||
if (existingFormat.ContainsKey(name) && config != null && config != "")
|
||||
{
|
||||
FormatInfo exFI = FormatInfo.Get(existingFormat[name]);
|
||||
if (exFI.Config != config && exFI.Config != "" && exFI.Config != null && config != "" && config != null)
|
||||
{
|
||||
// See if there are copies of this UCF format, if so, this may match (have same config) one of those and should
|
||||
// use it before stating there is conflicting data.
|
||||
copyOfUCF = ContentsOfUCFExists(name, config);
|
||||
if (copyOfUCF == null)
|
||||
{
|
||||
existingFC.Add(exFI.Config);
|
||||
importedFC.Add(config);
|
||||
conflictingUCFdata = true;
|
||||
fname.Add(name);
|
||||
}
|
||||
else
|
||||
existingCopyFCName.Add(name, copyOfUCF);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// there is a difference in UCF data, see if user wants sections to use the existing or new ucf data:
|
||||
if (conflictingUCFdata)
|
||||
{
|
||||
// Bring up dialog to allow user to choose how the UCF data is handled:
|
||||
// Importing of a procedure(s) (names of UCF exist in current DB and in exported DB)
|
||||
//Case 0 - ignore (don't bring in new UCF)
|
||||
//Case 1 - bringing in new UCF and not using it
|
||||
//Case 2 - bringing in new UCF and only using it for imported data
|
||||
//Case 3 - bringing in new UCF and using it across the board
|
||||
//Case 4 - bringing in new UCF and using it for the current procedure set (not applicable for procedure sets)
|
||||
UCFImportCase = UCFImportDefaultFromSettings; // from the options/settings
|
||||
dlgUCFImportOptions ucfoptDlg = new dlgUCFImportOptions(fname, existingFC, importedFC, UCFImportCase, xmlpath);
|
||||
DialogResult dr = ucfoptDlg.ShowDialog();
|
||||
if (dr != DialogResult.OK) return false;
|
||||
UCFImportCase = ucfoptDlg.UCFImportOptionsCase; // may be reset from dialog.
|
||||
}
|
||||
// first see if any of the imported formats have different data. If so,
|
||||
foreach (XmlNode nd in nl)
|
||||
{
|
||||
int formatid = int.Parse(nd.Attributes.GetNamedItem("formatid").InnerText);
|
||||
string name = nd.Attributes.GetNamedItem("name").InnerText;
|
||||
oldFormat.Add(formatid, name);
|
||||
string config = null;
|
||||
XmlNode cfg = nd.Attributes.GetNamedItem("config");
|
||||
if (cfg != null) config = cfg.InnerText;
|
||||
string pname = nd.Attributes.GetNamedItem("pname").InnerText;
|
||||
string description = null;
|
||||
XmlNode descript = nd.Attributes.GetNamedItem("description");
|
||||
if (descript != null) description = descript.InnerText;
|
||||
string userid = nd.Attributes.GetNamedItem("userid").InnerText;
|
||||
DateTime dts = DateTime.Parse(nd.Attributes.GetNamedItem("dts").InnerText);
|
||||
// If the format that is being imported exists as a copy (already was imported and a 'Copy x of name' was created) and the imported and
|
||||
// existing config match, use the existing (copied) format's name rather than importing it again (the dictionary was set up during
|
||||
// the import formats process.
|
||||
if (existingCopyFCName.ContainsKey(name)) name = existingCopyFCName[name];
|
||||
|
||||
// compare this imported format to the original in the database.
|
||||
// If format name exists, or if it has same config data, just use it.
|
||||
if (existingFormat.ContainsKey(name))
|
||||
{
|
||||
// Note that Data & Genmac fields can have different contents. The format information should always be used from
|
||||
// the original database, not the export file. So no processing is done on these fields when exporting & importing.
|
||||
// Data or Genmac can be different if formats were updated in one database & not the other.
|
||||
FormatInfo exFI = FormatInfo.Get(existingFormat[name]);
|
||||
if ((exFI.Config == config || ((exFI.Config == "" || exFI.Config == null) && (config == "" || config == null))))
|
||||
{
|
||||
// importedFormat is used to set correct formatid on imported sections (if different formatid <-> name between
|
||||
// the current database and the one from which export came)
|
||||
importedFormat.Add(formatid, name);
|
||||
continue; // go on to next format in import list
|
||||
}
|
||||
newFormat = new Dictionary<string, int>();
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
foreach (FormatInfo fi in fil)
|
||||
newFormat.Add(fi.Name, fi.FormatID);
|
||||
}
|
||||
// parent format will always be in there, if it is a new format, it will be added before the child. Check just in case (no null reference).
|
||||
if (!existingFormat.ContainsKey(pname)) break;
|
||||
int pid = existingFormat[pname];
|
||||
Format pformat = Format.Get(pid);
|
||||
|
||||
// if the new format doesn't exist, it will be added (after these other checks). Otherwise, handle the
|
||||
// various cases listed above:
|
||||
if (existingFormat.ContainsKey(name))
|
||||
{
|
||||
// if case 0 and this ucf already exists, ignore it:
|
||||
if (UCFImportCase == E_UCFImportOptions.Ignore) continue;
|
||||
|
||||
// if case 1, 2, 4 and the name exists, make a 'copy' of the newly imported format:
|
||||
// need to add this format - name must be unique so add 'COPY(x) of 'original name'' where x is unique number:
|
||||
if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly)
|
||||
{
|
||||
int count = 0;
|
||||
foreach (FormatInfo fi in fil) if (fi.Name.EndsWith(name)) count++;
|
||||
if (count > 0)
|
||||
{
|
||||
string origname = name;
|
||||
name = string.Format("Copy {0} of {1}", count.ToString(), name);
|
||||
if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly)
|
||||
{
|
||||
if (renamedUCFFormatName == null) renamedUCFFormatName = new Dictionary<string, string>();
|
||||
renamedUCFFormatName.Add(origname, name);
|
||||
}
|
||||
}
|
||||
}
|
||||
// if case 3, take the existing config data and create in a record whose name is Old(x) of 'original name' (the record
|
||||
// creation gets done below). Then modify the existing record to have the config data. The result is that any
|
||||
// sections that used this UCF throughout the database will have the new config data.
|
||||
if (UCFImportCase == E_UCFImportOptions.LoadUseAll)
|
||||
{
|
||||
string savname = name;
|
||||
int count = 0;
|
||||
foreach (FormatInfo fi in fil) if (fi.Name.EndsWith(name)) count++;
|
||||
if (count > 0)
|
||||
{
|
||||
name = string.Format("Old {0} of {1}", count.ToString(), name);
|
||||
}
|
||||
// update the 'old' record by getting the original config data.
|
||||
string savdesc = null;
|
||||
DateTime savdts = DateTime.Now;
|
||||
string savuid = null;
|
||||
int savpar = 0;
|
||||
string savconfig = null;
|
||||
using (Format origRecord = Format.Get(existingFormat[savname]))
|
||||
{
|
||||
savdesc = origRecord.Description;
|
||||
savdts = origRecord.DTS;
|
||||
savuid = origRecord.UserID;
|
||||
savpar = origRecord.ParentID;
|
||||
savconfig = origRecord.Config;
|
||||
origRecord.Name = savname;
|
||||
origRecord.Description = description;
|
||||
origRecord.DTS = dts;
|
||||
origRecord.UserID = userid;
|
||||
origRecord.MyParent = pformat;
|
||||
origRecord.Config = config;
|
||||
origRecord.Save();
|
||||
description = savdesc;
|
||||
dts = savdts;
|
||||
userid = savuid;
|
||||
pformat = Format.Get(savpar);
|
||||
config = savconfig;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (UCFImportCase == 0) // ignore it
|
||||
{
|
||||
importedFormat.Add(formatid, name);
|
||||
}
|
||||
else
|
||||
{
|
||||
Format rec = Format.MakeFormat(pformat, name, description, null, null, dts, userid);
|
||||
rec.Config = config;
|
||||
rec.Save();
|
||||
if (UCFImportCase == E_UCFImportOptions.LoadNotUsed || UCFImportCase == E_UCFImportOptions.LoadUseAll) // don't reset format id (case 1 don't use it, case 3 copies new data into original record
|
||||
importedFormat.Add(formatid, name);
|
||||
else if (UCFImportCase == E_UCFImportOptions.LoadOnlyImported || UCFImportCase == E_UCFImportOptions.LoadForSetOnly) // case 2 uses it for any items imported, case 4 uses it for any sections within current set
|
||||
{
|
||||
existingFormat.Add(name, rec.FormatID); // change to original name?
|
||||
importedFormat.Add(rec.FormatID, name);
|
||||
|
||||
// get format id for the original named format
|
||||
if (UCFImportCase == E_UCFImportOptions.LoadForSetOnly && renamedUCFFormatName != null)
|
||||
{
|
||||
int origformatid = -1;
|
||||
foreach (var kvp in renamedUCFFormatName)
|
||||
{
|
||||
if (kvp.Value == name)
|
||||
{
|
||||
origformatid = existingFormat[kvp.Key];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (origformatid != -1)
|
||||
{
|
||||
if (renamedUCFFormatId == null) renamedUCFFormatId = new Dictionary<int, int>();
|
||||
renamedUCFFormatId.Add(rec.FormatID, origformatid);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
FormatInfoList.Reset();
|
||||
return true;
|
||||
}
|
||||
|
||||
private string ContentsOfUCFExists(string name, string config)
|
||||
{
|
||||
// See if there is an existing format file that was created as a copy. If so, check if the passed in format's
|
||||
// config is the same as an existing 'Copy of' format - if so, use rather than importing the same format as
|
||||
// defined by config.
|
||||
foreach (var existname in existingFormat)
|
||||
{
|
||||
if (existname.Key.Contains(name))
|
||||
{
|
||||
string cpy = existname.Key;
|
||||
if (cpy.StartsWith("Copy") && cpy.Contains("of " + name))
|
||||
{
|
||||
FormatInfo exFI = FormatInfo.Get(existingFormat[cpy]);
|
||||
if (exFI.Config == config) return cpy;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
//jsj 4-29-2016 appears to not be used
|
||||
@ -1257,6 +1660,13 @@ namespace VEPROMS
|
||||
|
||||
private void btnImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_MyMode.ToUpper().Contains("FORMAT"))
|
||||
{
|
||||
ofd.Filter = "PROMS Procedure Export Files|*.pxml";
|
||||
if (ofd.ShowDialog(this) == DialogResult.OK)
|
||||
txtImport.Text = ofd.FileName;
|
||||
return;
|
||||
}
|
||||
if (MyFolder != null)
|
||||
{
|
||||
if (ofd.ShowDialog(this) == DialogResult.OK)
|
||||
@ -1376,24 +1786,37 @@ namespace VEPROMS
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xd, "formatfilename",formatFileName));
|
||||
xd.AppendChild(xe);
|
||||
ExportAnnotationTypes(xe, "annotationtypes");
|
||||
ExportFormats(xe, "formats");
|
||||
ExportFormats(FormatInfoList.GetFormatInfoListUsed(), xe, "formats", true);
|
||||
if (fi.FolderDocVersionCount > 0)
|
||||
foreach (DocVersionInfo dvi in fi.FolderDocVersions)
|
||||
ExportDocVersion(xe, dvi, "docversion");
|
||||
}
|
||||
private void ExportFormats(XmlElement xn, string nodename)
|
||||
private void ExportFormats(FormatInfoList fil, XmlElement xn, string nodename, bool doElement)
|
||||
{
|
||||
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||
FormatInfoList fil = FormatInfoList.Get();
|
||||
XmlElement xe = null;
|
||||
if (doElement) xe = xn.OwnerDocument.CreateElement(nodename);
|
||||
else xe = xn;
|
||||
foreach (FormatInfo fi in fil)
|
||||
ExportFormat(xe, fi, "format");
|
||||
xn.AppendChild(xe);
|
||||
if (doElement) xn.AppendChild(xe);
|
||||
}
|
||||
private void ExportFormat(XmlElement xn, FormatInfo fi, string nodename)
|
||||
{
|
||||
XmlElement xe = xn.OwnerDocument.CreateElement(nodename);
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "formatid", fi.FormatID.ToString()));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "name", fi.Name));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "pname", fi.MyParent==null?"null":fi.MyParent.Name));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "description", fi.Description));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "dts", fi.DTS.ToString("MM/dd/yyyy HH:mm:ss.fff")));
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "userid", fi.UserID));
|
||||
|
||||
if (fi.Config != null && fi.Config != "")
|
||||
{
|
||||
FormatConfig MyFormatConfig = FormatConfig.Get(fi.Config);
|
||||
string scf = MyFormatConfig.ConvertToString();
|
||||
scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", "");
|
||||
xe.Attributes.SetNamedItem(AddAttribute(xe.OwnerDocument, "config", scf));
|
||||
}
|
||||
xn.AppendChild(xe);
|
||||
}
|
||||
private void ExportAnnotationTypes(XmlElement xn, string nodename)
|
||||
@ -2931,10 +3354,11 @@ namespace VEPROMS
|
||||
string formatName = formatFileName; // B2016-103, new export files include the format filename use that if it exists
|
||||
if (formatFileName == string.Empty)
|
||||
{
|
||||
if (formatID >= oldFormat.Count) return null; // formatID not found, use default file name
|
||||
formatName = oldFormat[formatID]; // for backwards compatibility with older export files
|
||||
if (formatID >= importedFormat.Count) return null; // formatID not found, use default file name
|
||||
formatName = importedFormat[formatID]; // for backwards compatibility with older export files
|
||||
}
|
||||
formatID = newFormat[formatName];
|
||||
if (renamedUCFFormatName != null && renamedUCFFormatName.ContainsKey(formatFileName)) formatName = renamedUCFFormatName[formatName];
|
||||
formatID = existingFormat[formatName];
|
||||
return Format.Get(formatID);
|
||||
}
|
||||
catch
|
||||
@ -3198,7 +3622,8 @@ namespace VEPROMS
|
||||
config = StripEnhanced(config);
|
||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||
Procedure p = Procedure.MakeProcedure(dvInfo, procInfo, number, text, proctype);
|
||||
using (Procedure p = Procedure.MakeProcedure(dvInfo, procInfo, number, text, proctype))
|
||||
{
|
||||
p.DTS = dts;
|
||||
p.UserID = userid;
|
||||
// check for a null in case an older export file is being imported (the older files will not have the fromatfilename attribute)
|
||||
@ -3225,6 +3650,7 @@ namespace VEPROMS
|
||||
if (xc.SelectNodes("transition").Count > 0)
|
||||
AddTransitions(p.MyContent, xc);
|
||||
procInfo = ProcedureInfo.Get(p.ItemID);
|
||||
}
|
||||
if (xc.HasChildNodes)
|
||||
AddParts(xc, procInfo);
|
||||
FixSectionStart(procInfo);
|
||||
@ -4116,14 +4542,20 @@ namespace VEPROMS
|
||||
CheckForFloatingFoldout(contentid, config);
|
||||
string userid = xc.Attributes.GetNamedItem("userid").InnerText;
|
||||
DateTime dts = DateTime.Parse(xc.Attributes.GetNamedItem("dts").InnerText);
|
||||
sect = Section.MakeSection(parentInfo, prevInfo, number, text, sectiontype);
|
||||
using (sect = Section.MakeSection(parentInfo, prevInfo, number, text, sectiontype))
|
||||
{
|
||||
sect.DTS = dts;
|
||||
sect.UserID = userid;
|
||||
// check for a null in case an older export file is being imported (the older files will not have the fromatfilename attribute)
|
||||
XmlNode fnNode = xc.Attributes.GetNamedItem("formatfilename"); //Bug fix B2016-103 the formatid in an Export file may not match the formatid where you are importing to
|
||||
string formatfilename = (fnNode != null) ? fnNode.InnerText : "";
|
||||
// If this formatfile is a copy in this database (was not in exported database), use the copy name (note that the
|
||||
// Config data must match and this was checked in the code that loads the formats:
|
||||
if (formatid != string.Empty)
|
||||
{
|
||||
if (existingCopyFCName.ContainsKey(formatfilename)) formatfilename = existingCopyFCName[formatfilename];
|
||||
sect.MyContent.MyFormat = OldToNewFormat(int.Parse(formatid), formatfilename);
|
||||
}
|
||||
sect.MyContent.Config = config;
|
||||
sect.MyContent.DTS = dts;
|
||||
sect.MyContent.UserID = userid;
|
||||
@ -4147,6 +4579,7 @@ namespace VEPROMS
|
||||
prevInfo = SectionInfo.Get(sect.ItemID);
|
||||
if (xc.HasChildNodes)
|
||||
AddParts(xc, prevInfo);
|
||||
}
|
||||
return prevInfo;
|
||||
}
|
||||
private string StripEnhanced(string config)
|
||||
|
61
PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs
generated
Normal file
61
PROMS/VEPROMS User Interface/dlgUCFDetail.Designer.cs
generated
Normal file
@ -0,0 +1,61 @@
|
||||
namespace VEPROMS
|
||||
{
|
||||
partial class dlgUCFDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.wbBrDet = new System.Windows.Forms.WebBrowser();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// wbBrDet
|
||||
//
|
||||
this.wbBrDet.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.wbBrDet.Location = new System.Drawing.Point(0, 0);
|
||||
this.wbBrDet.MinimumSize = new System.Drawing.Size(20, 20);
|
||||
this.wbBrDet.Name = "wbBrDet";
|
||||
this.wbBrDet.Size = new System.Drawing.Size(897, 445);
|
||||
this.wbBrDet.TabIndex = 0;
|
||||
//
|
||||
// dlgUCFDetail
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(897, 445);
|
||||
this.Controls.Add(this.wbBrDet);
|
||||
this.Name = "dlgUCFDetail";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "User Control of Format Details";
|
||||
this.Load += new System.EventHandler(this.dlgUCFDetail_Load);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.WebBrowser wbBrDet;
|
||||
}
|
||||
}
|
77
PROMS/VEPROMS User Interface/dlgUCFDetail.cs
Normal file
77
PROMS/VEPROMS User Interface/dlgUCFDetail.cs
Normal file
@ -0,0 +1,77 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Xml.Xsl;
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
public partial class dlgUCFDetail : Form
|
||||
{
|
||||
private string MyFormatConfig;
|
||||
private string UCFName;
|
||||
private string Description;
|
||||
// This brings up the dialog for displaying the details of what is contained in this User Control of Format
|
||||
// as defined by the formatConfig. It uses XSL to display the xml. The XSL can be found in UCFDetails.xsl.
|
||||
// The result is displayed in a web browser control on the dialog.
|
||||
public dlgUCFDetail(string formatConfig, string name, string desc)
|
||||
{
|
||||
MyFormatConfig = formatConfig;
|
||||
UCFName = name;
|
||||
Description = desc;
|
||||
InitializeComponent();
|
||||
}
|
||||
private void AddAttribute(XmlNode xn, string name, object value)
|
||||
{
|
||||
XmlAttribute xa = xn.OwnerDocument.CreateAttribute(name);
|
||||
xa.Value = value.ToString();
|
||||
xn.Attributes.Append(xa);
|
||||
}
|
||||
private void dlgUCFDetail_Load(object sender, EventArgs e)
|
||||
{
|
||||
try
|
||||
{
|
||||
//need to add the UCF name & description to this:
|
||||
XmlDocument xd = new XmlDocument();
|
||||
xd.LoadXml(MyFormatConfig);
|
||||
XmlNodeList xnl = xd.GetElementsByTagName("FormatConfig");
|
||||
if (xnl != null && xnl.Count > 0)
|
||||
{
|
||||
AddAttribute(xnl[0], "Name", UCFName);
|
||||
AddAttribute(xnl[0], "Description", Description);
|
||||
}
|
||||
|
||||
string sXSLSummary = System.IO.File.ReadAllText(Application.StartupPath + "\\" + "UCFDetails.xsl");
|
||||
StringWriter sw = new StringWriter();
|
||||
StringWriter xsw = new StringWriter();
|
||||
using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary)))
|
||||
{
|
||||
XmlTextWriter tx = new XmlTextWriter(xsw);
|
||||
xd.WriteTo(tx);
|
||||
string tmp = sw.ToString();
|
||||
tmp = xd.InnerXml;
|
||||
using (XmlReader xri = XmlReader.Create(new StringReader(tmp)))
|
||||
{
|
||||
using (XmlWriter xwo = XmlWriter.Create(sw))
|
||||
{
|
||||
XslCompiledTransform xsl = new XslCompiledTransform();
|
||||
xsl.Load(xrt);
|
||||
xsl.Transform(xri, xwo); // Perform Transform
|
||||
}
|
||||
this.wbBrDet.DocumentText = sw.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Problem occurred displaying the details.", "UCF Warning", MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
120
PROMS/VEPROMS User Interface/dlgUCFDetail.resx
Normal file
120
PROMS/VEPROMS User Interface/dlgUCFDetail.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -130,6 +130,7 @@ namespace VEPROMS
|
||||
private LocalAnnotationTypeInfoList myLocalAnnotationTypeInfoList = null;
|
||||
private StageInfoList myStageInfoList = null;
|
||||
private LocalStageInfoList myLocalStageInfoList = null;
|
||||
private int? _cmbxformatOriginal = null;
|
||||
private void frmFolderProperties_Load(object sender, EventArgs e)
|
||||
{
|
||||
_Initializing = true;
|
||||
@ -150,6 +151,7 @@ namespace VEPROMS
|
||||
ppCmbxFormat.DisplayMember = "FullName";
|
||||
ppCmbxFormat.ValueMember = "FullName";
|
||||
ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList;
|
||||
if (_FolderConfig != null && _FolderConfig.MyFolder != null) _cmbxformatOriginal = _FolderConfig.MyFolder.FormatID;
|
||||
if (_FolderConfig.FormatSelection != null)
|
||||
{
|
||||
ppCmbxFormat.SelectedValue = _FolderConfig.FormatSelection;
|
||||
@ -350,6 +352,24 @@ namespace VEPROMS
|
||||
btnAnnoTypeUndo.PerformClick();
|
||||
//if (btnAnnoTypeSave.Enabled) return;
|
||||
folderConfigBindingSource.EndEdit();
|
||||
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
|
||||
if (_FolderConfig.MyFolder.FormatID != _cmbxformatOriginal)
|
||||
{
|
||||
// clean up & then refresh the configs
|
||||
using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByFolder(_FolderConfig.MyFolder.FolderID, _cmbxformatOriginal, _FolderConfig.MyFolder.FormatID))
|
||||
{
|
||||
foreach (ContentInfo ci in cil)
|
||||
{
|
||||
using (Content c = ci.Get())
|
||||
{
|
||||
// first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen
|
||||
// and if configs aren't done first, the screen refresh, if based on config data, will not be correct.
|
||||
foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig();
|
||||
ContentInfo.Refresh(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Save Default settings for User
|
||||
//
|
||||
// Save whether we should display the default values on this property page
|
||||
|
@ -72,6 +72,29 @@ namespace VEPROMS
|
||||
SaveText(ppProcTitleStpRTB);
|
||||
SaveText(ppProcNumStpRTB);
|
||||
_ProcedureConfig.MyProcedure.MyProcedureInfo.CreateEnhanced = cbEnhanced.Checked;
|
||||
|
||||
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
|
||||
// To determine a change to the format, first see if selection changed in list and then see if the format selected does not match
|
||||
// what was set on procedure, if necessary resolve for an inherited format.
|
||||
|
||||
if (_ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat != null &&
|
||||
_ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat.FormatID != _cmbxformatOriginal)
|
||||
{
|
||||
// clean up & then refresh the configs
|
||||
using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByItem(_ProcedureConfig.MyProcedure.ItemID, _cmbxformatOriginal, _ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat.FormatID))
|
||||
{
|
||||
foreach (ContentInfo ci in cil)
|
||||
{
|
||||
using (Content c = ci.Get())
|
||||
{
|
||||
// first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen
|
||||
// and if configs aren't done first, the screen refresh, if based on config data, will not be correct.
|
||||
foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig();
|
||||
ContentInfo.Refresh(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
DialogResult = DialogResult.OK;
|
||||
this.Close();
|
||||
}
|
||||
@ -149,7 +172,7 @@ namespace VEPROMS
|
||||
|
||||
_ProcedureConfig.ParentLookup = false;
|
||||
}
|
||||
|
||||
private int? _cmbxformatOriginal = null;
|
||||
private void frmProcedureProperties_Load(object sender, EventArgs e)
|
||||
{
|
||||
_Initializing = true;
|
||||
@ -161,6 +184,7 @@ namespace VEPROMS
|
||||
ppCmbxFormat.DisplayMember = "FullName";
|
||||
ppCmbxFormat.ValueMember = "FullName";
|
||||
ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList;
|
||||
if (_ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat != null) _cmbxformatOriginal = _ProcedureConfig.MyProcedure.MyProcedureInfo.ActiveFormat.FormatID;
|
||||
if (_ProcedureConfig.FormatSelection != null)
|
||||
ppCmbxFormat.SelectedValue = _ProcedureConfig.FormatSelection;
|
||||
else
|
||||
|
@ -121,10 +121,11 @@ namespace VEPROMS
|
||||
PlantFormat pf = _SectionConfig.MyFormat != null ? _SectionConfig.MyFormat.PlantFormat : _SectionConfig.MyDefaultFormat.PlantFormat;
|
||||
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
|
||||
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
||||
if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && chkoffList.MaxIndex > 1)
|
||||
int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
|
||||
if (ppGpbxSignoffCheckoff.Enabled && (chkoffList != null && maxindx > 1)
|
||||
&& (ppCmbxCheckoffType.SelectedIndex != _SectionConfig.Section_CheckoffListSelection - (_hasSectionCheckoffDefault? 1:0)))
|
||||
_SectionConfig.Section_CheckoffListSelection = ppCmbxCheckoffType.SelectedIndex + (_hasSectionCheckoffDefault? 1:0);
|
||||
if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.MaxIndex > 1)
|
||||
if (ppCmbxCheckoffHeading.Enabled && chkoffHeaderList != null && chkoffHeaderList.MaxIndexNoInherit > 1)
|
||||
_SectionConfig.Section_CheckoffHeaderSelection = ppCmbxCheckoffHeading.SelectedIndex;
|
||||
|
||||
if (ppCmbxSectPagination.SelectedValue == null)
|
||||
@ -144,6 +145,28 @@ namespace VEPROMS
|
||||
DocumentInfo docinfo = DocumentInfo.Get(_SectionConfig.MySection.MyContent.MyEntry.MyDocument.DocID);
|
||||
docinfo.RefreshDocumentEntries();
|
||||
}
|
||||
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
|
||||
// To determine a change to the format, first see if selection changed in list and then see if the format selected does not match
|
||||
// what was set on procedure, if necessary resolve for an inherited format.
|
||||
if (_SectionConfig.MySection.MySectionInfo.ActiveFormat != null &&
|
||||
_SectionConfig.MySection.MySectionInfo.ActiveFormat.FormatID != _cmbxformatOriginal)
|
||||
{
|
||||
// clean up & then refresh the configs
|
||||
using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByItem(_SectionConfig.MySection.ItemID, _cmbxformatOriginal, _SectionConfig.MySection.MySectionInfo.ActiveFormat.FormatID))
|
||||
{
|
||||
foreach (ContentInfo ci in cil)
|
||||
{
|
||||
using (Content c = ci.Get())
|
||||
{
|
||||
// first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen
|
||||
// and if configs aren't done first, the screen refresh, if based on config data, will not be correct.
|
||||
foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig();
|
||||
ContentInfo.Refresh(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if there was a document to delete, do it.
|
||||
if (_DocumentToDelete != null)
|
||||
{
|
||||
@ -301,6 +324,7 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
private bool checkEnhancedSettings = false;
|
||||
private int? _cmbxformatOriginal = null;
|
||||
private void frmSectionProperties_Load(object sender, EventArgs e)
|
||||
{
|
||||
_Initializing = true;
|
||||
@ -310,6 +334,7 @@ namespace VEPROMS
|
||||
ppCmbxFormat.DisplayMember = "FullName";
|
||||
ppCmbxFormat.ValueMember = "FullName";
|
||||
ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList;
|
||||
if (_SectionConfig.MySection.MySectionInfo.ActiveFormat != null) _cmbxformatOriginal = (int)_SectionConfig.MySection.MySectionInfo.ActiveFormat.FormatID;
|
||||
if (_SectionConfig.FormatSelection != null)
|
||||
ppCmbxFormat.SelectedValue = _SectionConfig.FormatSelection;
|
||||
else
|
||||
@ -680,7 +705,8 @@ namespace VEPROMS
|
||||
PlantFormat pf = _SectionConfig.MyFormat!=null?_SectionConfig.MyFormat.PlantFormat:_SectionConfig.MyDefaultFormat.PlantFormat;
|
||||
CheckOffList chkoffList = pf.FormatData.ProcData.CheckOffData.CheckOffList;
|
||||
CheckOffHeaderList chkoffHeaderList = pf.FormatData.ProcData.CheckOffData.CheckOffHeaderList;
|
||||
if (chkoffList != null && chkoffList.MaxIndex > 0 &&
|
||||
int maxindx = pf.FormatData.ProcData.CheckOffUCF ? pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndex : pf.FormatData.ProcData.CheckOffData.CheckOffList.MaxIndexNoInherit;
|
||||
if (chkoffList != null && maxindx > 0 &&
|
||||
(pf.FormatData.ProcData.CheckOffData.Menu == "Signoff" || chkoffList[0].MenuItem.ToUpper().Equals("{SECTION DEFAULT}")))
|
||||
{
|
||||
if (SectionPropertyCheckOffList!=null)SectionPropertyCheckOffList.Clear();
|
||||
@ -688,10 +714,10 @@ namespace VEPROMS
|
||||
// Don't put up the first item in the chkoffList, it is '{Section Default}'.
|
||||
_hasSectionCheckoffDefault = false;
|
||||
//for (int i = 1; i < chkoffList.Count; i++)
|
||||
for (int i = 0; i < chkoffList.MaxIndex; i++)
|
||||
foreach (CheckOff co in chkoffList)
|
||||
{
|
||||
if (!chkoffList[i].MenuItem.ToUpper().Equals("{SECTION DEFAULT}"))
|
||||
SectionPropertyCheckOffList.Add(chkoffList[i]);
|
||||
if (!co.MenuItem.ToUpper().Equals("{SECTION DEFAULT}"))
|
||||
SectionPropertyCheckOffList.Add(co);
|
||||
else
|
||||
_hasSectionCheckoffDefault = true;
|
||||
}
|
||||
|
350
PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs
generated
350
PROMS/VEPROMS User Interface/frmSysOptions.Designer.cs
generated
@ -42,6 +42,12 @@ namespace VEPROMS
|
||||
this.btnGeneral = new DevComponents.DotNetBar.ButtonX();
|
||||
this.tcSysOpts = new DevComponents.DotNetBar.TabControl();
|
||||
this.tabControlPanel3 = new DevComponents.DotNetBar.TabControlPanel();
|
||||
this.grPanUCFImpOpt = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
this.cbUCFLForSetOnly = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.cbUCFLUseAll = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.cbUCFLOnlyImport = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.cbUCFLNotUsed = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.cbUCFIgnore = new DevComponents.DotNetBar.Controls.CheckBoxX();
|
||||
this.gpVisioPath = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
this.txbxVisioPath = new DevComponents.DotNetBar.Controls.TextBoxX();
|
||||
this.gpSeparateWindows = new DevComponents.DotNetBar.Controls.GroupPanel();
|
||||
@ -75,6 +81,7 @@ namespace VEPROMS
|
||||
((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).BeginInit();
|
||||
this.tcSysOpts.SuspendLayout();
|
||||
this.tabControlPanel3.SuspendLayout();
|
||||
this.grPanUCFImpOpt.SuspendLayout();
|
||||
this.gpVisioPath.SuspendLayout();
|
||||
this.gpSeparateWindows.SuspendLayout();
|
||||
this.gpEnhancedDocs.SuspendLayout();
|
||||
@ -90,10 +97,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.btnCancel.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Location = new System.Drawing.Point(616, 492);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnCancel.Location = new System.Drawing.Point(821, 606);
|
||||
this.btnCancel.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(56, 19);
|
||||
this.btnCancel.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnCancel.TabIndex = 0;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
@ -101,10 +108,10 @@ namespace VEPROMS
|
||||
// btnOK
|
||||
//
|
||||
this.btnOK.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnOK.Location = new System.Drawing.Point(542, 492);
|
||||
this.btnOK.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnOK.Location = new System.Drawing.Point(723, 606);
|
||||
this.btnOK.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnOK.Name = "btnOK";
|
||||
this.btnOK.Size = new System.Drawing.Size(56, 19);
|
||||
this.btnOK.Size = new System.Drawing.Size(75, 23);
|
||||
this.btnOK.TabIndex = 1;
|
||||
this.btnOK.Text = "OK";
|
||||
this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
|
||||
@ -118,10 +125,10 @@ namespace VEPROMS
|
||||
this.gpSystemColor.Controls.Add(this.cbRibonSilver);
|
||||
this.gpSystemColor.Controls.Add(this.cbRibonBlue);
|
||||
this.gpSystemColor.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpSystemColor.Location = new System.Drawing.Point(39, 13);
|
||||
this.gpSystemColor.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpSystemColor.Location = new System.Drawing.Point(52, 16);
|
||||
this.gpSystemColor.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpSystemColor.Name = "gpSystemColor";
|
||||
this.gpSystemColor.Size = new System.Drawing.Size(82, 97);
|
||||
this.gpSystemColor.Size = new System.Drawing.Size(109, 119);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -161,10 +168,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbRibonBlack.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbRibonBlack.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbRibonBlack.Location = new System.Drawing.Point(7, 54);
|
||||
this.cbRibonBlack.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbRibonBlack.Location = new System.Drawing.Point(9, 66);
|
||||
this.cbRibonBlack.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbRibonBlack.Name = "cbRibonBlack";
|
||||
this.cbRibonBlack.Size = new System.Drawing.Size(67, 19);
|
||||
this.cbRibonBlack.Size = new System.Drawing.Size(89, 23);
|
||||
this.cbRibonBlack.TabIndex = 2;
|
||||
this.cbRibonBlack.Text = "Black";
|
||||
this.cbRibonBlack.CheckedChanged += new System.EventHandler(this.cbRibonBlack_CheckedChanged);
|
||||
@ -177,10 +184,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbRibonSilver.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbRibonSilver.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbRibonSilver.Location = new System.Drawing.Point(7, 30);
|
||||
this.cbRibonSilver.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbRibonSilver.Location = new System.Drawing.Point(9, 37);
|
||||
this.cbRibonSilver.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbRibonSilver.Name = "cbRibonSilver";
|
||||
this.cbRibonSilver.Size = new System.Drawing.Size(67, 19);
|
||||
this.cbRibonSilver.Size = new System.Drawing.Size(89, 23);
|
||||
this.cbRibonSilver.TabIndex = 1;
|
||||
this.cbRibonSilver.Text = "Silver";
|
||||
this.cbRibonSilver.CheckedChanged += new System.EventHandler(this.cbRibonSilver_CheckedChanged);
|
||||
@ -193,10 +200,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbRibonBlue.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbRibonBlue.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbRibonBlue.Location = new System.Drawing.Point(7, 6);
|
||||
this.cbRibonBlue.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbRibonBlue.Location = new System.Drawing.Point(9, 7);
|
||||
this.cbRibonBlue.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbRibonBlue.Name = "cbRibonBlue";
|
||||
this.cbRibonBlue.Size = new System.Drawing.Size(67, 19);
|
||||
this.cbRibonBlue.Size = new System.Drawing.Size(89, 23);
|
||||
this.cbRibonBlue.TabIndex = 0;
|
||||
this.cbRibonBlue.Text = "Blue";
|
||||
this.cbRibonBlue.CheckedChanged += new System.EventHandler(this.cbRibonBlue_CheckedChanged);
|
||||
@ -208,10 +215,10 @@ namespace VEPROMS
|
||||
this.panButtons.Controls.Add(this.btnStartMsg);
|
||||
this.panButtons.Controls.Add(this.btnGeneral);
|
||||
this.panButtons.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.panButtons.Location = new System.Drawing.Point(14, 14);
|
||||
this.panButtons.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.panButtons.Location = new System.Drawing.Point(19, 17);
|
||||
this.panButtons.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.panButtons.Name = "panButtons";
|
||||
this.panButtons.Size = new System.Drawing.Size(168, 460);
|
||||
this.panButtons.Size = new System.Drawing.Size(224, 566);
|
||||
this.panButtons.Style.Alignment = System.Drawing.StringAlignment.Center;
|
||||
this.panButtons.Style.BackColor1.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
||||
this.panButtons.Style.BackColor2.ColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
|
||||
@ -229,10 +236,10 @@ namespace VEPROMS
|
||||
this.btnIntrFaceStngs.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnIntrFaceStngs.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnIntrFaceStngs.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.btnIntrFaceStngs.Location = new System.Drawing.Point(0, 38);
|
||||
this.btnIntrFaceStngs.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnIntrFaceStngs.Location = new System.Drawing.Point(0, 46);
|
||||
this.btnIntrFaceStngs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnIntrFaceStngs.Name = "btnIntrFaceStngs";
|
||||
this.btnIntrFaceStngs.Size = new System.Drawing.Size(168, 19);
|
||||
this.btnIntrFaceStngs.Size = new System.Drawing.Size(224, 23);
|
||||
this.btnIntrFaceStngs.TabIndex = 2;
|
||||
this.btnIntrFaceStngs.Text = "My Interface Settings";
|
||||
this.btnIntrFaceStngs.Click += new System.EventHandler(this.btnIntrFaceStngs_Click);
|
||||
@ -242,10 +249,10 @@ namespace VEPROMS
|
||||
this.btnStartMsg.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnStartMsg.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnStartMsg.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.btnStartMsg.Location = new System.Drawing.Point(0, 19);
|
||||
this.btnStartMsg.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnStartMsg.Location = new System.Drawing.Point(0, 23);
|
||||
this.btnStartMsg.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnStartMsg.Name = "btnStartMsg";
|
||||
this.btnStartMsg.Size = new System.Drawing.Size(168, 19);
|
||||
this.btnStartMsg.Size = new System.Drawing.Size(224, 23);
|
||||
this.btnStartMsg.TabIndex = 1;
|
||||
this.btnStartMsg.Text = "Startup Message";
|
||||
this.btnStartMsg.Visible = false;
|
||||
@ -257,9 +264,9 @@ namespace VEPROMS
|
||||
this.btnGeneral.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnGeneral.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.btnGeneral.Location = new System.Drawing.Point(0, 0);
|
||||
this.btnGeneral.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnGeneral.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnGeneral.Name = "btnGeneral";
|
||||
this.btnGeneral.Size = new System.Drawing.Size(168, 19);
|
||||
this.btnGeneral.Size = new System.Drawing.Size(224, 23);
|
||||
this.btnGeneral.TabIndex = 0;
|
||||
this.btnGeneral.Text = "General";
|
||||
this.btnGeneral.Visible = false;
|
||||
@ -272,12 +279,12 @@ namespace VEPROMS
|
||||
this.tcSysOpts.Controls.Add(this.tabControlPanel3);
|
||||
this.tcSysOpts.Controls.Add(this.tabControlPanel1);
|
||||
this.tcSysOpts.Controls.Add(this.tabControlPanel2);
|
||||
this.tcSysOpts.Location = new System.Drawing.Point(27, 17);
|
||||
this.tcSysOpts.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tcSysOpts.Location = new System.Drawing.Point(36, 21);
|
||||
this.tcSysOpts.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.tcSysOpts.Name = "tcSysOpts";
|
||||
this.tcSysOpts.SelectedTabFont = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Bold);
|
||||
this.tcSysOpts.SelectedTabIndex = 2;
|
||||
this.tcSysOpts.Size = new System.Drawing.Size(645, 457);
|
||||
this.tcSysOpts.Size = new System.Drawing.Size(860, 562);
|
||||
this.tcSysOpts.TabIndex = 3;
|
||||
this.tcSysOpts.TabLayoutType = DevComponents.DotNetBar.eTabLayoutType.FixedWithNavigationBox;
|
||||
this.tcSysOpts.Tabs.Add(this.tiGeneral);
|
||||
@ -289,6 +296,7 @@ namespace VEPROMS
|
||||
//
|
||||
// tabControlPanel3
|
||||
//
|
||||
this.tabControlPanel3.Controls.Add(this.grPanUCFImpOpt);
|
||||
this.tabControlPanel3.Controls.Add(this.gpVisioPath);
|
||||
this.tabControlPanel3.Controls.Add(this.gpSeparateWindows);
|
||||
this.tabControlPanel3.Controls.Add(this.gpEnhancedDocs);
|
||||
@ -302,10 +310,10 @@ namespace VEPROMS
|
||||
this.tabControlPanel3.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.tabControlPanel3.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControlPanel3.Location = new System.Drawing.Point(0, 27);
|
||||
this.tabControlPanel3.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tabControlPanel3.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.tabControlPanel3.Name = "tabControlPanel3";
|
||||
this.tabControlPanel3.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.tabControlPanel3.Size = new System.Drawing.Size(645, 430);
|
||||
this.tabControlPanel3.Size = new System.Drawing.Size(860, 535);
|
||||
this.tabControlPanel3.Style.BackColor1.Color = System.Drawing.SystemColors.Control;
|
||||
this.tabControlPanel3.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.tabControlPanel3.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
|
||||
@ -315,6 +323,130 @@ namespace VEPROMS
|
||||
this.tabControlPanel3.TabItem = this.tiIntrFaceStngs;
|
||||
this.tabControlPanel3.ThemeAware = true;
|
||||
//
|
||||
// grPanUCFImpOpt
|
||||
//
|
||||
this.grPanUCFImpOpt.CanvasColor = System.Drawing.SystemColors.Control;
|
||||
this.grPanUCFImpOpt.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.grPanUCFImpOpt.Controls.Add(this.cbUCFLForSetOnly);
|
||||
this.grPanUCFImpOpt.Controls.Add(this.cbUCFLUseAll);
|
||||
this.grPanUCFImpOpt.Controls.Add(this.cbUCFLOnlyImport);
|
||||
this.grPanUCFImpOpt.Controls.Add(this.cbUCFLNotUsed);
|
||||
this.grPanUCFImpOpt.Controls.Add(this.cbUCFIgnore);
|
||||
this.grPanUCFImpOpt.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.grPanUCFImpOpt.Location = new System.Drawing.Point(417, 15);
|
||||
this.grPanUCFImpOpt.Name = "grPanUCFImpOpt";
|
||||
this.grPanUCFImpOpt.Size = new System.Drawing.Size(195, 170);
|
||||
//
|
||||
//
|
||||
//
|
||||
this.grPanUCFImpOpt.Style.BackColor2SchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground2;
|
||||
this.grPanUCFImpOpt.Style.BackColorGradientAngle = 90;
|
||||
this.grPanUCFImpOpt.Style.BackColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBackground;
|
||||
this.grPanUCFImpOpt.Style.BorderBottom = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.grPanUCFImpOpt.Style.BorderBottomWidth = 1;
|
||||
this.grPanUCFImpOpt.Style.BorderColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelBorder;
|
||||
this.grPanUCFImpOpt.Style.BorderLeft = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.grPanUCFImpOpt.Style.BorderLeftWidth = 1;
|
||||
this.grPanUCFImpOpt.Style.BorderRight = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.grPanUCFImpOpt.Style.BorderRightWidth = 1;
|
||||
this.grPanUCFImpOpt.Style.BorderTop = DevComponents.DotNetBar.eStyleBorderType.Solid;
|
||||
this.grPanUCFImpOpt.Style.BorderTopWidth = 1;
|
||||
this.grPanUCFImpOpt.Style.CornerDiameter = 4;
|
||||
this.grPanUCFImpOpt.Style.CornerType = DevComponents.DotNetBar.eCornerType.Rounded;
|
||||
this.grPanUCFImpOpt.Style.TextAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Center;
|
||||
this.grPanUCFImpOpt.Style.TextColorSchemePart = DevComponents.DotNetBar.eColorSchemePart.PanelText;
|
||||
this.grPanUCFImpOpt.Style.TextLineAlignment = DevComponents.DotNetBar.eStyleTextAlignment.Near;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.grPanUCFImpOpt.StyleMouseDown.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.grPanUCFImpOpt.StyleMouseOver.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.grPanUCFImpOpt.TabIndex = 12;
|
||||
this.grPanUCFImpOpt.Text = "UCF Import Options";
|
||||
//
|
||||
// cbUCFLForSetOnly
|
||||
//
|
||||
this.cbUCFLForSetOnly.BackColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.cbUCFLForSetOnly.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbUCFLForSetOnly.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbUCFLForSetOnly.Location = new System.Drawing.Point(3, 110);
|
||||
this.cbUCFLForSetOnly.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbUCFLForSetOnly.Name = "cbUCFLForSetOnly";
|
||||
this.cbUCFLForSetOnly.Size = new System.Drawing.Size(140, 23);
|
||||
this.cbUCFLForSetOnly.TabIndex = 5;
|
||||
this.cbUCFLForSetOnly.Text = "Load For Set Only";
|
||||
this.cbUCFLForSetOnly.CheckedChanged += new System.EventHandler(this.cbUCFLForSetOnly_CheckedChanged);
|
||||
//
|
||||
// cbUCFLUseAll
|
||||
//
|
||||
this.cbUCFLUseAll.BackColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.cbUCFLUseAll.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbUCFLUseAll.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbUCFLUseAll.Location = new System.Drawing.Point(3, 83);
|
||||
this.cbUCFLUseAll.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbUCFLUseAll.Name = "cbUCFLUseAll";
|
||||
this.cbUCFLUseAll.Size = new System.Drawing.Size(140, 23);
|
||||
this.cbUCFLUseAll.TabIndex = 4;
|
||||
this.cbUCFLUseAll.Text = "Load Use All";
|
||||
this.cbUCFLUseAll.CheckedChanged += new System.EventHandler(this.cbUCFLUseAll_CheckedChanged);
|
||||
//
|
||||
// cbUCFLOnlyImport
|
||||
//
|
||||
this.cbUCFLOnlyImport.BackColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.cbUCFLOnlyImport.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbUCFLOnlyImport.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbUCFLOnlyImport.Location = new System.Drawing.Point(3, 56);
|
||||
this.cbUCFLOnlyImport.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbUCFLOnlyImport.Name = "cbUCFLOnlyImport";
|
||||
this.cbUCFLOnlyImport.Size = new System.Drawing.Size(140, 23);
|
||||
this.cbUCFLOnlyImport.TabIndex = 3;
|
||||
this.cbUCFLOnlyImport.Text = "Load Only Imported";
|
||||
this.cbUCFLOnlyImport.CheckedChanged += new System.EventHandler(this.cbUCFLOnlyImport_CheckedChanged);
|
||||
//
|
||||
// cbUCFLNotUsed
|
||||
//
|
||||
this.cbUCFLNotUsed.BackColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.cbUCFLNotUsed.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbUCFLNotUsed.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbUCFLNotUsed.Location = new System.Drawing.Point(3, 29);
|
||||
this.cbUCFLNotUsed.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbUCFLNotUsed.Name = "cbUCFLNotUsed";
|
||||
this.cbUCFLNotUsed.Size = new System.Drawing.Size(118, 23);
|
||||
this.cbUCFLNotUsed.TabIndex = 2;
|
||||
this.cbUCFLNotUsed.Text = "Load Not Used";
|
||||
this.cbUCFLNotUsed.CheckedChanged += new System.EventHandler(this.cbUCFLNotUsed_CheckedChanged);
|
||||
//
|
||||
// cbUCFIgnore
|
||||
//
|
||||
this.cbUCFIgnore.BackColor = System.Drawing.Color.Transparent;
|
||||
//
|
||||
//
|
||||
//
|
||||
this.cbUCFIgnore.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbUCFIgnore.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbUCFIgnore.Location = new System.Drawing.Point(3, 2);
|
||||
this.cbUCFIgnore.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbUCFIgnore.Name = "cbUCFIgnore";
|
||||
this.cbUCFIgnore.Size = new System.Drawing.Size(89, 23);
|
||||
this.cbUCFIgnore.TabIndex = 1;
|
||||
this.cbUCFIgnore.Text = "Ignore";
|
||||
this.cbUCFIgnore.CheckedChanged += new System.EventHandler(this.cbUCFIgnore_CheckedChanged);
|
||||
//
|
||||
// gpVisioPath
|
||||
//
|
||||
this.gpVisioPath.BackColor = System.Drawing.Color.Transparent;
|
||||
@ -322,10 +454,10 @@ namespace VEPROMS
|
||||
this.gpVisioPath.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpVisioPath.Controls.Add(this.txbxVisioPath);
|
||||
this.gpVisioPath.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpVisioPath.Location = new System.Drawing.Point(25, 343);
|
||||
this.gpVisioPath.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpVisioPath.Location = new System.Drawing.Point(33, 427);
|
||||
this.gpVisioPath.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpVisioPath.Name = "gpVisioPath";
|
||||
this.gpVisioPath.Size = new System.Drawing.Size(285, 69);
|
||||
this.gpVisioPath.Size = new System.Drawing.Size(380, 85);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -364,12 +496,13 @@ namespace VEPROMS
|
||||
//
|
||||
this.txbxVisioPath.Border.Class = "TextBoxBorder";
|
||||
this.txbxVisioPath.Border.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.txbxVisioPath.Location = new System.Drawing.Point(8, 13);
|
||||
this.txbxVisioPath.Location = new System.Drawing.Point(11, 16);
|
||||
this.txbxVisioPath.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.txbxVisioPath.Name = "txbxVisioPath";
|
||||
this.txbxVisioPath.PreventEnterBeep = true;
|
||||
this.txbxVisioPath.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
|
||||
this.txbxVisioPath.ShortcutsEnabled = false;
|
||||
this.txbxVisioPath.Size = new System.Drawing.Size(263, 20);
|
||||
this.txbxVisioPath.Size = new System.Drawing.Size(351, 22);
|
||||
this.superTooltip1.SetSuperTooltip(this.txbxVisioPath, new DevComponents.DotNetBar.SuperTooltipInfo("Visio Path", "", "PROMS wil use this specified path to open Visio for use with inserting the Equati" +
|
||||
"on sub step type.\r\n\r\nIf this is blank, then PROMS will look in the registry for " +
|
||||
"the path to Visio.\r\n\r\n", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, false, new System.Drawing.Size(300, 115)));
|
||||
@ -384,10 +517,10 @@ namespace VEPROMS
|
||||
this.gpSeparateWindows.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpSeparateWindows.Controls.Add(this.cbSeparateWindows);
|
||||
this.gpSeparateWindows.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpSeparateWindows.Location = new System.Drawing.Point(313, 244);
|
||||
this.gpSeparateWindows.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpSeparateWindows.Location = new System.Drawing.Point(417, 310);
|
||||
this.gpSeparateWindows.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpSeparateWindows.Name = "gpSeparateWindows";
|
||||
this.gpSeparateWindows.Size = new System.Drawing.Size(127, 81);
|
||||
this.gpSeparateWindows.Size = new System.Drawing.Size(169, 100);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -426,10 +559,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbSeparateWindows.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbSeparateWindows.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbSeparateWindows.Location = new System.Drawing.Point(8, 8);
|
||||
this.cbSeparateWindows.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbSeparateWindows.Location = new System.Drawing.Point(11, 10);
|
||||
this.cbSeparateWindows.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbSeparateWindows.Name = "cbSeparateWindows";
|
||||
this.cbSeparateWindows.Size = new System.Drawing.Size(107, 19);
|
||||
this.cbSeparateWindows.Size = new System.Drawing.Size(143, 23);
|
||||
this.cbSeparateWindows.TabIndex = 9;
|
||||
this.cbSeparateWindows.Text = "By Procedure Set";
|
||||
this.cbSeparateWindows.CheckedChanged += new System.EventHandler(this.cbSeparateWindows_CheckedChanged);
|
||||
@ -441,10 +574,10 @@ namespace VEPROMS
|
||||
this.gpEnhancedDocs.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpEnhancedDocs.Controls.Add(this.cbEnhancedDocumentSync);
|
||||
this.gpEnhancedDocs.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpEnhancedDocs.Location = new System.Drawing.Point(167, 244);
|
||||
this.gpEnhancedDocs.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpEnhancedDocs.Location = new System.Drawing.Point(223, 310);
|
||||
this.gpEnhancedDocs.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpEnhancedDocs.Name = "gpEnhancedDocs";
|
||||
this.gpEnhancedDocs.Size = new System.Drawing.Size(127, 81);
|
||||
this.gpEnhancedDocs.Size = new System.Drawing.Size(169, 100);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -486,10 +619,10 @@ namespace VEPROMS
|
||||
this.cbEnhancedDocumentSync.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbEnhancedDocumentSync.CheckValue = "Y";
|
||||
this.cbEnhancedDocumentSync.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbEnhancedDocumentSync.Location = new System.Drawing.Point(8, 8);
|
||||
this.cbEnhancedDocumentSync.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbEnhancedDocumentSync.Location = new System.Drawing.Point(11, 10);
|
||||
this.cbEnhancedDocumentSync.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbEnhancedDocumentSync.Name = "cbEnhancedDocumentSync";
|
||||
this.cbEnhancedDocumentSync.Size = new System.Drawing.Size(99, 19);
|
||||
this.cbEnhancedDocumentSync.Size = new System.Drawing.Size(132, 23);
|
||||
this.cbEnhancedDocumentSync.TabIndex = 9;
|
||||
this.cbEnhancedDocumentSync.Text = "Sync Navigation";
|
||||
//
|
||||
@ -501,10 +634,10 @@ namespace VEPROMS
|
||||
this.gpPasteSettings.Controls.Add(this.cbPastePlainText);
|
||||
this.gpPasteSettings.Controls.Add(this.cbPasteNoReturns);
|
||||
this.gpPasteSettings.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpPasteSettings.Location = new System.Drawing.Point(25, 244);
|
||||
this.gpPasteSettings.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpPasteSettings.Location = new System.Drawing.Point(33, 310);
|
||||
this.gpPasteSettings.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpPasteSettings.Name = "gpPasteSettings";
|
||||
this.gpPasteSettings.Size = new System.Drawing.Size(119, 81);
|
||||
this.gpPasteSettings.Size = new System.Drawing.Size(159, 100);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -546,10 +679,10 @@ namespace VEPROMS
|
||||
this.cbPastePlainText.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbPastePlainText.CheckValue = "Y";
|
||||
this.cbPastePlainText.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbPastePlainText.Location = new System.Drawing.Point(8, 8);
|
||||
this.cbPastePlainText.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbPastePlainText.Location = new System.Drawing.Point(11, 10);
|
||||
this.cbPastePlainText.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbPastePlainText.Name = "cbPastePlainText";
|
||||
this.cbPastePlainText.Size = new System.Drawing.Size(92, 19);
|
||||
this.cbPastePlainText.Size = new System.Drawing.Size(123, 23);
|
||||
this.cbPastePlainText.TabIndex = 9;
|
||||
this.cbPastePlainText.Text = "Plain Text";
|
||||
this.cbPastePlainText.CheckedChanged += new System.EventHandler(this.cbPastePlainText_CheckedChanged);
|
||||
@ -564,10 +697,10 @@ namespace VEPROMS
|
||||
this.cbPasteNoReturns.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbPasteNoReturns.CheckValue = "Y";
|
||||
this.cbPasteNoReturns.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbPasteNoReturns.Location = new System.Drawing.Point(8, 28);
|
||||
this.cbPasteNoReturns.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbPasteNoReturns.Location = new System.Drawing.Point(11, 34);
|
||||
this.cbPasteNoReturns.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbPasteNoReturns.Name = "cbPasteNoReturns";
|
||||
this.cbPasteNoReturns.Size = new System.Drawing.Size(92, 19);
|
||||
this.cbPasteNoReturns.Size = new System.Drawing.Size(123, 23);
|
||||
this.cbPasteNoReturns.TabIndex = 10;
|
||||
this.cbPasteNoReturns.Text = "No Returns";
|
||||
this.cbPasteNoReturns.CheckedChanged += new System.EventHandler(this.cbPasteNoReturns_CheckedChanged);
|
||||
@ -579,10 +712,10 @@ namespace VEPROMS
|
||||
this.gpTreeView.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpTreeView.Controls.Add(this.cbTVExpand);
|
||||
this.gpTreeView.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpTreeView.Location = new System.Drawing.Point(312, 150);
|
||||
this.gpTreeView.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpTreeView.Location = new System.Drawing.Point(416, 203);
|
||||
this.gpTreeView.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpTreeView.Name = "gpTreeView";
|
||||
this.gpTreeView.Size = new System.Drawing.Size(119, 72);
|
||||
this.gpTreeView.Size = new System.Drawing.Size(159, 89);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -624,10 +757,10 @@ namespace VEPROMS
|
||||
this.cbTVExpand.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbTVExpand.CheckValue = "Y";
|
||||
this.cbTVExpand.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbTVExpand.Location = new System.Drawing.Point(8, 13);
|
||||
this.cbTVExpand.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbTVExpand.Location = new System.Drawing.Point(11, 16);
|
||||
this.cbTVExpand.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbTVExpand.Name = "cbTVExpand";
|
||||
this.cbTVExpand.Size = new System.Drawing.Size(92, 19);
|
||||
this.cbTVExpand.Size = new System.Drawing.Size(123, 23);
|
||||
this.superTooltip1.SetSuperTooltip(this.cbTVExpand, new DevComponents.DotNetBar.SuperTooltipInfo("Remember Last", "", "When checked, PROMS will remember the last procedure you had seleced from the tre" +
|
||||
"e and expand the tree to that location the next time PROMS is started.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(200, 130)));
|
||||
this.cbTVExpand.TabIndex = 7;
|
||||
@ -641,10 +774,10 @@ namespace VEPROMS
|
||||
this.gpStepTypeToolTip.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpStepTypeToolTip.Controls.Add(this.cbStepTypeToolTip);
|
||||
this.gpStepTypeToolTip.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpStepTypeToolTip.Location = new System.Drawing.Point(167, 150);
|
||||
this.gpStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpStepTypeToolTip.Location = new System.Drawing.Point(223, 203);
|
||||
this.gpStepTypeToolTip.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpStepTypeToolTip.Name = "gpStepTypeToolTip";
|
||||
this.gpStepTypeToolTip.Size = new System.Drawing.Size(119, 72);
|
||||
this.gpStepTypeToolTip.Size = new System.Drawing.Size(159, 89);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -683,10 +816,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbStepTypeToolTip.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbStepTypeToolTip.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbStepTypeToolTip.Location = new System.Drawing.Point(8, 13);
|
||||
this.cbStepTypeToolTip.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbStepTypeToolTip.Location = new System.Drawing.Point(11, 16);
|
||||
this.cbStepTypeToolTip.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbStepTypeToolTip.Name = "cbStepTypeToolTip";
|
||||
this.cbStepTypeToolTip.Size = new System.Drawing.Size(92, 19);
|
||||
this.cbStepTypeToolTip.Size = new System.Drawing.Size(123, 23);
|
||||
this.cbStepTypeToolTip.TabIndex = 7;
|
||||
this.cbStepTypeToolTip.Text = "Show Tool Tip";
|
||||
this.cbStepTypeToolTip.CheckedChanged += new System.EventHandler(this.cbStepTypeToolTip_CheckedChanged);
|
||||
@ -698,10 +831,10 @@ namespace VEPROMS
|
||||
this.gpAnnotationSettings.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpAnnotationSettings.Controls.Add(this.cbAnnotationPopup);
|
||||
this.gpAnnotationSettings.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpAnnotationSettings.Location = new System.Drawing.Point(25, 150);
|
||||
this.gpAnnotationSettings.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpAnnotationSettings.Location = new System.Drawing.Point(33, 203);
|
||||
this.gpAnnotationSettings.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpAnnotationSettings.Name = "gpAnnotationSettings";
|
||||
this.gpAnnotationSettings.Size = new System.Drawing.Size(119, 72);
|
||||
this.gpAnnotationSettings.Size = new System.Drawing.Size(159, 89);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -743,10 +876,10 @@ namespace VEPROMS
|
||||
this.cbAnnotationPopup.CheckState = System.Windows.Forms.CheckState.Checked;
|
||||
this.cbAnnotationPopup.CheckValue = "Y";
|
||||
this.cbAnnotationPopup.Font = new System.Drawing.Font("Microsoft Sans Serif", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.cbAnnotationPopup.Location = new System.Drawing.Point(8, 13);
|
||||
this.cbAnnotationPopup.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbAnnotationPopup.Location = new System.Drawing.Point(11, 16);
|
||||
this.cbAnnotationPopup.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbAnnotationPopup.Name = "cbAnnotationPopup";
|
||||
this.cbAnnotationPopup.Size = new System.Drawing.Size(92, 19);
|
||||
this.cbAnnotationPopup.Size = new System.Drawing.Size(123, 23);
|
||||
this.cbAnnotationPopup.TabIndex = 7;
|
||||
this.cbAnnotationPopup.Text = "Auto Popup";
|
||||
this.cbAnnotationPopup.CheckedChanged += new System.EventHandler(this.cbAnnotationPopup_CheckedChanged);
|
||||
@ -758,9 +891,10 @@ namespace VEPROMS
|
||||
this.gpTransRangeColor.ColorSchemeStyle = DevComponents.DotNetBar.eDotNetBarStyle.Office2007;
|
||||
this.gpTransRangeColor.Controls.Add(this.colorPickerButton1);
|
||||
this.gpTransRangeColor.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpTransRangeColor.Location = new System.Drawing.Point(303, 13);
|
||||
this.gpTransRangeColor.Location = new System.Drawing.Point(650, 16);
|
||||
this.gpTransRangeColor.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.gpTransRangeColor.Name = "gpTransRangeColor";
|
||||
this.gpTransRangeColor.Size = new System.Drawing.Size(146, 62);
|
||||
this.gpTransRangeColor.Size = new System.Drawing.Size(195, 76);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -798,10 +932,11 @@ namespace VEPROMS
|
||||
this.colorPickerButton1.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.colorPickerButton1.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.colorPickerButton1.Image = ((System.Drawing.Image)(resources.GetObject("colorPickerButton1.Image")));
|
||||
this.colorPickerButton1.Location = new System.Drawing.Point(7, 12);
|
||||
this.colorPickerButton1.Location = new System.Drawing.Point(9, 15);
|
||||
this.colorPickerButton1.Margin = new System.Windows.Forms.Padding(4);
|
||||
this.colorPickerButton1.Name = "colorPickerButton1";
|
||||
this.colorPickerButton1.SelectedColorImageRectangle = new System.Drawing.Rectangle(2, 2, 12, 12);
|
||||
this.colorPickerButton1.Size = new System.Drawing.Size(103, 23);
|
||||
this.colorPickerButton1.Size = new System.Drawing.Size(137, 28);
|
||||
this.colorPickerButton1.TabIndex = 0;
|
||||
this.colorPickerButton1.SelectedColorChanged += new System.EventHandler(this.colorPickerButton1_SelectedColorChanged);
|
||||
//
|
||||
@ -814,10 +949,10 @@ namespace VEPROMS
|
||||
this.gpPropPageStyle.Controls.Add(this.cbTabbedIntrFace);
|
||||
this.gpPropPageStyle.Controls.Add(this.cbButtonIntrFace);
|
||||
this.gpPropPageStyle.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.gpPropPageStyle.Location = new System.Drawing.Point(155, 12);
|
||||
this.gpPropPageStyle.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.gpPropPageStyle.Location = new System.Drawing.Point(207, 15);
|
||||
this.gpPropPageStyle.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.gpPropPageStyle.Name = "gpPropPageStyle";
|
||||
this.gpPropPageStyle.Size = new System.Drawing.Size(127, 107);
|
||||
this.gpPropPageStyle.Size = new System.Drawing.Size(169, 132);
|
||||
//
|
||||
//
|
||||
//
|
||||
@ -856,10 +991,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbPropGrid.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbPropGrid.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbPropGrid.Location = new System.Drawing.Point(8, 59);
|
||||
this.cbPropGrid.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbPropGrid.Location = new System.Drawing.Point(11, 73);
|
||||
this.cbPropGrid.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbPropGrid.Name = "cbPropGrid";
|
||||
this.cbPropGrid.Size = new System.Drawing.Size(97, 20);
|
||||
this.cbPropGrid.Size = new System.Drawing.Size(129, 25);
|
||||
this.cbPropGrid.TabIndex = 2;
|
||||
this.cbPropGrid.Text = "Property Grid";
|
||||
this.cbPropGrid.Visible = false;
|
||||
@ -871,10 +1006,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbTabbedIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbTabbedIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbTabbedIntrFace.Location = new System.Drawing.Point(8, 34);
|
||||
this.cbTabbedIntrFace.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbTabbedIntrFace.Location = new System.Drawing.Point(11, 42);
|
||||
this.cbTabbedIntrFace.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbTabbedIntrFace.Name = "cbTabbedIntrFace";
|
||||
this.cbTabbedIntrFace.Size = new System.Drawing.Size(111, 20);
|
||||
this.cbTabbedIntrFace.Size = new System.Drawing.Size(148, 25);
|
||||
this.cbTabbedIntrFace.TabIndex = 1;
|
||||
this.cbTabbedIntrFace.Text = "Tabbed Interface";
|
||||
//
|
||||
@ -885,10 +1020,10 @@ namespace VEPROMS
|
||||
//
|
||||
this.cbButtonIntrFace.BackgroundStyle.CornerType = DevComponents.DotNetBar.eCornerType.Square;
|
||||
this.cbButtonIntrFace.CheckBoxStyle = DevComponents.DotNetBar.eCheckBoxStyle.RadioButton;
|
||||
this.cbButtonIntrFace.Location = new System.Drawing.Point(8, 10);
|
||||
this.cbButtonIntrFace.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.cbButtonIntrFace.Location = new System.Drawing.Point(11, 12);
|
||||
this.cbButtonIntrFace.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.cbButtonIntrFace.Name = "cbButtonIntrFace";
|
||||
this.cbButtonIntrFace.Size = new System.Drawing.Size(97, 20);
|
||||
this.cbButtonIntrFace.Size = new System.Drawing.Size(129, 25);
|
||||
this.cbButtonIntrFace.TabIndex = 0;
|
||||
this.cbButtonIntrFace.Text = "Button Interface";
|
||||
//
|
||||
@ -903,10 +1038,10 @@ namespace VEPROMS
|
||||
this.tabControlPanel1.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.tabControlPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControlPanel1.Location = new System.Drawing.Point(0, 27);
|
||||
this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tabControlPanel1.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.tabControlPanel1.Name = "tabControlPanel1";
|
||||
this.tabControlPanel1.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.tabControlPanel1.Size = new System.Drawing.Size(645, 430);
|
||||
this.tabControlPanel1.Size = new System.Drawing.Size(860, 535);
|
||||
this.tabControlPanel1.Style.BackColor1.Color = System.Drawing.SystemColors.Control;
|
||||
this.tabControlPanel1.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.tabControlPanel1.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
|
||||
@ -928,10 +1063,10 @@ namespace VEPROMS
|
||||
this.tabControlPanel2.DisabledBackColor = System.Drawing.Color.Empty;
|
||||
this.tabControlPanel2.Dock = System.Windows.Forms.DockStyle.Fill;
|
||||
this.tabControlPanel2.Location = new System.Drawing.Point(0, 27);
|
||||
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.tabControlPanel2.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.tabControlPanel2.Name = "tabControlPanel2";
|
||||
this.tabControlPanel2.Padding = new System.Windows.Forms.Padding(1);
|
||||
this.tabControlPanel2.Size = new System.Drawing.Size(645, 430);
|
||||
this.tabControlPanel2.Size = new System.Drawing.Size(860, 535);
|
||||
this.tabControlPanel2.Style.BackColor1.Color = System.Drawing.SystemColors.Control;
|
||||
this.tabControlPanel2.Style.Border = DevComponents.DotNetBar.eBorderType.SingleLine;
|
||||
this.tabControlPanel2.Style.BorderSide = ((DevComponents.DotNetBar.eBorderSide)(((DevComponents.DotNetBar.eBorderSide.Left | DevComponents.DotNetBar.eBorderSide.Right)
|
||||
@ -952,11 +1087,11 @@ namespace VEPROMS
|
||||
//
|
||||
this.btnReset.AccessibleRole = System.Windows.Forms.AccessibleRole.PushButton;
|
||||
this.btnReset.ColorTable = DevComponents.DotNetBar.eButtonColor.OrangeWithBackground;
|
||||
this.btnReset.Location = new System.Drawing.Point(194, 492);
|
||||
this.btnReset.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.btnReset.Location = new System.Drawing.Point(259, 606);
|
||||
this.btnReset.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.btnReset.Name = "btnReset";
|
||||
this.btnReset.RightToLeft = System.Windows.Forms.RightToLeft.Yes;
|
||||
this.btnReset.Size = new System.Drawing.Size(79, 19);
|
||||
this.btnReset.Size = new System.Drawing.Size(105, 23);
|
||||
this.superTooltip1.SetSuperTooltip(this.btnReset, new DevComponents.DotNetBar.SuperTooltipInfo("Default Settings", "", "This will reset saved user settings back to the Proms system default.", null, null, DevComponents.DotNetBar.eTooltipColor.Gray, true, true, new System.Drawing.Size(140, 95)));
|
||||
this.btnReset.TabIndex = 3;
|
||||
this.btnReset.Text = "Default Settings";
|
||||
@ -970,10 +1105,10 @@ namespace VEPROMS
|
||||
// frmSysOptions
|
||||
//
|
||||
this.AcceptButton = this.btnOK;
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.CancelButton = this.btnCancel;
|
||||
this.ClientSize = new System.Drawing.Size(699, 520);
|
||||
this.ClientSize = new System.Drawing.Size(932, 640);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.btnReset);
|
||||
this.Controls.Add(this.tcSysOpts);
|
||||
@ -982,7 +1117,7 @@ namespace VEPROMS
|
||||
this.Controls.Add(this.btnCancel);
|
||||
this.DoubleBuffered = true;
|
||||
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
|
||||
this.Margin = new System.Windows.Forms.Padding(2);
|
||||
this.Margin = new System.Windows.Forms.Padding(3, 2, 3, 2);
|
||||
this.Name = "frmSysOptions";
|
||||
this.Text = "Proms System Options";
|
||||
this.Load += new System.EventHandler(this.frmSysOptions_Load);
|
||||
@ -991,6 +1126,7 @@ namespace VEPROMS
|
||||
((System.ComponentModel.ISupportInitialize)(this.tcSysOpts)).EndInit();
|
||||
this.tcSysOpts.ResumeLayout(false);
|
||||
this.tabControlPanel3.ResumeLayout(false);
|
||||
this.grPanUCFImpOpt.ResumeLayout(false);
|
||||
this.gpVisioPath.ResumeLayout(false);
|
||||
this.gpSeparateWindows.ResumeLayout(false);
|
||||
this.gpEnhancedDocs.ResumeLayout(false);
|
||||
@ -1047,6 +1183,12 @@ namespace VEPROMS
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbSeparateWindows;
|
||||
private DevComponents.DotNetBar.Controls.GroupPanel gpVisioPath;
|
||||
private DevComponents.DotNetBar.Controls.TextBoxX txbxVisioPath;
|
||||
private DevComponents.DotNetBar.Controls.GroupPanel grPanUCFImpOpt;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLForSetOnly;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLUseAll;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLOnlyImport;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFLNotUsed;
|
||||
private DevComponents.DotNetBar.Controls.CheckBoxX cbUCFIgnore;
|
||||
|
||||
|
||||
|
||||
|
@ -70,6 +70,25 @@ namespace VEPROMS
|
||||
cbEnhancedDocumentSync.Checked = Settings.Default.SyncEnhancedDocuments;
|
||||
cbSeparateWindows.Checked = Settings.Default.SeparateWindows;
|
||||
txbxVisioPath.Text = Settings.Default.VisioPath;
|
||||
switch (Settings.Default.UCFImportOpt) // see dlgExportImport for descripton of these options.
|
||||
{
|
||||
case 0:
|
||||
cbUCFIgnore.Checked = true;
|
||||
break;
|
||||
case 1:
|
||||
cbUCFLNotUsed.Checked = true;
|
||||
break;
|
||||
case 2:
|
||||
cbUCFLOnlyImport.Checked = true;
|
||||
break;
|
||||
case 3:
|
||||
cbUCFLUseAll.Checked = true;
|
||||
break;
|
||||
case 4:
|
||||
cbUCFLForSetOnly.Checked = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
private void cbEnhancedDocumentSync_CheckedChanged(object sender, System.EventArgs e)
|
||||
{
|
||||
@ -147,6 +166,7 @@ namespace VEPROMS
|
||||
private bool ss_SyncEnhancedDocuments;
|
||||
private bool ss_SeparateWindows;
|
||||
private string ss_VisioPath;
|
||||
private int ss_UCFImportOpt;
|
||||
|
||||
private void SaveStartingSettings()
|
||||
{
|
||||
@ -161,6 +181,7 @@ namespace VEPROMS
|
||||
ss_SyncEnhancedDocuments = Settings.Default.SyncEnhancedDocuments;
|
||||
ss_SeparateWindows = Settings.Default.SeparateWindows;
|
||||
ss_VisioPath = Settings.Default.VisioPath;
|
||||
ss_UCFImportOpt = Settings.Default.UCFImportOpt;
|
||||
}
|
||||
|
||||
private void RestoreStartingSettings() // used with the cancel button
|
||||
@ -176,6 +197,7 @@ namespace VEPROMS
|
||||
Settings.Default.SyncEnhancedDocuments = ss_SyncEnhancedDocuments;
|
||||
Settings.Default.SeparateWindows = ss_SeparateWindows;
|
||||
Settings.Default.VisioPath = ss_VisioPath;
|
||||
Settings.Default.UCFImportOpt = ss_UCFImportOpt;
|
||||
}
|
||||
|
||||
|
||||
@ -262,5 +284,45 @@ namespace VEPROMS
|
||||
{
|
||||
Settings.Default.VisioPath = txbxVisioPath.Text;
|
||||
}
|
||||
|
||||
private void cbUCFIgnore_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_initializing)
|
||||
{
|
||||
Settings.Default.UCFImportOpt = 0;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbUCFLNotUsed_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_initializing)
|
||||
{
|
||||
Settings.Default.UCFImportOpt = 1;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbUCFLOnlyImport_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_initializing)
|
||||
{
|
||||
Settings.Default.UCFImportOpt = 2;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbUCFLUseAll_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_initializing)
|
||||
{
|
||||
Settings.Default.UCFImportOpt = 3;
|
||||
}
|
||||
}
|
||||
|
||||
private void cbUCFLForSetOnly_CheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!_initializing)
|
||||
{
|
||||
Settings.Default.UCFImportOpt = 4;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
966
PROMS/VEPROMS User Interface/frmUCF.cs
Normal file
966
PROMS/VEPROMS User Interface/frmUCF.cs
Normal file
@ -0,0 +1,966 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using System.IO;
|
||||
using System.Windows.Forms;
|
||||
using VEPROMS.CSLA.Library;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml.Xsl;
|
||||
|
||||
|
||||
namespace VEPROMS
|
||||
{
|
||||
// frmUCF is the main form for User Control of Format. It is accessible by Administrator & Set Administrator from the V button Administration
|
||||
// menu. It uses the FormatConfig structure whose data is stored in the Config field of the Formats table. It uses XmlSerialization to
|
||||
// store/retrieve the data from the database field and uses a Windows Property Grid to present the data, the data is tied to the
|
||||
// Property Grid by setting the SelectedObject of the Property Grid to the FormatConfig. FormatConfig objects use TypeConverter(typeof(ExpandableObjectConverter)) on the
|
||||
// fields to allow for accessing the data structures below the FormatConfig level (by default, fields are shown in the grid, Browsable(false) does
|
||||
// not show the fields. NOTE that collection data uses the PropGridCollEditor, see that file for further information (in Volian.Base.Library)
|
||||
//
|
||||
public partial class frmUCF : Form
|
||||
{
|
||||
private bool _UcfForRepWords = false;
|
||||
public bool UcfForRepWords // flags that UCF has changes to replace words - use for Reset button enabling
|
||||
{
|
||||
get { return _UcfForRepWords; }
|
||||
set { _UcfForRepWords = value; }
|
||||
}
|
||||
private FormatConfig MyFormatConfig = new FormatConfig();
|
||||
private PlantFormat OriginalPlantFormat;
|
||||
private FormatInfo OriginalFormatInfo;
|
||||
public frmUCF()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
private bool _Initializing = false;
|
||||
private void frmUCF_Load(object sender, EventArgs e)
|
||||
{
|
||||
_Initializing = true;
|
||||
PlantFormat.DoingUCFCheckOffs = true;
|
||||
PlantFormat.DoingUCFCheckOffsUse = MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF ?? false;
|
||||
cbxFormatList.DataSource = null;
|
||||
cbxFormatList.DisplayMember = "FullName";
|
||||
cbxFormatList.ValueMember = "FullName";
|
||||
cbxFormatList.DataSource = FormatInfoList.GetFormatInfoListUsed();
|
||||
cbxFormatList.SelectedIndex = -1;
|
||||
MyFormatConfig = new FormatConfig();
|
||||
PG.SelectedObject = MyFormatConfig;
|
||||
PG.Enabled = false;
|
||||
PG.SelectedGridItemChanged += PG_SelectedGridItemChanged;
|
||||
PG.PropertyValueChanged += PG_PropertyValueChanged;
|
||||
btnSaveAs.Enabled = false;
|
||||
btnSaveClose.Enabled = false;
|
||||
btnSave.Enabled = false;
|
||||
btnReset.Enabled = false;
|
||||
btnDelete.Enabled = false;
|
||||
_Initializing = false;
|
||||
}
|
||||
void PG_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
|
||||
{
|
||||
if (SelectedGridField.EndsWith("Flags:UCF CheckOffs"))
|
||||
{
|
||||
// when changing whether the UCF format has the UCF checkoffs (there is a list of checkoffs/headers in the base format, when this
|
||||
// flag is true, they get added to the list from the starting format), refresh the checkoff header & checkoff lists
|
||||
if ((bool)e.OldValue != MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF)
|
||||
{
|
||||
// refresh the checkoff data in myformatconfig. Need to clear the checkoff header list & checkoff list before
|
||||
// getting new data.
|
||||
PlantFormat.DoingUCFCheckOffsUse = (bool)MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF;
|
||||
GetUCFCheckOffDataForUCFGrid((bool)MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF);
|
||||
PG.Refresh();
|
||||
}
|
||||
}
|
||||
}
|
||||
private string SelectedGridField = "Identification: Name"; // first field sectioned upon creation of form
|
||||
void PG_SelectedGridItemChanged(object sender, SelectedGridItemChangedEventArgs e)
|
||||
{
|
||||
if (_Initializing || _formatListIndexChanging) return;
|
||||
|
||||
// refresh the summary data textbox data to show summary of what is in this UCF. This occurs when move off of a field which
|
||||
// actually 'stores' the change.
|
||||
FormatConfig tmpfc = GetChangesUCFForSave();
|
||||
string scf = tmpfc.ConvertToString();
|
||||
scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", "");
|
||||
SetUCFSummary(scf);
|
||||
|
||||
// see if data has changed, and if so, enable the Reset button.
|
||||
// Upon selection of a grid item, see if the grid item has data associated with it & if so, see if there has been
|
||||
// a change. Code needs added here for any value listed on the main property grid, i.e. not part of a collection, or
|
||||
// if the collection is reset in its entirety (replace words is an example of this).
|
||||
bool enabled = false;
|
||||
btnReset.Text = "Reset";
|
||||
string previousSelectedGridField = SelectedGridField;
|
||||
SelectedGridField = LabelPath(PG.SelectedGridItem);
|
||||
// remove the following line before release:
|
||||
lblPGItem.Text = SelectedGridField;
|
||||
|
||||
if (previousSelectedGridField.EndsWith("Identification: Name") && !SelectedGridField.EndsWith("Identification: Name")) SetButtonSaveAsEnabled();
|
||||
if (previousSelectedGridField.EndsWith("Data:Plant Format:Step Settings:Replace Words List"))
|
||||
{
|
||||
// if moving off of the replace words, see if any changes exist so that Reset List button is enabled:
|
||||
FormatConfig.ReplaceStrData rps = GetChangedReplaceListForSave();
|
||||
UcfForRepWords = (rps != null && rps.Count > 0);
|
||||
}
|
||||
if (SelectedGridField.EndsWith("Identification: Name")) enabled = false;
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format")) enabled = false;
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Section Type Settings")) enabled = false;
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings")) enabled = false;
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags")) enabled = false;
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Compress Steps"))
|
||||
{
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != null && MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps)
|
||||
{
|
||||
btnReset.Text = "Reset to " + OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Partial Step Compression"))
|
||||
{
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != null && MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression)
|
||||
{
|
||||
btnReset.Text = "Reset to " + OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:UCF CheckOffs"))
|
||||
{
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF != null && MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF != OriginalPlantFormat.FormatData.ProcData.CheckOffUCF)
|
||||
{
|
||||
btnReset.Text = "Reset to " + OriginalPlantFormat.FormatData.ProcData.CheckOffUCF;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Replace Words List"))
|
||||
{
|
||||
if (UcfForRepWords) // flags that ucf data exists for replace words.
|
||||
{
|
||||
btnReset.Text = "Reset List";
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:CheckOff XOffset"))
|
||||
{
|
||||
if (MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != null && MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != 0) // flags that ucf data exists for replace words.
|
||||
{
|
||||
btnReset.Text = "Reset to 0";
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Step List")) enabled = false;
|
||||
else enabled = false;
|
||||
|
||||
btnReset.Enabled = enabled;
|
||||
}
|
||||
// remove the following method for release:
|
||||
private string LabelPath(GridItem gi)
|
||||
{
|
||||
return (gi.Parent == null ? "" : LabelPath(gi.Parent) + ":" + gi.Label);
|
||||
}
|
||||
private void btnSaveClose_Click(object sender, EventArgs e)
|
||||
{
|
||||
// get a FormatConfig structure that only has differences from the original format. This is what gets saved.
|
||||
FormatConfig tmpForSave = GetChangesUCFForSave();
|
||||
string scf = tmpForSave.ConvertToString();
|
||||
scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", "");
|
||||
int fmtid = OriginalPlantFormat.MyFormat is Format ? (OriginalPlantFormat.MyFormat as Format).FormatID : (OriginalPlantFormat.MyFormat as FormatInfo).FormatID;
|
||||
// for now, tell the user that changes don't take affect until reentry. This was done since the 'refresh' of FormatConfig was not
|
||||
// working.
|
||||
using (Format fmt = Format.Get(fmtid))
|
||||
{
|
||||
FormatInfo fi = FormatInfo.GetFormatNoUCFByFormatID(OriginalFormatInfo.FormatID);
|
||||
if (fi.Data == "")
|
||||
{
|
||||
fmt.Data = "";
|
||||
fmt.GenMac = "";
|
||||
}
|
||||
fmt.Config = scf;
|
||||
fmt.Name = MyFormatConfig.Name;
|
||||
fmt.Description = MyFormatConfig.Description;
|
||||
fmt.Save(true);
|
||||
MessageBox.Show(this, "Restart PROMS to have format changes take effect.", "", MessageBoxButtons.OK);
|
||||
}
|
||||
OriginalPlantFormat.FormatData.ProcData.CheckOffData.ClearCheckOffAndHeaderLists();
|
||||
PlantFormat.IgnoreUCF = false;
|
||||
PlantFormat.DoingUCFCheckOffs = false;
|
||||
}
|
||||
private void btnCancel_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (OriginalPlantFormat != null) OriginalPlantFormat.FormatData.ProcData.CheckOffData.ClearCheckOffAndHeaderLists();
|
||||
PlantFormat.IgnoreUCF = false;
|
||||
PlantFormat.DoingUCFCheckOffs = false;
|
||||
}
|
||||
private bool _formatListIndexChanging = false; // don't change other selections when changing this index
|
||||
private void cbxFormatList_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (_Initializing) return;
|
||||
if (cbxFormatList.SelectedIndex > -1)
|
||||
{
|
||||
_formatListIndexChanging = true;
|
||||
FormatInfoList fl = FormatInfoList.GetFormatInfoListUsed();
|
||||
// Get the format data, the query in GetFormatInfoListUsed may have null for data/genmac which causes a
|
||||
// problem when reading the 'parent' data for UCF saved as formats.
|
||||
int i = -1;
|
||||
FormatInfo finfo = cbxFormatList.SelectedItem as FormatInfo;
|
||||
if (finfo == null) finfo = fl[cbxFormatList.SelectedIndex];
|
||||
OriginalFormatInfo = FormatInfo.Get(finfo.FormatID);
|
||||
OriginalPlantFormat = OriginalFormatInfo.PlantFormat;
|
||||
|
||||
// get original data when accessing the plant format data (not UCF because it UCF data is being modified):
|
||||
PlantFormat.IgnoreUCF = true;
|
||||
int formatid = OriginalPlantFormat.MyFormat is Format ? (OriginalPlantFormat.MyFormat as Format).FormatID : (OriginalPlantFormat.MyFormat as FormatInfo).FormatID;
|
||||
FormatInfo fi = FormatInfo.Get(formatid);
|
||||
// if this has config data it is a UCF format, the MyFormatConfig has the config data & see if doing additional checkoffs.
|
||||
// Also, put out the summary of the changes if it is a 'UCF' and if no differences just state that.
|
||||
btnDetails.Visible = true;
|
||||
lblSummary.Visible = true;
|
||||
tbUCFSummary.Visible = true;
|
||||
if (fi.Config != null && fi.Config != "")
|
||||
{
|
||||
MyFormatConfig = FormatConfig.Get(fi.Config);
|
||||
PlantFormat.DoingUCFCheckOffsUse = MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF ?? false;
|
||||
btnSaveClose.Enabled = true; // UCF formats can be modified and saved.
|
||||
btnSave.Enabled = true;
|
||||
SetUCFSummary(fi.Config);
|
||||
}
|
||||
else
|
||||
{
|
||||
MyFormatConfig = new FormatConfig();
|
||||
btnSaveClose.Enabled = false;
|
||||
btnSave.Enabled = false;
|
||||
tbUCFSummary.Text = "No differences from original";
|
||||
}
|
||||
// initialize the data based on the selected format with any changes from the FormatConfig.
|
||||
GetUCFDataForUCFGrid();
|
||||
PG.Enabled = true;
|
||||
PG.SelectedObject = MyFormatConfig;
|
||||
btnSaveAs.Enabled = false;
|
||||
SetDeleteOrResetAllButton();
|
||||
|
||||
// set derived from if there is a parent:
|
||||
if (OriginalFormatInfo.MyParent.FormatID == 1)
|
||||
{
|
||||
lblDerFrom.Visible = false;
|
||||
lblDerivedFrom.Visible = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// get to top parent format:
|
||||
FormatInfo p = OriginalFormatInfo;
|
||||
while (p.MyParent.FormatID != 1) p = p.MyParent;
|
||||
lblDerFrom.Visible = true;
|
||||
lblDerivedFrom.Visible = true;
|
||||
lblDerivedFrom.Text = p.Name.Replace("_UCF", "") + "->" + OriginalFormatInfo.MyParent.Name.Replace("_UCF", "") + ":" + OriginalFormatInfo.MyParent.Description;
|
||||
}
|
||||
_formatListIndexChanging = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void SetUCFSummary(string formatConfig)
|
||||
{
|
||||
try
|
||||
{
|
||||
string sXSLSummary = System.IO.File.ReadAllText(Application.StartupPath + "\\" + "UCFSummary.xsl");
|
||||
StringWriter sw = new StringWriter();
|
||||
using (XmlReader xrt = XmlReader.Create(new StringReader(sXSLSummary)))
|
||||
{
|
||||
using (XmlReader xri = XmlReader.Create(new StringReader(formatConfig)))
|
||||
{
|
||||
using (XmlWriter xwo = XmlWriter.Create(sw))
|
||||
{
|
||||
XslCompiledTransform xsl = new XslCompiledTransform();
|
||||
xsl.Load(xrt);
|
||||
xsl.Transform(xri, null, sw);
|
||||
}
|
||||
if (sw == null || sw.ToString() == "")
|
||||
tbUCFSummary.Text = "No differences from original";
|
||||
else
|
||||
tbUCFSummary.Text = sw.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show(ex.Message, "Error getting summary for UCF differences", MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
// The SaveAs Button should only be enabled if the user has given this format change a unique 'Name'.
|
||||
private void SetButtonSaveAsEnabled()
|
||||
{
|
||||
btnSaveAs.Enabled = false;
|
||||
if (MyFormatConfig.Name == null || MyFormatConfig.Name == "") return;
|
||||
// See if Name has been changed:
|
||||
if (MyFormatConfig.Name == OriginalFormatInfo.Name) return;
|
||||
|
||||
// See if the Name is unique
|
||||
foreach (FormatInfo fi in FormatInfoList.SortedFormatInfoList)
|
||||
{
|
||||
if (MyFormatConfig.Name == fi.Name && MyFormatConfig.Name != savDBFormatConfig.Name)
|
||||
{
|
||||
MessageBox.Show("A format with Name " + MyFormatConfig.Name + " already exists. Name must be unique. Change the name before a Save As can be done.");
|
||||
}
|
||||
}
|
||||
btnSaveAs.Enabled = true;
|
||||
return;
|
||||
}
|
||||
// If the selected format is a UCF 'Save As', then possibly allow delete (if not used). Otherwise, if selected format
|
||||
// has Config data, i.e. UCF data, then change button text to 'Revert to Original'. In both cases, enable button, otherwise it is disabled.
|
||||
private void SetDeleteOrResetAllButton()
|
||||
{
|
||||
btnDelete.Enabled = false;
|
||||
// See if UCF Save As, i.e. Data/Genmac are null and that the format is not used.
|
||||
FormatInfo fi = FormatInfo.GetFormatNoUCFByFormatID(OriginalFormatInfo.FormatID);
|
||||
if (fi.Data == "")
|
||||
{
|
||||
if (OriginalFormatInfo.ChildFormatCount == 0 && OriginalFormatInfo.FormatContentCount == 0 && OriginalFormatInfo.FormatDocVersionCount == 0 && OriginalFormatInfo.FormatFolderCount == 0)
|
||||
{
|
||||
btnDelete.Enabled = true;
|
||||
btnDelete.Text = "Delete";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (OriginalFormatInfo.Config != null && OriginalFormatInfo.Config != "")
|
||||
{
|
||||
btnDelete.Enabled = true;
|
||||
btnDelete.Text = "Revert to Original";
|
||||
}
|
||||
}
|
||||
}
|
||||
// GetChangeUCFForSave compares UCF data in FormatConfig to the original PlantFormat data to see if there
|
||||
// are changes that need to be saved to the database.
|
||||
private FormatConfig savDBFormatConfig;
|
||||
private FormatConfig GetChangesUCFForSave()
|
||||
{
|
||||
FormatConfig changesOnly = new FormatConfig();
|
||||
|
||||
// Flags
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != null && MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps)
|
||||
changesOnly.PlantFormat.FormatData.Flags.CompressSteps = MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps;
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != null && MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression != OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression)
|
||||
changesOnly.PlantFormat.FormatData.Flags.PartialStepCompression = MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression;
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF != null && MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF == true) // save if true (original format is always false)
|
||||
changesOnly.PlantFormat.FormatData.Flags.CheckOffUCF = MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF;
|
||||
|
||||
// CheckOff Headers
|
||||
if (MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList != null) changesOnly.PlantFormat.FormatData.CheckOffHeaderList = GetChangeCheckOffHeaderListForSave();
|
||||
|
||||
// CheckOffs
|
||||
if (MyFormatConfig.PlantFormat.FormatData.CheckOffList != null) changesOnly.PlantFormat.FormatData.CheckOffList = GetChangeCheckOffListForSave();
|
||||
|
||||
// Checkoff xoffset adjustment
|
||||
if (MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != null && MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj != 0) // save if not zero (original format is always zero)
|
||||
changesOnly.PlantFormat.FormatData.CheckOffXOffAdj = MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj;
|
||||
|
||||
// steps
|
||||
if (MyFormatConfig.PlantFormat.FormatData.StepData != null) changesOnly.PlantFormat.FormatData.StepData = GetChangeStepListForSave();
|
||||
|
||||
// replace words - just store them all, if there are differences... can't handle deleted unless doing this.
|
||||
if (MyFormatConfig.PlantFormat.FormatData.ReplaceStrData != null) changesOnly.PlantFormat.FormatData.ReplaceStrData = GetChangedReplaceListForSave();
|
||||
|
||||
// docstyles
|
||||
FormatConfig.DocStyles retds = new FormatConfig.DocStyles();
|
||||
foreach (DocStyle dsorig in OriginalPlantFormat.DocStyles.DocStyleList)
|
||||
{
|
||||
if (!dsorig.Inactive && dsorig.IsStepSection)
|
||||
{
|
||||
FormatConfig.DocStyle ds = new FormatConfig.DocStyle();
|
||||
ds.Index = dsorig.Index.ToString();
|
||||
ds.Name = dsorig.Name;
|
||||
if (ds.Layout == null) ds.Layout = new FormatConfig.Layout();
|
||||
// See if in the FormatConfig, use it
|
||||
FormatConfig.DocStyle found = null;
|
||||
if (MyFormatConfig.PlantFormat.DocStyles != null)
|
||||
{
|
||||
foreach (FormatConfig.DocStyle fcds in MyFormatConfig.PlantFormat.DocStyles)
|
||||
{
|
||||
float? difl = Math.Abs((float)((fcds.Layout.LeftMargin * 72) - dsorig.Layout.LeftMargin));
|
||||
float? difp = Math.Abs((float)((fcds.Layout.PageLength * 72) - dsorig.Layout.PageLength));
|
||||
if (fcds.Index == dsorig.Index.ToString() && (difl > 1 || difp > 1))
|
||||
{
|
||||
found = fcds;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found != null) // save it values are different.
|
||||
{
|
||||
if ((found.Layout.LeftMargin * 72) != dsorig.Layout.LeftMargin) ds.Layout.LeftMargin = found.Layout.LeftMargin * 72;
|
||||
else ds.Layout.LeftMargin = null;
|
||||
if ((found.Layout.PageLength * 72) != dsorig.Layout.PageLength) ds.Layout.PageLength = found.Layout.PageLength * 72;
|
||||
else ds.Layout.PageLength = null;
|
||||
retds.Add(ds);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (retds.Count > 0) changesOnly.PlantFormat.DocStyles = retds;
|
||||
return changesOnly;
|
||||
}
|
||||
// Check for differences in the checkoffheaderlist & checkofflist. Only Active flag is used:
|
||||
private FormatConfig.CheckOffHeaderList GetChangeCheckOffHeaderListForSave()
|
||||
{
|
||||
FormatConfig.CheckOffHeaderList cohlist = new FormatConfig.CheckOffHeaderList();
|
||||
foreach (FormatConfig.CheckOffHeader coh in MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList)
|
||||
{
|
||||
if (!(bool)coh.Active) cohlist.Add(coh);
|
||||
}
|
||||
return cohlist;
|
||||
}
|
||||
private FormatConfig.CheckOffList GetChangeCheckOffListForSave()
|
||||
{
|
||||
FormatConfig.CheckOffList colist = new FormatConfig.CheckOffList();
|
||||
foreach (FormatConfig.CheckOff co in MyFormatConfig.PlantFormat.FormatData.CheckOffList)
|
||||
{
|
||||
if (!(bool)co.Active) colist.Add(co);
|
||||
}
|
||||
return colist;
|
||||
}
|
||||
// Check for differences in the StepDataList between UCF and original data for saving of data to database:
|
||||
private FormatConfig.StepData GetChangeStepListForSave()
|
||||
{
|
||||
FormatConfig.StepData sdlist = new FormatConfig.StepData();
|
||||
foreach (StepData sdorig in OriginalPlantFormat.FormatData.StepDataList)
|
||||
{
|
||||
if (!sdorig.Inactive)
|
||||
{
|
||||
// find this step in the config data:
|
||||
foreach (FormatConfig.Step fcstp in MyFormatConfig.PlantFormat.FormatData.StepData)
|
||||
{
|
||||
if (fcstp.Index == sdorig.Index.ToString())
|
||||
{
|
||||
// see if data is different and if so, add it to the return list:
|
||||
System.Drawing.FontConverter cvt = new System.Drawing.FontConverter();
|
||||
string origFont = cvt.ConvertToString(sdorig.Font.WindowsFont);
|
||||
string newFont = cvt.ConvertToString(fcstp.FontDesc.WindowsFont);
|
||||
if (origFont != newFont)
|
||||
{
|
||||
FormatConfig.Step stp = fcstp;
|
||||
sdlist.Add(stp);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return sdlist;
|
||||
}
|
||||
// Check for differences in the ReplaceWords between UCF and original data for saving of data to database:
|
||||
private FormatConfig.ReplaceStrData GetChangedReplaceListForSave()
|
||||
{
|
||||
// only saving the differences
|
||||
// need to compare the original format list with the list as it is stored for UCF, i.e.working with property grid and save differences.
|
||||
// Note that check for 'bad' data such as no flags, or null/empty replace with/word strings - don't use those.
|
||||
// States for replacewords: 0 = no change, -1 deleted, 1 added, 2 modified
|
||||
FormatConfig.ReplaceStrData retlist = new FormatConfig.ReplaceStrData(); // list of changes
|
||||
foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData)
|
||||
{
|
||||
// Modified
|
||||
foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList)
|
||||
{
|
||||
if (origrepstr.ReplaceWord.Replace("{Backspace}", "") == ucfrepstr.ReplaceWord.Replace("{Backspace}", ""))
|
||||
{
|
||||
// if deleted or if anything is different, save it
|
||||
if (((E_ReplaceFlags)ucfrepstr.Flag != origrepstr.Flag || ucfrepstr.ReplaceWith != origrepstr.ReplaceWith) && ucfrepstr.Flag != 0 && ucfrepstr.ReplaceWith != "")
|
||||
{
|
||||
ucfrepstr.State = 2;
|
||||
retlist.Add(ucfrepstr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// Added:
|
||||
List<string> origstrList = new List<string>(); // used to find added, (see later in this method)
|
||||
foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList) origstrList.Add(origrepstr.ReplaceWord);
|
||||
foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData)
|
||||
{
|
||||
if (!origstrList.Contains(ucfrepstr.ReplaceWord))
|
||||
{
|
||||
// check for valid data, i.e. flag set & both replaceword & with not blank
|
||||
//if (ucfrepstr.Flag != 0 && ucfrepstr.ReplaceWith != null && ucfrepstr.ReplaceWith != "" && ucfrepstr.ReplaceWord != null && ucfrepstr.ReplaceWord != "")
|
||||
if (ucfrepstr.Flag != 0 && ucfrepstr.ReplaceWith != null && ucfrepstr.ReplaceWith != "" && ucfrepstr.ReplaceWord != null && ucfrepstr.ReplaceWord != "")
|
||||
{
|
||||
ucfrepstr.State = 1;
|
||||
retlist.Add(ucfrepstr);
|
||||
}
|
||||
}
|
||||
}
|
||||
//Deleted:
|
||||
List<string> ucfList = new List<string>(); // used to find deleted
|
||||
foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData) ucfList.Add(ucfrepstr.ReplaceWord);
|
||||
foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList)
|
||||
{
|
||||
if (!ucfList.Contains(origrepstr.ReplaceWord))
|
||||
{
|
||||
if (!((origrepstr.ReplaceWith.Contains("$1") && origrepstr.ReplaceWord.Contains("w*")) || origrepstr.ReplaceWith.Contains("{Backspace}")))
|
||||
{
|
||||
// make a deleted replacestr to save
|
||||
FormatConfig.ReplaceStr del = new FormatConfig.ReplaceStr();
|
||||
del.State = -1;
|
||||
del.Flag = (FormatConfig.E_ReplaceFlagsUCF)origrepstr.Flag;
|
||||
del.ReplaceWord = origrepstr.ReplaceWord;
|
||||
del.ReplaceWith = origrepstr.ReplaceWith;
|
||||
//del.ReplaceWith = origrepstr.ReplaceWith;
|
||||
retlist.Add(del);
|
||||
}
|
||||
}
|
||||
}
|
||||
return retlist;
|
||||
}
|
||||
// The following uses the original format's ReplaceWords list and applies any changes made from the UCF ReplaceWords list.
|
||||
private FormatConfig.ReplaceStrData GetMergedReplaceList()
|
||||
{
|
||||
// need to compare the original format list with the list as it is stored for working with property grid.
|
||||
FormatConfig.ReplaceStrData retlist = new FormatConfig.ReplaceStrData(); // merged list
|
||||
List<string> inoriglist = new List<string>(); // use this list to find new items in formatconfig (see below)
|
||||
foreach (ReplaceStr origrepstr in OriginalPlantFormat.FormatData.SectData.ReplaceStrList)
|
||||
{
|
||||
// In the format config list (UCF), find the 'ReplaceWord'. This is the 'key' for defining whether the
|
||||
// replace word has been overwridden by UCF data. If it exists, use it:
|
||||
FormatConfig.ReplaceStr usethisone = null;
|
||||
bool deleted = false;
|
||||
// States for replacewords: 0 = no change, -1 deleted, 1 added, 2 modified
|
||||
foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData)
|
||||
{
|
||||
if (ucfrepstr.ReplaceWord == origrepstr.ReplaceWord)
|
||||
{
|
||||
if (ucfrepstr.State == -1) deleted = true;
|
||||
else usethisone = ucfrepstr;
|
||||
ucfrepstr.State = 2;
|
||||
inoriglist.Add(origrepstr.ReplaceWord);
|
||||
UcfForRepWords = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// don't add in the replacewords that use 'Backspace' and regular expressions:
|
||||
bool supported = true;
|
||||
if (!deleted && usethisone == null)
|
||||
{
|
||||
if ((origrepstr.ReplaceWith.Contains("$1") || origrepstr.ReplaceWord.Contains("w*")) || origrepstr.ReplaceWith.Contains("{Backspace}"))
|
||||
supported = false;
|
||||
else
|
||||
{
|
||||
usethisone = new FormatConfig.ReplaceStr();
|
||||
usethisone.Flag = (FormatConfig.E_ReplaceFlagsUCF)origrepstr.Flag;
|
||||
usethisone.State = 0; // no change
|
||||
usethisone.ReplaceWith = origrepstr.ReplaceWith;
|
||||
usethisone.ReplaceWord = origrepstr.ReplaceWord;
|
||||
}
|
||||
}
|
||||
if (!deleted && supported) retlist.Add(usethisone);
|
||||
}
|
||||
// now add in any ucf only replacements, any that are not in the inoriglist
|
||||
foreach (FormatConfig.ReplaceStr ucfrepstr in MyFormatConfig.PlantFormat.FormatData.ReplaceStrData)
|
||||
{
|
||||
if (!inoriglist.Contains(ucfrepstr.ReplaceWord))
|
||||
{
|
||||
FormatConfig.ReplaceStr newone = new FormatConfig.ReplaceStr();
|
||||
newone.Flag = (FormatConfig.E_ReplaceFlagsUCF)ucfrepstr.Flag;
|
||||
newone.State = 1;
|
||||
//newone.ReplaceWith = ucfrepstr.ReplaceWith;
|
||||
newone.ReplaceWith = ucfrepstr.ReplaceWith;
|
||||
newone.ReplaceWord = ucfrepstr.ReplaceWord;
|
||||
retlist.Add(newone);
|
||||
UcfForRepWords = true;
|
||||
}
|
||||
}
|
||||
return (retlist);
|
||||
}
|
||||
// This method reads in the format items, merging any changes from UCF into original format. It sets MyFormatConfig, which
|
||||
// is the structure that gets used by the PropertyGrid
|
||||
private void GetUCFDataForUCFGrid()
|
||||
{
|
||||
// name/description is only stored as format record fields. There are attributes in formatconfig xml that are used for defining these
|
||||
// when new UCFs are defined or allowing for updates.
|
||||
MyFormatConfig.Name = OriginalFormatInfo.Name;
|
||||
MyFormatConfig.Description = OriginalFormatInfo.Description;
|
||||
|
||||
// Store original (currently saved FormatConfig) to be used for comparison when saving.
|
||||
savDBFormatConfig = MyFormatConfig;
|
||||
|
||||
// Flags
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps == null) MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps;
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression == null) MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression;
|
||||
if (MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF == null) MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF = OriginalPlantFormat.FormatData.ProcData.CheckOffUCF;
|
||||
|
||||
// checkoff xoffset adjustment
|
||||
if (MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj == null) MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj = 0;
|
||||
|
||||
GetUCFCheckOffDataForUCFGrid((bool)MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF);
|
||||
|
||||
// StepData: If there is no UCF data for steps, copy over from selected format
|
||||
FormatConfig.StepData sdlMerged = new FormatConfig.StepData();
|
||||
if (MyFormatConfig.PlantFormat.FormatData.StepData == null || MyFormatConfig.PlantFormat.FormatData.StepData.Count == 0)
|
||||
{
|
||||
foreach (StepData sdorig in OriginalPlantFormat.FormatData.StepDataList)
|
||||
{
|
||||
if (!sdorig.Inactive && sdorig.Index != 0)
|
||||
{
|
||||
FormatConfig.Step stp = new FormatConfig.Step();
|
||||
stp.Index = sdorig.Index.ToString();
|
||||
stp.Type = sdorig.Type;
|
||||
stp.FontDesc = new FormatConfig.FontDesc();
|
||||
stp.FontDesc.OrigWindowsFont = sdorig.Font.WindowsFont;
|
||||
stp.FontDesc.WindowsFont = sdorig.Font.WindowsFont;
|
||||
if (MyFormatConfig.PlantFormat.FormatData.StepData == null) MyFormatConfig.PlantFormat.FormatData.StepData = new FormatConfig.StepData();
|
||||
sdlMerged.Add(stp);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (StepData sdorig in OriginalPlantFormat.FormatData.StepDataList)
|
||||
{
|
||||
if (!sdorig.Inactive && sdorig.Index != 0)
|
||||
{
|
||||
FormatConfig.Step stp = new FormatConfig.Step();
|
||||
stp.Index = sdorig.Index.ToString();
|
||||
stp.Type = sdorig.Type;
|
||||
stp.FontDesc = new FormatConfig.FontDesc();
|
||||
// See if in the FormatConfig, use it
|
||||
FormatConfig.Step foundinFC = null;
|
||||
foreach (FormatConfig.Step fcstp in MyFormatConfig.PlantFormat.FormatData.StepData)
|
||||
{
|
||||
if (fcstp.Index == sdorig.Index.ToString())
|
||||
{
|
||||
foundinFC = fcstp;
|
||||
break;
|
||||
}
|
||||
}
|
||||
stp.FontDesc.OrigWindowsFont = new System.Drawing.Font(sdorig.Font.Family, (float)sdorig.Font.Size, sdorig.Font.WindowsFont.Style);
|
||||
if (foundinFC != null)
|
||||
stp.FontDesc.WindowsFont = new System.Drawing.Font(foundinFC.FontDesc.WindowsFont.Name, foundinFC.FontDesc.WindowsFont.Size, foundinFC.FontDesc.WindowsFont.Style);
|
||||
else
|
||||
stp.FontDesc.WindowsFont = new System.Drawing.Font(sdorig.Font.Family, (float)sdorig.Font.Size, sdorig.Font.WindowsFont.Style);
|
||||
sdlMerged.Add(stp);
|
||||
}
|
||||
}
|
||||
}
|
||||
MyFormatConfig.PlantFormat.FormatData.StepData = sdlMerged;
|
||||
|
||||
// ReplacWords
|
||||
// if there are no replace str entries in sc, add from the selected format:
|
||||
if (MyFormatConfig.PlantFormat.FormatData.ReplaceStrData == null || MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Count == 0)
|
||||
{
|
||||
foreach (ReplaceStr repstrorig in OriginalPlantFormat.FormatData.SectData.ReplaceStrList)
|
||||
{
|
||||
if (!((repstrorig.ReplaceWith.Contains("$1") && repstrorig.ReplaceWord.Contains("w*")) || repstrorig.ReplaceWith.Contains("{Backspace}")))
|
||||
{
|
||||
FormatConfig.ReplaceStr rsfc = new FormatConfig.ReplaceStr();
|
||||
rsfc.Flag = (FormatConfig.E_ReplaceFlagsUCF)repstrorig.Flag;
|
||||
rsfc.State = 0;
|
||||
rsfc.ReplaceWith = repstrorig.ReplaceWith;
|
||||
rsfc.ReplaceWord = repstrorig.ReplaceWord;
|
||||
MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Add(rsfc);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
MyFormatConfig.PlantFormat.FormatData.ReplaceStrData = GetMergedReplaceList();
|
||||
}
|
||||
// Document Style (section) Data (docstyles). Get step editor type only
|
||||
if (MyFormatConfig.PlantFormat.DocStyles == null || MyFormatConfig.PlantFormat.DocStyles.Count == 0)
|
||||
{
|
||||
foreach (DocStyle dsorig in OriginalPlantFormat.DocStyles.DocStyleList)
|
||||
{
|
||||
if (!dsorig.Inactive && dsorig.IsStepSection)
|
||||
{
|
||||
FormatConfig.DocStyle ds = new FormatConfig.DocStyle();
|
||||
ds.Index = dsorig.Index.ToString();
|
||||
ds.Name = dsorig.Name;
|
||||
if (ds.Layout == null) ds.Layout = new FormatConfig.Layout();
|
||||
ds.Layout.PageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2);
|
||||
ds.Layout.OrigPageLength = ds.Layout.PageLength;
|
||||
ds.Layout.LeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2);
|
||||
ds.Layout.OrigLeftMargin = ds.Layout.LeftMargin;
|
||||
if (MyFormatConfig.PlantFormat.DocStyles == null) MyFormatConfig.PlantFormat.DocStyles = new FormatConfig.DocStyles();
|
||||
MyFormatConfig.PlantFormat.DocStyles.Add(ds);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (DocStyle dsorig in OriginalPlantFormat.DocStyles.DocStyleList)
|
||||
{
|
||||
if (!dsorig.Inactive && dsorig.IsStepSection)
|
||||
{
|
||||
FormatConfig.DocStyle ds = new FormatConfig.DocStyle();
|
||||
ds.Index = dsorig.Index.ToString();
|
||||
ds.Name = dsorig.Name;
|
||||
if (ds.Layout == null) ds.Layout = new FormatConfig.Layout();
|
||||
// See if in the FormatConfig, use it
|
||||
FormatConfig.DocStyle foundinFC = null;
|
||||
foreach (FormatConfig.DocStyle fcds in MyFormatConfig.PlantFormat.DocStyles)
|
||||
{
|
||||
if (fcds.Index == dsorig.Index.ToString())
|
||||
{
|
||||
foundinFC = fcds;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (foundinFC != null)
|
||||
{
|
||||
if (foundinFC.Layout.LeftMargin == null) foundinFC.Layout.LeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2);
|
||||
else foundinFC.Layout.LeftMargin = (float)Math.Round((float)foundinFC.Layout.LeftMargin / 72, 2);
|
||||
foundinFC.Layout.OrigLeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2);
|
||||
if (foundinFC.Layout.PageLength == null) foundinFC.Layout.PageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2);
|
||||
else foundinFC.Layout.PageLength = (float)Math.Round((float)foundinFC.Layout.PageLength / 72, 2);
|
||||
foundinFC.Layout.OrigPageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
ds.Layout.OrigLeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2);
|
||||
ds.Layout.OrigPageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2);
|
||||
ds.Layout.LeftMargin = (float)Math.Round((float)dsorig.Layout.LeftMargin / 72, 2);
|
||||
ds.Layout.PageLength = (float)Math.Round((float)dsorig.Layout.PageLength / 72, 2);
|
||||
MyFormatConfig.PlantFormat.DocStyles.Add(ds);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void GetUCFCheckOffDataForUCFGrid(bool ucfcheckof)
|
||||
{
|
||||
OriginalPlantFormat.FormatData.ProcData.CheckOffData.ClearCheckOffAndHeaderLists();
|
||||
// CheckOffHeaders: If there is no UCF data, use from the selected format, otherwise merge:
|
||||
FormatConfig.CheckOffHeaderList cohdrsMerged = new FormatConfig.CheckOffHeaderList();
|
||||
if (MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList == null || MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList.Count == 0)
|
||||
{
|
||||
foreach (CheckOffHeader cohorig in OriginalPlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList)
|
||||
{
|
||||
// do inactive::
|
||||
FormatConfig.CheckOffHeader coh = new FormatConfig.CheckOffHeader();
|
||||
coh.Index = cohorig.Index.ToString();
|
||||
coh.CheckOffHeading = cohorig.CheckOffHeading;
|
||||
coh.Active = true;
|
||||
coh.OrigActive = true;
|
||||
cohdrsMerged.Add(coh);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (CheckOffHeader cohorig in OriginalPlantFormat.FormatData.ProcData.CheckOffData.CheckOffHeaderList)
|
||||
{
|
||||
FormatConfig.CheckOffHeader coh = new FormatConfig.CheckOffHeader();
|
||||
coh.Index = cohorig.Index.ToString();
|
||||
coh.CheckOffHeading = cohorig.CheckOffHeading;
|
||||
coh.Active = true;
|
||||
coh.OrigActive = true;
|
||||
// See if in the FormatConfig, to check its inactive flag:
|
||||
foreach (FormatConfig.CheckOffHeader fccoh in MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList)
|
||||
{
|
||||
if (fccoh.Index == cohorig.Index.ToString())
|
||||
{
|
||||
coh.Active = fccoh.Active;
|
||||
coh.OrigActive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cohdrsMerged.Add(coh);
|
||||
}
|
||||
}
|
||||
MyFormatConfig.PlantFormat.FormatData.CheckOffHeaderList = cohdrsMerged;
|
||||
|
||||
// CheckOffs: If there is no UCF data, use from the selected format, otherwise merge:
|
||||
FormatConfig.CheckOffList cosMerged = new FormatConfig.CheckOffList();
|
||||
// clear the lists so that correct lists will be initialized
|
||||
foreach (CheckOff coorig in OriginalPlantFormat.FormatData.ProcData.CheckOffData.CheckOffList)
|
||||
{
|
||||
FormatConfig.CheckOff co = new FormatConfig.CheckOff();
|
||||
co.Index = coorig.Index.ToString();
|
||||
co.MenuItem = coorig.MenuItem;
|
||||
co.Active = true;
|
||||
co.OrigActive = true;
|
||||
// See if in the FormatConfig, to check its inactive flag:
|
||||
if (MyFormatConfig.PlantFormat.FormatData.CheckOffList != null)
|
||||
{
|
||||
foreach (FormatConfig.CheckOff fcco in MyFormatConfig.PlantFormat.FormatData.CheckOffList)
|
||||
{
|
||||
if (fcco.Index == coorig.Index.ToString())
|
||||
{
|
||||
co.Active = fcco.Active;
|
||||
co.OrigActive = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
cosMerged.Add(co);
|
||||
}
|
||||
MyFormatConfig.PlantFormat.FormatData.CheckOffList = cosMerged;
|
||||
}
|
||||
// The Reset button is used to reset a UCF change from the original data. If a field is added to UCF, code needs
|
||||
// added here for the field:
|
||||
private void btnReset_Click(object sender, EventArgs e)
|
||||
{
|
||||
// The code that enables the Reset button checks if a change (UCF) exists. So no need to check here.
|
||||
if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Compress Steps"))
|
||||
{
|
||||
MyFormatConfig.PlantFormat.FormatData.Flags.CompressSteps = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.CompressSteps;
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:Partial Step Compression"))
|
||||
{
|
||||
MyFormatConfig.PlantFormat.FormatData.Flags.PartialStepCompression = OriginalPlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PartialStepCompression;
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Flags:UCF CheckOffs"))
|
||||
{
|
||||
MyFormatConfig.PlantFormat.FormatData.Flags.CheckOffUCF = OriginalPlantFormat.FormatData.ProcData.CheckOffUCF;
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:CheckOff XOffset"))
|
||||
{
|
||||
MyFormatConfig.PlantFormat.FormatData.CheckOffXOffAdj = 0;
|
||||
}
|
||||
else if (SelectedGridField.EndsWith("Data:Plant Format:Step Settings:Replace Words List"))
|
||||
{
|
||||
MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Clear();
|
||||
foreach (ReplaceStr repstrorig in OriginalPlantFormat.FormatData.SectData.ReplaceStrList)
|
||||
{
|
||||
if (!((repstrorig.ReplaceWith.Contains("$1") && repstrorig.ReplaceWord.Contains("w*")) || repstrorig.ReplaceWith.Contains("{Backspace}")))
|
||||
{
|
||||
FormatConfig.ReplaceStr rsfc = new FormatConfig.ReplaceStr();
|
||||
rsfc.Flag = (FormatConfig.E_ReplaceFlagsUCF)repstrorig.Flag;
|
||||
rsfc.State = 0;
|
||||
rsfc.ReplaceWith = repstrorig.ReplaceWith;
|
||||
rsfc.ReplaceWord = repstrorig.ReplaceWord;
|
||||
MyFormatConfig.PlantFormat.FormatData.ReplaceStrData.Add(rsfc);
|
||||
UcfForRepWords = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
btnReset.Enabled = false;
|
||||
btnReset.Text = "Reset";
|
||||
}
|
||||
|
||||
private void btnSaveAs_Click(object sender, EventArgs e)
|
||||
{
|
||||
// Name must be unique - description can be null.
|
||||
// Append a '_UCF' at end of all user control of format formats.
|
||||
// add a format record for this:
|
||||
// FormatID - next ID, db creates on new format
|
||||
// ParentID - format id of the format that was used as a base for this user control of format
|
||||
// Name - user defined
|
||||
// Description - user defined - if none specified by user, use the original's description
|
||||
// Data - null: flags that a UCF was saved as and use the parent and config from this.
|
||||
//
|
||||
|
||||
// check for unique name.
|
||||
foreach (FormatInfo fi in FormatInfoList.SortedFormatInfoList)
|
||||
{
|
||||
if (MyFormatConfig.Name == fi.Name || MyFormatConfig.Name + "_UCF" == fi.Name)
|
||||
{
|
||||
MessageBox.Show("A format with Name " + MyFormatConfig.Name + " already exists. Name must be unique. Save As cannot be done.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
using (Format tmp = Format.Get(OriginalFormatInfo.FormatID))
|
||||
{
|
||||
string fname = MyFormatConfig.Name + (MyFormatConfig.Name.EndsWith("_UCF") ? "" : "_UCF");
|
||||
Format fmt = Format.MakeFormat(tmp, fname, MyFormatConfig.Description == OriginalFormatInfo.Description || MyFormatConfig.Description == "" || MyFormatConfig.Description == null ? OriginalFormatInfo.Description : MyFormatConfig.Description, null, null, DateTime.Now, Volian.Base.Library.VlnSettings.UserID);
|
||||
FormatConfig tmpForSave = GetChangesUCFForSave();
|
||||
string scf = tmpForSave.ConvertToString();
|
||||
scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", "");
|
||||
// for now, tell the user that changes don't take affect until reentry. This was done since the 'refresh' of FormatConfig was not
|
||||
// working.
|
||||
fmt.Config = scf;
|
||||
fmt.Description = MyFormatConfig.Description;
|
||||
fmt.Save(true);
|
||||
MessageBox.Show(this, "Restart PROMS to have format changes take effect.", "", MessageBoxButtons.OK);
|
||||
btnSaveAs.Enabled = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
// delete this format OR (the button text is set to 'delete...' if no item or version uses it)
|
||||
// revert to the original
|
||||
string msg = btnDelete.Text == "Revert to Original" ? "revert to the original?" : "delete this format?";
|
||||
if (MessageBox.Show(this, "Are you sure you want to " + msg, "Confirm", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
|
||||
{
|
||||
PlantFormat.IgnoreUCF = true;
|
||||
// the button is either 'Revert to Original' for a format that is the original and has config data, or 'Delete' for a UCF that
|
||||
// was created by a 'Save As'.
|
||||
// so do either a clear of the config data, or delete the format record depending on button's text
|
||||
if (btnDelete.Text == "Revert to Original")
|
||||
{
|
||||
using (Format fmt = Format.Get(OriginalFormatInfo.FormatID))
|
||||
{
|
||||
fmt.Config = "";
|
||||
fmt.Save(true);
|
||||
MessageBox.Show(this, "The changes that have been made to the format will take affect after reentry to PROMS", "", MessageBoxButtons.OK);
|
||||
MyFormatConfig = new FormatConfig();
|
||||
PG.SelectedObject = MyFormatConfig;
|
||||
PG.Enabled = false;
|
||||
btnSaveAs.Enabled = false;
|
||||
btnDelete.Enabled = false;
|
||||
btnSaveClose.Enabled = false;
|
||||
btnSave.Enabled = false;
|
||||
btnReset.Enabled = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
Format.Delete(OriginalFormatInfo.FormatID);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageBox.Show("Could not delete the format");
|
||||
return;
|
||||
}
|
||||
cbxFormatList.DataSource = FormatInfoList.GetFormatInfoListUsed();
|
||||
cbxFormatList.SelectedIndex = -1;
|
||||
MyFormatConfig = new FormatConfig();
|
||||
PG.SelectedObject = MyFormatConfig;
|
||||
PG.Enabled = false;
|
||||
btnSaveAs.Enabled = false;
|
||||
btnDelete.Enabled = false;
|
||||
btnSaveClose.Enabled = false;
|
||||
btnSave.Enabled = false;
|
||||
btnReset.Enabled = false;
|
||||
}
|
||||
PlantFormat.IgnoreUCF = false;
|
||||
PlantFormat.DoingUCFCheckOffs = false;
|
||||
}
|
||||
}
|
||||
|
||||
private void btnDetails_Click(object sender, EventArgs e)
|
||||
{
|
||||
FormatConfig tmpfc = GetChangesUCFForSave();
|
||||
string scf = tmpfc.ConvertToString();
|
||||
scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", "");
|
||||
dlgUCFDetail dtl = new dlgUCFDetail(scf, MyFormatConfig.Name, MyFormatConfig.Description);
|
||||
dtl.ShowDialog();
|
||||
}
|
||||
|
||||
private void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
// get a FormatConfig structure that only has differences from the original format. This is what gets saved.
|
||||
FormatConfig tmpForSave = GetChangesUCFForSave();
|
||||
string scf = tmpForSave.ConvertToString();
|
||||
scf = Regex.Replace(scf, " *<[a-zA-Z ]+/>\r\n", "");
|
||||
int fmtid = OriginalPlantFormat.MyFormat is Format ? (OriginalPlantFormat.MyFormat as Format).FormatID : (OriginalPlantFormat.MyFormat as FormatInfo).FormatID;
|
||||
// for now, tell the user that changes don't take affect until reentry. This was done since the 'refresh' of FormatConfig was not
|
||||
// working.
|
||||
using (Format fmt = Format.Get(fmtid))
|
||||
{
|
||||
FormatInfo fi = FormatInfo.GetFormatNoUCFByFormatID(OriginalFormatInfo.FormatID);
|
||||
if (fi.Data == "")
|
||||
{
|
||||
fmt.Data = "";
|
||||
fmt.GenMac = "";
|
||||
}
|
||||
fmt.Config = scf;
|
||||
fmt.Name = MyFormatConfig.Name;
|
||||
fmt.Description = MyFormatConfig.Description;
|
||||
fmt.Save(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
287
PROMS/VEPROMS User Interface/frmUCF.designer.cs
generated
Normal file
287
PROMS/VEPROMS User Interface/frmUCF.designer.cs
generated
Normal file
@ -0,0 +1,287 @@
|
||||
namespace VEPROMS
|
||||
{
|
||||
partial class frmUCF
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
//protected override void Dispose(bool disposing)
|
||||
//{
|
||||
// if (disposing && (components != null))
|
||||
// {
|
||||
// components.Dispose();
|
||||
// }
|
||||
// base.Dispose(disposing);
|
||||
//}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
this.PGpanelBtm = new System.Windows.Forms.Panel();
|
||||
this.btnSave = new System.Windows.Forms.Button();
|
||||
this.btnDelete = new System.Windows.Forms.Button();
|
||||
this.btnReset = new System.Windows.Forms.Button();
|
||||
this.btnSaveAs = new System.Windows.Forms.Button();
|
||||
this.lblPGItem = new System.Windows.Forms.Label();
|
||||
this.btnSaveClose = new System.Windows.Forms.Button();
|
||||
this.btnCancel = new System.Windows.Forms.Button();
|
||||
this.PG = new System.Windows.Forms.PropertyGrid();
|
||||
this.pnlFormatList = new System.Windows.Forms.Panel();
|
||||
this.tbUCFSummary = new System.Windows.Forms.TextBox();
|
||||
this.btnDetails = new System.Windows.Forms.Button();
|
||||
this.lblSummary = new System.Windows.Forms.Label();
|
||||
this.lblDerivedFrom = new System.Windows.Forms.Label();
|
||||
this.lblDerFrom = new System.Windows.Forms.Label();
|
||||
this.cbxFormatList = new System.Windows.Forms.ComboBox();
|
||||
this.lblFormatList = new System.Windows.Forms.Label();
|
||||
this.PGpanelBtm.SuspendLayout();
|
||||
this.pnlFormatList.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
// PGpanelBtm
|
||||
//
|
||||
this.PGpanelBtm.Controls.Add(this.btnSave);
|
||||
this.PGpanelBtm.Controls.Add(this.btnDelete);
|
||||
this.PGpanelBtm.Controls.Add(this.btnReset);
|
||||
this.PGpanelBtm.Controls.Add(this.btnSaveAs);
|
||||
this.PGpanelBtm.Controls.Add(this.lblPGItem);
|
||||
this.PGpanelBtm.Controls.Add(this.btnSaveClose);
|
||||
this.PGpanelBtm.Controls.Add(this.btnCancel);
|
||||
this.PGpanelBtm.Dock = System.Windows.Forms.DockStyle.Bottom;
|
||||
this.PGpanelBtm.Location = new System.Drawing.Point(0, 560);
|
||||
this.PGpanelBtm.Name = "PGpanelBtm";
|
||||
this.PGpanelBtm.Size = new System.Drawing.Size(614, 68);
|
||||
this.PGpanelBtm.TabIndex = 0;
|
||||
//
|
||||
// btnSave
|
||||
//
|
||||
this.btnSave.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btnSave.Enabled = false;
|
||||
this.btnSave.Location = new System.Drawing.Point(164, 0);
|
||||
this.btnSave.Name = "btnSave";
|
||||
this.btnSave.Size = new System.Drawing.Size(75, 68);
|
||||
this.btnSave.TabIndex = 6;
|
||||
this.btnSave.Text = "Save";
|
||||
this.btnSave.UseVisualStyleBackColor = true;
|
||||
this.btnSave.Visible = false;
|
||||
this.btnSave.Click += new System.EventHandler(this.btnSave_Click);
|
||||
//
|
||||
// btnDelete
|
||||
//
|
||||
this.btnDelete.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btnDelete.Enabled = false;
|
||||
this.btnDelete.Location = new System.Drawing.Point(239, 0);
|
||||
this.btnDelete.Name = "btnDelete";
|
||||
this.btnDelete.Size = new System.Drawing.Size(75, 68);
|
||||
this.btnDelete.TabIndex = 5;
|
||||
this.btnDelete.Text = "Delete";
|
||||
this.btnDelete.UseVisualStyleBackColor = true;
|
||||
this.btnDelete.Click += new System.EventHandler(this.btnDelete_Click);
|
||||
//
|
||||
// btnReset
|
||||
//
|
||||
this.btnReset.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btnReset.Enabled = false;
|
||||
this.btnReset.Location = new System.Drawing.Point(314, 0);
|
||||
this.btnReset.Name = "btnReset";
|
||||
this.btnReset.Size = new System.Drawing.Size(75, 68);
|
||||
this.btnReset.TabIndex = 4;
|
||||
this.btnReset.Text = "Reset";
|
||||
this.btnReset.UseVisualStyleBackColor = true;
|
||||
this.btnReset.Click += new System.EventHandler(this.btnReset_Click);
|
||||
//
|
||||
// btnSaveAs
|
||||
//
|
||||
this.btnSaveAs.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btnSaveAs.Enabled = false;
|
||||
this.btnSaveAs.Location = new System.Drawing.Point(389, 0);
|
||||
this.btnSaveAs.Name = "btnSaveAs";
|
||||
this.btnSaveAs.Size = new System.Drawing.Size(75, 68);
|
||||
this.btnSaveAs.TabIndex = 3;
|
||||
this.btnSaveAs.Text = "Save As";
|
||||
this.btnSaveAs.UseVisualStyleBackColor = true;
|
||||
this.btnSaveAs.Click += new System.EventHandler(this.btnSaveAs_Click);
|
||||
//
|
||||
// lblPGItem
|
||||
//
|
||||
this.lblPGItem.AutoSize = true;
|
||||
this.lblPGItem.Location = new System.Drawing.Point(39, 20);
|
||||
this.lblPGItem.Name = "lblPGItem";
|
||||
this.lblPGItem.Size = new System.Drawing.Size(46, 17);
|
||||
this.lblPGItem.TabIndex = 2;
|
||||
this.lblPGItem.Text = "label1";
|
||||
this.lblPGItem.Visible = false;
|
||||
//
|
||||
// btnSaveClose
|
||||
//
|
||||
this.btnSaveClose.DialogResult = System.Windows.Forms.DialogResult.OK;
|
||||
this.btnSaveClose.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btnSaveClose.Enabled = false;
|
||||
this.btnSaveClose.Location = new System.Drawing.Point(464, 0);
|
||||
this.btnSaveClose.Name = "btnSaveClose";
|
||||
this.btnSaveClose.Size = new System.Drawing.Size(75, 68);
|
||||
this.btnSaveClose.TabIndex = 1;
|
||||
this.btnSaveClose.Text = "Save and Close";
|
||||
this.btnSaveClose.UseVisualStyleBackColor = true;
|
||||
this.btnSaveClose.Click += new System.EventHandler(this.btnSaveClose_Click);
|
||||
//
|
||||
// btnCancel
|
||||
//
|
||||
this.btnCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
|
||||
this.btnCancel.Dock = System.Windows.Forms.DockStyle.Right;
|
||||
this.btnCancel.Location = new System.Drawing.Point(539, 0);
|
||||
this.btnCancel.Name = "btnCancel";
|
||||
this.btnCancel.Size = new System.Drawing.Size(75, 68);
|
||||
this.btnCancel.TabIndex = 0;
|
||||
this.btnCancel.Text = "Cancel";
|
||||
this.btnCancel.UseVisualStyleBackColor = true;
|
||||
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
|
||||
//
|
||||
// PG
|
||||
//
|
||||
this.PG.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
|
||||
| System.Windows.Forms.AnchorStyles.Left)));
|
||||
this.PG.Font = new System.Drawing.Font("Arial Rounded MT Bold", 7.8F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
|
||||
this.PG.LineColor = System.Drawing.SystemColors.ControlDark;
|
||||
this.PG.Location = new System.Drawing.Point(0, 155);
|
||||
this.PG.Name = "PG";
|
||||
this.PG.Size = new System.Drawing.Size(614, 405);
|
||||
this.PG.TabIndex = 1;
|
||||
//
|
||||
// pnlFormatList
|
||||
//
|
||||
this.pnlFormatList.Controls.Add(this.tbUCFSummary);
|
||||
this.pnlFormatList.Controls.Add(this.btnDetails);
|
||||
this.pnlFormatList.Controls.Add(this.lblSummary);
|
||||
this.pnlFormatList.Controls.Add(this.lblDerivedFrom);
|
||||
this.pnlFormatList.Controls.Add(this.lblDerFrom);
|
||||
this.pnlFormatList.Controls.Add(this.cbxFormatList);
|
||||
this.pnlFormatList.Controls.Add(this.lblFormatList);
|
||||
this.pnlFormatList.Dock = System.Windows.Forms.DockStyle.Top;
|
||||
this.pnlFormatList.Location = new System.Drawing.Point(0, 0);
|
||||
this.pnlFormatList.Name = "pnlFormatList";
|
||||
this.pnlFormatList.Size = new System.Drawing.Size(614, 149);
|
||||
this.pnlFormatList.TabIndex = 3;
|
||||
//
|
||||
// tbUCFSummary
|
||||
//
|
||||
this.tbUCFSummary.BackColor = System.Drawing.SystemColors.Control;
|
||||
this.tbUCFSummary.BorderStyle = System.Windows.Forms.BorderStyle.None;
|
||||
this.tbUCFSummary.Location = new System.Drawing.Point(33, 120);
|
||||
this.tbUCFSummary.Name = "tbUCFSummary";
|
||||
this.tbUCFSummary.Size = new System.Drawing.Size(485, 15);
|
||||
this.tbUCFSummary.TabIndex = 7;
|
||||
//
|
||||
// btnDetails
|
||||
//
|
||||
this.btnDetails.Location = new System.Drawing.Point(539, 112);
|
||||
this.btnDetails.Name = "btnDetails";
|
||||
this.btnDetails.Size = new System.Drawing.Size(63, 33);
|
||||
this.btnDetails.TabIndex = 6;
|
||||
this.btnDetails.Text = "Details";
|
||||
this.btnDetails.UseVisualStyleBackColor = true;
|
||||
this.btnDetails.Visible = false;
|
||||
this.btnDetails.Click += new System.EventHandler(this.btnDetails_Click);
|
||||
//
|
||||
// lblSummary
|
||||
//
|
||||
this.lblSummary.AutoSize = true;
|
||||
this.lblSummary.Location = new System.Drawing.Point(5, 96);
|
||||
this.lblSummary.Name = "lblSummary";
|
||||
this.lblSummary.Size = new System.Drawing.Size(71, 17);
|
||||
this.lblSummary.TabIndex = 4;
|
||||
this.lblSummary.Text = "Summary:";
|
||||
this.lblSummary.Visible = false;
|
||||
//
|
||||
// lblDerivedFrom
|
||||
//
|
||||
this.lblDerivedFrom.AutoSize = true;
|
||||
this.lblDerivedFrom.Location = new System.Drawing.Point(33, 75);
|
||||
this.lblDerivedFrom.Name = "lblDerivedFrom";
|
||||
this.lblDerivedFrom.Size = new System.Drawing.Size(0, 17);
|
||||
this.lblDerivedFrom.TabIndex = 3;
|
||||
this.lblDerivedFrom.Visible = false;
|
||||
//
|
||||
// lblDerFrom
|
||||
//
|
||||
this.lblDerFrom.AutoSize = true;
|
||||
this.lblDerFrom.Location = new System.Drawing.Point(3, 52);
|
||||
this.lblDerFrom.Name = "lblDerFrom";
|
||||
this.lblDerFrom.Size = new System.Drawing.Size(97, 17);
|
||||
this.lblDerFrom.TabIndex = 2;
|
||||
this.lblDerFrom.Text = "Derived From:";
|
||||
this.lblDerFrom.Visible = false;
|
||||
//
|
||||
// cbxFormatList
|
||||
//
|
||||
this.cbxFormatList.FormattingEnabled = true;
|
||||
this.cbxFormatList.Location = new System.Drawing.Point(23, 25);
|
||||
this.cbxFormatList.Name = "cbxFormatList";
|
||||
this.cbxFormatList.Size = new System.Drawing.Size(550, 24);
|
||||
this.cbxFormatList.Sorted = true;
|
||||
this.cbxFormatList.TabIndex = 1;
|
||||
this.cbxFormatList.SelectedIndexChanged += new System.EventHandler(this.cbxFormatList_SelectedIndexChanged);
|
||||
//
|
||||
// lblFormatList
|
||||
//
|
||||
this.lblFormatList.AutoSize = true;
|
||||
this.lblFormatList.Location = new System.Drawing.Point(5, 4);
|
||||
this.lblFormatList.Name = "lblFormatList";
|
||||
this.lblFormatList.Size = new System.Drawing.Size(115, 17);
|
||||
this.lblFormatList.TabIndex = 0;
|
||||
this.lblFormatList.Text = "Selected Format:";
|
||||
//
|
||||
// frmUCF
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(614, 628);
|
||||
this.Controls.Add(this.pnlFormatList);
|
||||
this.Controls.Add(this.PG);
|
||||
this.Controls.Add(this.PGpanelBtm);
|
||||
this.Name = "frmUCF";
|
||||
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
|
||||
this.Text = "User Control of Format";
|
||||
this.Load += new System.EventHandler(this.frmUCF_Load);
|
||||
this.PGpanelBtm.ResumeLayout(false);
|
||||
this.PGpanelBtm.PerformLayout();
|
||||
this.pnlFormatList.ResumeLayout(false);
|
||||
this.pnlFormatList.PerformLayout();
|
||||
this.ResumeLayout(false);
|
||||
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private System.Windows.Forms.Panel PGpanelBtm;
|
||||
private System.Windows.Forms.Button btnSaveClose;
|
||||
private System.Windows.Forms.Button btnCancel;
|
||||
private System.Windows.Forms.PropertyGrid PG;
|
||||
private System.Windows.Forms.Panel pnlFormatList;
|
||||
private System.Windows.Forms.Label lblFormatList;
|
||||
private System.Windows.Forms.ComboBox cbxFormatList;
|
||||
private System.Windows.Forms.Label lblPGItem;
|
||||
private System.Windows.Forms.Button btnSaveAs;
|
||||
private System.Windows.Forms.Button btnReset;
|
||||
private System.Windows.Forms.Button btnDelete;
|
||||
private System.Windows.Forms.Label lblDerivedFrom;
|
||||
private System.Windows.Forms.Label lblDerFrom;
|
||||
private System.Windows.Forms.Button btnDetails;
|
||||
private System.Windows.Forms.Label lblSummary;
|
||||
private System.Windows.Forms.TextBox tbUCFSummary;
|
||||
private System.Windows.Forms.Button btnSave;
|
||||
|
||||
}
|
||||
}
|
||||
|
120
PROMS/VEPROMS User Interface/frmUCF.resx
Normal file
120
PROMS/VEPROMS User Interface/frmUCF.resx
Normal file
@ -0,0 +1,120 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
@ -197,6 +197,7 @@ namespace VEPROMS
|
||||
{
|
||||
tc.RefreshItem(myItemInfo);
|
||||
}
|
||||
private E_UCFImportOptions _UCFImportOptionsFromSettings;
|
||||
public frmVEPROMS()
|
||||
{
|
||||
// The following Try/Catch was added to protect against a problem seen by Kathy and Michelle
|
||||
@ -550,7 +551,7 @@ namespace VEPROMS
|
||||
{
|
||||
int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, CheckOutType.Session);
|
||||
//int ownerid = MySessionInfo.CheckOutItem(fi.FolderID, (args.Index == 0) ? CheckOutType.Folder : CheckOutType.Session);
|
||||
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this);//Added frmVEPROMS Parameter
|
||||
dlgExportImport dlg = new dlgExportImport(args.Index == 0 ? "Export" : "Import", fi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
if (args.Index == 1 && dlg.MyNewFolder != null)
|
||||
@ -575,7 +576,7 @@ namespace VEPROMS
|
||||
return;
|
||||
}
|
||||
int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion);
|
||||
dlgExportImport dlg = new dlgExportImport("Import", dvi, this);//Added frmVEPROMS Parameter
|
||||
dlgExportImport dlg = new dlgExportImport("Import", dvi, this, (E_UCFImportOptions)Properties.Settings.Default.UCFImportOpt);//Added frmVEPROMS Parameter
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
@ -597,7 +598,7 @@ namespace VEPROMS
|
||||
else
|
||||
{
|
||||
int ownerid = MySessionInfo.CheckOutItem(pi.ItemID, CheckOutType.Procedure);
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi, this);//Added frmVEPROMS Parameter
|
||||
dlgExportImport dlg = new dlgExportImport("Export", pi, this, (E_UCFImportOptions)0);//Added frmVEPROMS Parameter
|
||||
dlg.ShowDialog(this);
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
}
|
||||
@ -1351,6 +1352,9 @@ namespace VEPROMS
|
||||
private DevComponents.DotNetBar.ButtonItem btnManageSecurity;
|
||||
private DevComponents.DotNetBar.ButtonItem btnResetSecurity;
|
||||
private DevComponents.DotNetBar.ButtonItem btnAdministrativeTools;
|
||||
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormats;
|
||||
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsExport;
|
||||
private DevComponents.DotNetBar.ButtonItem btnUserControlOfFormatsImport;
|
||||
private TabItemsToClose _MyCloseTabList = new TabItemsToClose();
|
||||
public TabItemsToClose MyCloseTabList
|
||||
{
|
||||
@ -1497,6 +1501,16 @@ namespace VEPROMS
|
||||
{
|
||||
InitializeSecurity();
|
||||
UpdateUser();
|
||||
|
||||
btnUserControlOfFormats = new ButtonItem("btnUserControlOfFormats", "User Control of Formats");
|
||||
btnAdmin.SubItems.Add(btnUserControlOfFormats);
|
||||
btnUserControlOfFormats.Click += new EventHandler(btnUserControlOfFormats_Click);
|
||||
btnUserControlOfFormatsExport = new ButtonItem("btnUserControlOfFormatsExport", "Export User Control of Formats");
|
||||
btnAdmin.SubItems.Add(btnUserControlOfFormatsExport);
|
||||
btnUserControlOfFormatsExport.Click += new EventHandler(btnUserControlOfFormatsExport_Click);
|
||||
btnUserControlOfFormatsImport = new ButtonItem("btnUserControlOfFormatsImport", "Import User Control of Formats");
|
||||
btnAdmin.SubItems.Add(btnUserControlOfFormatsImport);
|
||||
btnUserControlOfFormatsImport.Click += new EventHandler(btnUserControlOfFormatsImport_Click);
|
||||
btnManageSecurity = new ButtonItem("btnManageSecurity", "Manage Security");
|
||||
btnAdmin.SubItems.Add(btnManageSecurity);
|
||||
btnManageSecurity.Click += new EventHandler(btnManageSecurity_Click);
|
||||
@ -1515,6 +1529,7 @@ namespace VEPROMS
|
||||
this.superTooltip1.SetSuperTooltip(btnExit, new SuperTooltipInfo("Exit", null, null, null, null, eTooltipColor.Gray));
|
||||
this.superTooltip1.SetSuperTooltip(btnOptions, new SuperTooltipInfo("Options", null, null, null, null, eTooltipColor.Gray));
|
||||
this.superTooltip1.SetSuperTooltip(btnManageSecurity, new SuperTooltipInfo("Manage Security", null, null, null, null, eTooltipColor.Gray));
|
||||
this.superTooltip1.SetSuperTooltip(btnUserControlOfFormats, new SuperTooltipInfo("User Control Of Formats", null, null, null, null, eTooltipColor.Gray));
|
||||
this.superTooltip1.SetSuperTooltip(btnResetSecurity, new SuperTooltipInfo("Reset Security",null, null, null, null, eTooltipColor.Gray));
|
||||
this.superTooltip1.SetSuperTooltip(btnAdministrativeTools, new SuperTooltipInfo("Administrative Tools",null, null, null, null, eTooltipColor.Gray));
|
||||
this.superTooltip1.SetSuperTooltip(btnUpdateFormats, new SuperTooltipInfo("Update Formats",null, null, null, null, eTooltipColor.Gray));
|
||||
@ -1545,6 +1560,9 @@ namespace VEPROMS
|
||||
StepRTB.MyUserInfo = MyUserInfo; // set the user's security information in the StepRTB
|
||||
VlnFlexGrid.MyUserInfo = MyUserInfo; // set the user's security information in the VlnFlexGrid
|
||||
bool isVisible = MyUserInfo.IsAdministrator();
|
||||
btnUserControlOfFormats.Visible = isVisible;
|
||||
btnUserControlOfFormatsExport.Visible = isVisible;
|
||||
btnUserControlOfFormatsImport.Visible = isVisible;
|
||||
btnManageSecurity.Visible = isVisible;
|
||||
btnUpdateFormats.Visible = isVisible;
|
||||
btnResetSecurity.Visible = isVisible;
|
||||
@ -2191,6 +2209,27 @@ namespace VEPROMS
|
||||
proxyUser = ui.UserID;
|
||||
}
|
||||
}
|
||||
void btnUserControlOfFormats_Click(object sender, EventArgs e)
|
||||
{
|
||||
frmUCF frmucf = new frmUCF();
|
||||
DialogResult dr = frmucf.ShowDialog(this);
|
||||
}
|
||||
void btnUserControlOfFormatsExport_Click(object sender, EventArgs e)
|
||||
{
|
||||
DocVersionInfo dvi = null;
|
||||
dlgExportImport dlg = new dlgExportImport("Export Formats", dvi, this, (E_UCFImportOptions)0);
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
}
|
||||
void btnUserControlOfFormatsImport_Click(object sender, EventArgs e)
|
||||
{
|
||||
DocVersionInfo dvi = null;
|
||||
dlgExportImport dlg = new dlgExportImport("Import Formats", dvi, this, (E_UCFImportOptions)0);
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
}
|
||||
void btnManageSecurity_Click(object sender, EventArgs e)
|
||||
{
|
||||
dlgManageSecurity dlg = new dlgManageSecurity();
|
||||
|
@ -113,6 +113,26 @@ namespace VEPROMS
|
||||
private void btnVersionsPropOK_Click(object sender, EventArgs e)
|
||||
{
|
||||
docVersionConfigBindingSource.EndEdit(); // need to end the edit session first or any format selection chanage will not stick B2015-157
|
||||
|
||||
// if there is a change to the format, clean up any overridden formats that point to the selected item before saving the format change:
|
||||
if (_DocVersionConfig.MyDocVersion.FormatID != _cmbxformatOriginal)
|
||||
{
|
||||
// clean up & then refresh the configs
|
||||
string strdv = _DocVersionConfig.MyDocVersion.VersionID.ToString();
|
||||
using (ContentInfoList cil = ContentInfoList.ClearOverrideFormatsByDocVersion(strdv, _cmbxformatOriginal, _DocVersionConfig.MyDocVersion.FormatID))
|
||||
{
|
||||
foreach (ContentInfo ci in cil)
|
||||
{
|
||||
using (Content c = ci.Get())
|
||||
{
|
||||
// first refresh configs because the ContentInfo.Refresh causes events to occur that refresh screen
|
||||
// and if configs aren't done first, the screen refresh, if based on config data, will not be correct.
|
||||
foreach (ItemInfo ii in ci.ContentItems) ii.RefreshConfig();
|
||||
ContentInfo.Refresh(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (_DocVersionConfig.Unit_Count > 0 || (_Apples != null && _Apples.Count > 0))
|
||||
{
|
||||
if (_DeletedApples != null && _DeletedApples.Count > 0)
|
||||
@ -315,7 +335,7 @@ namespace VEPROMS
|
||||
_DocVersionConfig.ParentLookup = false;
|
||||
}
|
||||
|
||||
|
||||
private int? _cmbxformatOriginal = null;
|
||||
private void frmVersionsProperties_Load(object sender, EventArgs e)
|
||||
{
|
||||
_Initializing = true;
|
||||
@ -328,6 +348,7 @@ namespace VEPROMS
|
||||
ppCmbxFormat.DisplayMember = "FullName";
|
||||
ppCmbxFormat.ValueMember = "FullName";
|
||||
ppCmbxFormat.DataSource = FormatInfoList.SortedFormatInfoList;
|
||||
_cmbxformatOriginal = _DocVersionConfig.MyDocVersion.FormatID;
|
||||
if (_DocVersionConfig.FormatSelection != null)
|
||||
{
|
||||
ppCmbxFormat.SelectedValue = _DocVersionConfig.FormatSelection;
|
||||
|
Loading…
x
Reference in New Issue
Block a user