Table shrinking support

Support for mutilple ItemIDs in the TextBox in the ToolBar
This commit is contained in:
Rich 2015-05-27 18:46:57 +00:00
parent 39f4daa237
commit cf79062b90

View File

@ -1034,7 +1034,7 @@ namespace VEPROMS
System.Threading.AutoResetEvent autoEvent = new System.Threading.AutoResetEvent(false); System.Threading.AutoResetEvent autoEvent = new System.Threading.AutoResetEvent(false);
//System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(MySessionInfo.PingSession); //System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(MySessionInfo.PingSession);
//System.Diagnostics.Process xyzzy = System.Diagnostics.Process.GetCurrentProcess(); //System.Diagnostics.Process xyzzy = System.Diagnostics.Process.GetCurrentProcess();
if (!System.Diagnostics.Debugger.IsAttached) if(!System.Diagnostics.Debugger.IsAttached)
{ {
System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(this.PingSession); System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(this.PingSession);
MyActivityTimer = new System.Threading.Timer(timerDelegate, autoEvent, 10000, 10000); MyActivityTimer = new System.Threading.Timer(timerDelegate, autoEvent, 10000, 10000);
@ -1048,10 +1048,9 @@ namespace VEPROMS
// get the saved location and size of the VE-PROMS appication for this user // get the saved location and size of the VE-PROMS appication for this user
this.txtSearch.KeyPress += new KeyPressEventHandler(txtSearch_KeyPress); this.txtSearch.KeyPress += new KeyPressEventHandler(txtSearch_KeyPress);
this.txtSearch.KeyUp += txtSearch_KeyUp; // RHM20150506 Multiline ItemID TextBox this.txtSearch.KeyUp += txtSearch_KeyUp; // RHM20150506 Multiline ItemID TextBox
this.txtSearch.TextChanged += txtSearch_TextChanged; // RHM20150506 Multiline ItemID TextBox this.txtSearch.TextChanged+=txtSearch_TextChanged; // RHM20150506 Multiline ItemID TextBox
this.btnNext.Click += btnNext_Click; // RHM20150506 Multiline ItemID TextBox this.btnNext.Click += btnNext_Click; // RHM20150506 Multiline ItemID TextBox
this.btnPrint1.Click += btnPrint1_Click; // RHM20150506 Multiline ItemID TextBox this.btnPrint1.Click += btnPrint1_Click; // RHM20150506 Multiline ItemID TextBox
this.cbScrunch.Click += cbScrunch_Click; // RHM20150506 Multiline ItemID TextBox
this.btnPrevious.Click += btnPrevious_Click; // RHM20150506 Multiline ItemID TextBox this.btnPrevious.Click += btnPrevious_Click; // RHM20150506 Multiline ItemID TextBox
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location; if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size; if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
@ -1087,7 +1086,7 @@ namespace VEPROMS
ctrlAnnotationDetails.SetupAnnotations(displaySearch1); ctrlAnnotationDetails.SetupAnnotations(displaySearch1);
SetupButtons(); SetupButtons();
displayBookMarks.MyDisplayTabControl = tc; // allows bookmark selection to bring up steps/docs displayBookMarks.MyDisplayTabControl = tc; // allows bookmark selection to bring up steps/docs
office2007StartButton1.MouseDown += new MouseEventHandler(office2007StartButton1_MouseDown); office2007StartButton1.MouseDown +=new MouseEventHandler(office2007StartButton1_MouseDown);
//displayRO.EnabledChanged += new EventHandler(displayRO_EnabledChanged); //displayRO.EnabledChanged += new EventHandler(displayRO_EnabledChanged);
tc.Enter += new EventHandler(tc_Enter); tc.Enter += new EventHandler(tc_Enter);
tc.Leave += new EventHandler(tc_Leave); tc.Leave += new EventHandler(tc_Leave);
@ -1122,12 +1121,10 @@ namespace VEPROMS
// dlgCI.ShowDialog(this); // dlgCI.ShowDialog(this);
//} //}
// RHM20150506 Multiline ItemID TextBox // RHM20150506 Multiline ItemID TextBox
this.txtSearch.Text = Volian.Base.Library.VlnSettings.GetCommand("ItemIDs", "").Replace(",", "\r\n"); this.txtSearch.Text = Volian.Base.Library.VlnSettings.GetCommand("ItemIDs", "").Replace(",","\r\n");
}
void cbScrunch_Click(object sender, EventArgs e) // RHM20150506 Multiline ItemID TextBox
{
//Rtf2Pdf._AllowTableScrunching = TableScrunching.Phase1;
} }
// RHM20150507 Table Scrunch
private TableScrunching _DefaultScrunchingRules = TableScrunching.Phase1 | TableScrunching.Phase5 | TableScrunching.Phase2 | TableScrunching.Phase3 | TableScrunching.Phase4 | TableScrunching.Phase5 | TableScrunching.Phase6 | TableScrunching.Phase7 | TableScrunching.Phase8;
void btnPrint1_Click(object sender, EventArgs e) void btnPrint1_Click(object sender, EventArgs e)
{ {
string[] ids = txtSearch.Text.Split("\r\n ".ToCharArray()); string[] ids = txtSearch.Text.Split("\r\n ".ToCharArray());
@ -1143,13 +1140,12 @@ namespace VEPROMS
} }
DialogResult dr = System.Windows.Forms.DialogResult.Yes; DialogResult dr = System.Windows.Forms.DialogResult.Yes;
//dr = MessageBox.Show("Do you want all of the PDFs to be opened?", "Open After Create", MessageBoxButtons.YesNo, MessageBoxIcon.Question); //dr = MessageBox.Show("Do you want all of the PDFs to be opened?", "Open After Create", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
//Rtf2Pdf.AllowTableScrunching = TableScrunching.None;//TableScrunching.Phase1 | TableScrunching.Phase2 | TableScrunching.Phase3 | TableScrunching.Phase4| TableScrunching.Phase5 | TableScrunching.Phase6 | TableScrunching.Phase7 | TableScrunching.Phase8; // RHM20150507 Table Scrunch
//Rtf2Pdf.AllowTableScrunching = TableScrunching.Phase5 | TableScrunching.Phase2 | TableScrunching.Phase3 | TableScrunching.Phase4| TableScrunching.Phase5 | TableScrunching.Phase6 | TableScrunching.Phase7 | TableScrunching.Phase8 | Rtf2Pdf.AllowTableScrunching = cbScrunch.Checked ? _DefaultScrunchingRules : TableScrunching.None;
// 0;
foreach (int key in dicProcs.Keys) foreach (int key in dicProcs.Keys)
{ {
ProcedureInfo proc = dicProcs[key]; ProcedureInfo proc = dicProcs[key];
Console.WriteLine("{0}", proc.ShortPath); //Console.WriteLine("{0}", proc.ShortPath);
DlgPrintProcedure prnDlg = new DlgPrintProcedure(proc,true);//dvi.DocVersionConfig,pnum); DlgPrintProcedure prnDlg = new DlgPrintProcedure(proc,true);//dvi.DocVersionConfig,pnum);
prnDlg.MySessionInfo = MySessionInfo; prnDlg.MySessionInfo = MySessionInfo;
//prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window //prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
@ -1163,17 +1159,17 @@ namespace VEPROMS
bool ProcessingPaste = false; bool ProcessingPaste = false;
private void txtSearch_TextChanged(object sender, EventArgs e) private void txtSearch_TextChanged(object sender, EventArgs e)
{ {
if (!ProcessingPaste) if (!ProcessingPaste) // RHM20150507 Multiline ItemID TextBox
{
if (txtSearch.Text.Contains("\n"))
{ {
ProcessingPaste = true; ProcessingPaste = true;
if (txtSearch.Text.Contains("\n"))
{
txtSearch.Text = txtSearch.Text.Trim("\r\n ".ToCharArray()); txtSearch.Text = txtSearch.Text.Trim("\r\n ".ToCharArray());
btnNext.Visible = btnPrint1.Visible = cbScrunch.Visible = btnPrevious.Visible = txtSearch.Text.Contains("\r\n");
txtSearch.SelectionStart = 0; txtSearch.SelectionStart = 0;
CurrentID = GetCurrentLine(); CurrentID = GetCurrentLine();
ProcessingPaste = false;
} }
btnNext.Visible = btnPrint1.Visible = cbScrunch.Visible = btnPrevious.Visible = txtSearch.Text.Contains("\r\n");
ProcessingPaste = false;
} }
} }
void btnPrevious_Click(object sender, EventArgs e) void btnPrevious_Click(object sender, EventArgs e)