Fixed populating change list tab for single unit sites

Refresh Context Menu when keyboard is used to activate it.
This commit is contained in:
Rich 2013-01-09 20:34:07 +00:00
parent 888db4bade
commit dd6285f4a4
2 changed files with 26 additions and 19 deletions

View File

@ -57,7 +57,7 @@ namespace Volian.Controls.Library
_MyProcedureInfo = value;
if (value == null) return;
SetRevDate(MyProcedureInfo.DTS);
if (_MyProcedureInfo != null && this.Visible)
if (_MyProcedureInfo != null && RefreshRequired && lbChanges.Visible)
WalkProcedure();
}
}
@ -81,10 +81,8 @@ namespace Volian.Controls.Library
this.Visible = true;
UpdateHistory();
if (this.lbChanges.Visible && RefreshRequired)
{
WalkProcedure();
}
}
else
this.Visible = false;
}
@ -134,6 +132,8 @@ namespace Volian.Controls.Library
SetRevDate(DateTime.Parse(cfg.Print_RevDate));
}
else
{
if (MyProcedureInfo.MyDocVersion.DocVersionConfig.Unit_Count > 1)
{
DateTime minDts = DateTime.MaxValue;
for (int j = 1; j <= MyProcedureInfo.MyDocVersion.DocVersionConfig.Unit_Count; j++)
@ -150,6 +150,15 @@ namespace Volian.Controls.Library
}
SetRevDate(minDts);
}
else
{
ProcedureConfig cfg = MyProcedureInfo.MyConfig as ProcedureConfig;
if (cfg.Print_RevDate == null || cfg.Print_RevDate == string.Empty)
SetRevDate(MyProcedureInfo.DTS);
else
SetRevDate(DateTime.Parse(cfg.Print_RevDate));
}
}
}
}
private DateTime _MyRevDate;
@ -164,7 +173,6 @@ namespace Volian.Controls.Library
InitializeComponent();
myRTB.FormatFont = null;
RefreshRequired = true;
//tabControl1.SelectedTab = tabItem2;// Start with Change List
}
private void lbChanges_VisibleChanged(object sender, System.EventArgs e)
@ -173,12 +181,8 @@ namespace Volian.Controls.Library
{
ApplDisplayMode = 0;
}
if (RefreshRequired)
{
Console.WriteLine("before walkprocedure - {0}", DateTime.Now.ToLongTimeString());
if (lbChanges.Visible && RefreshRequired)
WalkProcedure();
Console.WriteLine("after walkprocedure - {0}", DateTime.Now.ToLongTimeString());
}
}
private void lbChanges_SelectedIndexChanged(object sender, EventArgs e)

View File

@ -1785,6 +1785,9 @@ namespace Volian.Controls.Library
private bool _SendBackSpace = false;
void StepRTB_KeyDown(object sender, KeyEventArgs e)
{
// added jcb 20130103 to support set ro from word doc with annotation when right click menu is opened by keyboard
if (e.KeyCode == Keys.Apps)
OnSetMenu(this, new StepRTBMenuEventArgs("OpenContextMenu"));
if (e.Control)
{
IsControlChar = true;