Table shrinking support
Support for mutilple ItemIDs in the TextBox in the ToolBar
This commit is contained in:
parent
39f4daa237
commit
cf79062b90
@ -926,30 +926,30 @@ namespace VEPROMS
|
||||
if (MySessionInfo.ChangedItems.Count > 0)
|
||||
{
|
||||
foreach (int id in MySessionInfo.ChangedItems.Keys)
|
||||
{
|
||||
{
|
||||
if (ItemInfo.IsInCache(id))
|
||||
mUIContext.Post(MyFindNodeAndExpand, id);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (MySessionInfo.ChangedContents.Count > 0)
|
||||
foreach (int id in MySessionInfo.ChangedContents.Keys)
|
||||
{
|
||||
foreach (int id in MySessionInfo.ChangedContents.Keys)
|
||||
{
|
||||
if (ContentInfo.IsInCache(id))
|
||||
{
|
||||
ContentInfo ci = ContentInfo.Get(id);
|
||||
//if (ci.LastChangedInt64 > MySessionInfo.LastChangedInt64)
|
||||
if (MySessionInfo.LastContentChange >= ci.LastChangedInt64)
|
||||
{
|
||||
using (Content c = Content.Get(id))
|
||||
{
|
||||
ContentInfo.Refresh(c);
|
||||
}
|
||||
}
|
||||
using (Content c = Content.Get(id))
|
||||
{
|
||||
ContentInfo.Refresh(c);
|
||||
}
|
||||
}
|
||||
}
|
||||
lastChanged = MySessionInfo.ChangedContents[id];
|
||||
}
|
||||
MySessionInfo.ChangedItems.Clear();
|
||||
MySessionInfo.ChangedContents.Clear();
|
||||
MySessionInfo.ChangedContents.Clear();
|
||||
if (lastChanged > 0)
|
||||
{
|
||||
MySessionInfo.LastContentChange = lastChanged;
|
||||
@ -1024,17 +1024,17 @@ namespace VEPROMS
|
||||
MySessionInfo = SessionInfo.BeginSession(Environment.MachineName, System.Diagnostics.Process.GetCurrentProcess().Id);
|
||||
this.LastContentChange = MySessionInfo.LastContentChange;
|
||||
RefreshLastChange();
|
||||
if (MySessionInfo == null)
|
||||
{
|
||||
MessageBox.Show("This database is locked by the Administrator. Please try again later", "PROMS is Locked");
|
||||
Application.Exit();
|
||||
}
|
||||
if (MySessionInfo == null)
|
||||
{
|
||||
MessageBox.Show("This database is locked by the Administrator. Please try again later", "PROMS is Locked");
|
||||
Application.Exit();
|
||||
}
|
||||
tc.MySessionInfo = MySessionInfo;
|
||||
tv.MySessionInfo = MySessionInfo;
|
||||
System.Threading.AutoResetEvent autoEvent = new System.Threading.AutoResetEvent(false);
|
||||
//System.Threading.TimerCallback timerDelegate = new System.Threading.TimerCallback(MySessionInfo.PingSession);
|
||||
//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);
|
||||
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
|
||||
this.txtSearch.KeyPress += new KeyPressEventHandler(txtSearch_KeyPress);
|
||||
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.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
|
||||
if (Settings.Default["Location"] != null) this.Location = Settings.Default.Location;
|
||||
if (Settings.Default["Size"] != null) this.Size = Settings.Default.Size;
|
||||
@ -1060,7 +1059,7 @@ namespace VEPROMS
|
||||
// if the Procedures panel was left open from the last session, then open it
|
||||
epProcedures.Expanded = Settings.Default.TreeviewExpanded;
|
||||
if (Settings.Default["QATItems"] != null) ribbonControl1.QatLayout = Settings.Default.QATItems;
|
||||
|
||||
|
||||
// See if any database 'changes' need done and do them:
|
||||
MakeDatabaseChanges();
|
||||
|
||||
@ -1087,7 +1086,7 @@ namespace VEPROMS
|
||||
ctrlAnnotationDetails.SetupAnnotations(displaySearch1);
|
||||
SetupButtons();
|
||||
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);
|
||||
tc.Enter += new EventHandler(tc_Enter);
|
||||
tc.Leave += new EventHandler(tc_Leave);
|
||||
@ -1113,7 +1112,7 @@ namespace VEPROMS
|
||||
// btnAdmin.Visible = false;
|
||||
StepTabRibbon.PasteNoReturnsSetting = Properties.Settings.Default.PasteNoReturns;
|
||||
StepTabRibbon.PastePlainTextSetting = Properties.Settings.Default.PastePlainText;
|
||||
Activate();
|
||||
Activate();
|
||||
//FolderInfo fi = FolderInfo.Get(1);
|
||||
//FormatInfo frmI = FormatInfo.Get(fi.FormatID ?? 1);
|
||||
//if (frmI.PlantFormat.FormatData.ProcData.ChangeBarData.ChangeIds)
|
||||
@ -1121,13 +1120,11 @@ namespace VEPROMS
|
||||
// dlgChgId dlgCI = new dlgChgId(tc);
|
||||
// dlgCI.ShowDialog(this);
|
||||
//}
|
||||
// RHM20150506 Multiline ItemID TextBox
|
||||
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;
|
||||
// RHM20150506 Multiline ItemID TextBox
|
||||
this.txtSearch.Text = Volian.Base.Library.VlnSettings.GetCommand("ItemIDs", "").Replace(",","\r\n");
|
||||
}
|
||||
// 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)
|
||||
{
|
||||
string[] ids = txtSearch.Text.Split("\r\n ".ToCharArray());
|
||||
@ -1135,21 +1132,20 @@ namespace VEPROMS
|
||||
foreach (string id in ids)
|
||||
{
|
||||
if(id != "")
|
||||
{
|
||||
{
|
||||
ItemInfo ii = GetItemInfoFromString(id);
|
||||
if (!dicProcs.ContainsKey(ii.MyProcedure.ItemID))
|
||||
dicProcs.Add(ii.MyProcedure.ItemID, ii.MyProcedure);
|
||||
}
|
||||
}
|
||||
}
|
||||
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);
|
||||
//Rtf2Pdf.AllowTableScrunching = TableScrunching.None;//TableScrunching.Phase1 | TableScrunching.Phase2 | TableScrunching.Phase3 | TableScrunching.Phase4| TableScrunching.Phase5 | TableScrunching.Phase6 | TableScrunching.Phase7 | TableScrunching.Phase8;
|
||||
//Rtf2Pdf.AllowTableScrunching = TableScrunching.Phase5 | TableScrunching.Phase2 | TableScrunching.Phase3 | TableScrunching.Phase4| TableScrunching.Phase5 | TableScrunching.Phase6 | TableScrunching.Phase7 | TableScrunching.Phase8 |
|
||||
// 0;
|
||||
// RHM20150507 Table Scrunch
|
||||
Rtf2Pdf.AllowTableScrunching = cbScrunch.Checked ? _DefaultScrunchingRules : TableScrunching.None;
|
||||
foreach (int key in dicProcs.Keys)
|
||||
{
|
||||
ProcedureInfo proc = dicProcs[key];
|
||||
Console.WriteLine("{0}", proc.ShortPath);
|
||||
//Console.WriteLine("{0}", proc.ShortPath);
|
||||
DlgPrintProcedure prnDlg = new DlgPrintProcedure(proc,true);//dvi.DocVersionConfig,pnum);
|
||||
prnDlg.MySessionInfo = MySessionInfo;
|
||||
//prnDlg.ShowDialog(this); // RHM 20120925 - Center dialog over PROMS window
|
||||
@ -1163,17 +1159,17 @@ namespace VEPROMS
|
||||
bool ProcessingPaste = false;
|
||||
private void txtSearch_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (!ProcessingPaste)
|
||||
if (!ProcessingPaste) // RHM20150507 Multiline ItemID TextBox
|
||||
{
|
||||
ProcessingPaste = true;
|
||||
if (txtSearch.Text.Contains("\n"))
|
||||
{
|
||||
ProcessingPaste = true;
|
||||
txtSearch.Text = txtSearch.Text.Trim("\r\n ".ToCharArray());
|
||||
btnNext.Visible = btnPrint1.Visible = cbScrunch.Visible = btnPrevious.Visible = txtSearch.Text.Contains("\r\n");
|
||||
txtSearch.SelectionStart = 0;
|
||||
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)
|
||||
@ -1273,22 +1269,22 @@ namespace VEPROMS
|
||||
}
|
||||
}
|
||||
if (e.KeyChar == 1 || e.KeyChar==22)
|
||||
{
|
||||
{
|
||||
e.Handled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OpenMyItem(string str) // RHM20150506 Multiline ItemID TextBox
|
||||
{
|
||||
ItemInfo ii = GetItemInfoFromString(str); // RHM20150506 Multiline ItemID TextBox
|
||||
if (ii != null)
|
||||
{
|
||||
tc.OpenItem(ii);
|
||||
tv.AdjustTree(ii);
|
||||
}
|
||||
else
|
||||
MessageBox.Show("No item found");
|
||||
}
|
||||
if (ii != null)
|
||||
{
|
||||
tc.OpenItem(ii);
|
||||
tv.AdjustTree(ii);
|
||||
}
|
||||
else
|
||||
MessageBox.Show("No item found");
|
||||
}
|
||||
|
||||
private static ItemInfo GetItemInfoFromString(string str) // RHM20150506 Multiline ItemID TextBox
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user