Added Separate Window Preference
Added error handling for External Transitions to deleted Procedure. Added File extension parameter to Make Document DB Command Line Parameter now supports server name and ItemIDs. Added Separate Window Preference Added capability to Update Format and then close. Command Line Parameter /P= with no IDs shutsdown immediately. Changed code so that the Anotation panels stay expanded. Added Console Writeline output when Formats are updated. Attached Console Output to Parent. This allows the Console output to be output to a command window when a Batch FIle is used to Update Formats.
This commit is contained in:
@@ -247,11 +247,9 @@ namespace VEPROMS
|
||||
cmbFont.DisplayMember = "Name";
|
||||
cmbFont.SelectedIndex = -1;
|
||||
string[] parameters = System.Environment.CommandLine.Split(" ".ToCharArray());
|
||||
foreach (string parameter in parameters)
|
||||
{
|
||||
if (parameter.StartsWith("/DB="))
|
||||
Database.SelectedDatabase = parameter.Substring(4);
|
||||
}
|
||||
string db = Volian.Base.Library.VlnSettings.GetDB();
|
||||
if(db != null)
|
||||
Database.SelectedDatabase = db;
|
||||
if (Properties.Settings.Default["DefaultDB"] != string.Empty)
|
||||
Database.LastDatabase = Properties.Settings.Default.DefaultDB;
|
||||
// Setup the Context menu for DisplaySearch including the symbols
|
||||
@@ -449,10 +447,14 @@ namespace VEPROMS
|
||||
{
|
||||
int ownerid = MySessionInfo.CheckOutItem(dvi.VersionID, CheckOutType.DocVersion);
|
||||
dlgExportImport dlg = new dlgExportImport("Import", dvi);
|
||||
dlg.MyNewProcedure = null;
|
||||
dlg.ExternalTransitionItem = null;
|
||||
dlg.ShowDialog(this);
|
||||
MySessionInfo.CheckInItem(ownerid);
|
||||
if(dlg.MyNewProcedure != null)
|
||||
tv.AddNewNode(dlg.MyNewProcedure);
|
||||
if (dlg.ExternalTransitionItem != null)
|
||||
tc.OpenItem(dlg.ExternalTransitionItem);
|
||||
}
|
||||
}
|
||||
if (pi != null)
|
||||
@@ -1253,7 +1255,10 @@ namespace VEPROMS
|
||||
// dlgCI.ShowDialog(this);
|
||||
//}
|
||||
// RHM20150506 Multiline ItemID TextBox
|
||||
this.txtSearch.Text = Volian.Base.Library.VlnSettings.GetCommand("ItemIDs", "").Replace(",","\r\n");
|
||||
this.txtSearch.Text = Volian.Base.Library.VlnSettings.GetItemIDs().Replace(",","\r\n");
|
||||
// Open First Item
|
||||
if (this.txtSearch.Text.Length > 0 && !this.txtSearch.Text.Contains("\r\n"))
|
||||
CurrentID = txtSearch.Text;
|
||||
}
|
||||
/// <summary>
|
||||
/// This looks for sessions associated with the current PC and user which are no longer active and removes them.
|
||||
@@ -1285,29 +1290,36 @@ namespace VEPROMS
|
||||
//}
|
||||
void tc_OpenEnhancedDocument(object sender, ItemSelectedChangedEventArgs args)
|
||||
{
|
||||
if (!tc.dicEnhancedDocuments.ContainsKey(args.MyItemInfo.MyProcedure.MyDocVersion))
|
||||
if (!Properties.Settings.Default.SeparateWindows)
|
||||
{
|
||||
frmEnhanced frm = new frmEnhanced(args.MyItemInfo);
|
||||
foreach(VersionWindow vw in MyVersionWindowList)
|
||||
if (vw.VersionID == args.MyItemInfo.MyProcedure.MyDocVersion.VersionID)
|
||||
{
|
||||
frm.SetDesktopBounds(vw.MyRectangle.Left, vw.MyRectangle.Top, vw.MyRectangle.Width, vw.MyRectangle.Height);
|
||||
break;
|
||||
}
|
||||
frm.Move += frmEnhancedDocumentResize;
|
||||
frm.Resize += frmEnhancedDocumentResize;
|
||||
frm.MySessionInfo = MySessionInfo;
|
||||
tc.dicEnhancedDocuments.Add(args.MyItemInfo.MyProcedure.MyDocVersion, frm);
|
||||
frm.FormClosed += frm_FormClosed;
|
||||
//frm.Show(this); When this was specified the child form displayed on top of the parent form.
|
||||
frm.Show(); // With this removed either form can be on top (user selectable - currently active form on top)
|
||||
tc.OpenItem(args.MyItemInfo);
|
||||
}
|
||||
else
|
||||
{
|
||||
frmEnhanced frm = tc.dicEnhancedDocuments[args.MyItemInfo.MyProcedure.MyDocVersion];
|
||||
frm.MyItemInfo = args.MyItemInfo;
|
||||
frm.OpenItem();
|
||||
}
|
||||
if (!tc.dicEnhancedDocuments.ContainsKey(args.MyItemInfo.MyProcedure.MyDocVersion))
|
||||
{
|
||||
frmEnhanced frm = new frmEnhanced(args.MyItemInfo);
|
||||
foreach (VersionWindow vw in MyVersionWindowList)
|
||||
if (vw.VersionID == args.MyItemInfo.MyProcedure.MyDocVersion.VersionID)
|
||||
{
|
||||
frm.SetDesktopBounds(vw.MyRectangle.Left, vw.MyRectangle.Top, vw.MyRectangle.Width, vw.MyRectangle.Height);
|
||||
break;
|
||||
}
|
||||
frm.Move += frmEnhancedDocumentResize;
|
||||
frm.Resize += frmEnhancedDocumentResize;
|
||||
frm.MySessionInfo = MySessionInfo;
|
||||
tc.dicEnhancedDocuments.Add(args.MyItemInfo.MyProcedure.MyDocVersion, frm);
|
||||
frm.FormClosed += frm_FormClosed;
|
||||
//frm.Show(this); When this was specified the child form displayed on top of the parent form.
|
||||
frm.Show(); // With this removed either form can be on top (user selectable - currently active form on top)
|
||||
}
|
||||
else
|
||||
{
|
||||
frmEnhanced frm = tc.dicEnhancedDocuments[args.MyItemInfo.MyProcedure.MyDocVersion];
|
||||
frm.MyItemInfo = args.MyItemInfo;
|
||||
frm.OpenItem();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void frmEnhancedDocumentResize(object sender, EventArgs e)
|
||||
@@ -1808,17 +1820,20 @@ namespace VEPROMS
|
||||
string[] dvstrs = parameter.Substring(3).Split(",".ToCharArray());
|
||||
foreach (string dvstr in dvstrs)
|
||||
{
|
||||
DocVersionInfo dvi = DocVersionInfo.Get(int.Parse(dvstr));
|
||||
if (dvi != null)
|
||||
if (dvstr != "")
|
||||
{
|
||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi,true);
|
||||
if (dvi.MultiUnitCount == 0)
|
||||
prnDlg.SelectedSlave = -1;
|
||||
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||
//prnDlg.FormClosed += new FormClosedEventHandler(prnDlg_FormClosed);
|
||||
//while (!_RunNext) Application.DoEvents();
|
||||
ranAuto = true;
|
||||
DocVersionInfo dvi = DocVersionInfo.Get(int.Parse(dvstr));
|
||||
if (dvi != null)
|
||||
{
|
||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(dvi, true);
|
||||
if (dvi.MultiUnitCount == 0)
|
||||
prnDlg.SelectedSlave = -1;
|
||||
prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||
//prnDlg.FormClosed += new FormClosedEventHandler(prnDlg_FormClosed);
|
||||
//while (!_RunNext) Application.DoEvents();
|
||||
}
|
||||
}
|
||||
ranAuto = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2853,8 +2868,8 @@ namespace VEPROMS
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!btnAnnoDetailsPushPin.Checked)
|
||||
epAnnotations.Expanded = false;
|
||||
//if (!btnAnnoDetailsPushPin.Checked)
|
||||
// epAnnotations.Expanded = false;
|
||||
epAnnotations.TitleStyle.BackColor1.Color = _CommentTitleBckColor;
|
||||
ctrlAnnotationDetails.AnnotationText = null;
|
||||
}
|
||||
@@ -3342,6 +3357,7 @@ namespace VEPROMS
|
||||
Format.FormatLoaded += new FormatEvent(Format_FormatLoaded);
|
||||
Format.UpdateFormats(fmtPathAll, genmacPathAll);
|
||||
Format.FormatLoaded -= new FormatEvent(Format_FormatLoaded);
|
||||
_MyLog.WarnFormat("Formats in {0} updated to {1}", Database.SelectedDatabase, fmtPathAll);
|
||||
}
|
||||
|
||||
void Format_FormatLoaded(object sender, FormatEventArgs args)
|
||||
@@ -3360,6 +3376,7 @@ namespace VEPROMS
|
||||
bottomProgBar.Text = args.Status;
|
||||
bottomProgBar.TextVisible = true;
|
||||
Application.DoEvents();
|
||||
Console.WriteLine(args.Status);
|
||||
}
|
||||
|
||||
private void btnSendErrorLog_Click(object sender, EventArgs e)
|
||||
|
Reference in New Issue
Block a user