This commit is contained in:
John Jenko 2010-06-24 15:19:46 +00:00
parent af197dbd05
commit f2ab81f97d
2 changed files with 81 additions and 56 deletions

View File

@ -278,8 +278,16 @@ namespace VEPROMS.CSLA.Library
//If there is no parent value, then use the volian default
if (s == string.Empty)
{
bool rval = MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.BreakOnSections;
return (rval)? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
if (MyFormat != null)
{
bool rval = MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.BreakOnSections;
return (rval) ? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
}
else
{
bool rval = MyDefaultFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.BreakOnSections;
return (rval) ? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default
}
}
return (SectionPagination)int.Parse(s);
@ -424,8 +432,16 @@ namespace VEPROMS.CSLA.Library
// If there is no parent value, then use the volian default
if (s == string.Empty)
{
int rval = (int)MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PMode;
return (SectionColumnMode)rval;//SectionColumnMode.Two; //SectionColumnMode.Default;// default to volian default
if (MyFormat != null)
{
int rval = (int)MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PMode;
return (SectionColumnMode)rval;//SectionColumnMode.Two; //SectionColumnMode.Default;// default to volian default
}
else
{
int rval = (int)MyDefaultFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PMode;
return (SectionColumnMode)rval;
}
}
else
return (SectionColumnMode)int.Parse(s);

View File

@ -474,7 +474,7 @@ namespace Volian.Controls.Library
{
_MouseDown = true;
//Console.WriteLine("vvvvvvvvvv StepRTB Mouse Down id= {0}",MyItemInfo.ItemID);
if (!_ContextMenuStripChanged)
if (!_ContextMenuStripChanged && this.MyStepItem != null)
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.SetContextMenu();
_ContextMenuStripChanged = false;
}
@ -1357,50 +1357,53 @@ namespace Volian.Controls.Library
{
if (e.Control)
{
if (e.Alt)
if (this.MyStepItem != null)
{
switch (e.KeyCode)
if (e.Alt)
{
case Keys.M:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.btnAnnots_Click(sender, e);
e.Handled = true;
break;
default:
break;
switch (e.KeyCode)
{
case Keys.M:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.btnAnnots_Click(sender, e);
e.Handled = true;
break;
default:
break;
}
}
}
if (e.Shift)
{
switch (e.KeyCode)
if (e.Shift)
{
case Keys.F:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsFigure");
e.Handled = true;
break;
case Keys.T:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsTable");
e.Handled = true;
break;
case Keys.N:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsNote");
e.Handled = true;
break;
case Keys.C:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsCaution");
e.Handled = true;
break;
case Keys.S:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsSubStps");
e.Handled = true;
break;
case Keys.H:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsHLS");
e.Handled = true;
break;
case Keys.R:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsRNO");
e.Handled = true;
break;
switch (e.KeyCode)
{
case Keys.F:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsFigure");
e.Handled = true;
break;
case Keys.T:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsTable");
e.Handled = true;
break;
case Keys.N:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsNote");
e.Handled = true;
break;
case Keys.C:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsCaution");
e.Handled = true;
break;
case Keys.S:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsSubStps");
e.Handled = true;
break;
case Keys.H:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsHLS");
e.Handled = true;
break;
case Keys.R:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("InsRNO");
e.Handled = true;
break;
}
}
}
}
@ -1503,8 +1506,11 @@ namespace Volian.Controls.Library
e.Handled = true;
break;
case Keys.Enter:
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.btnInsPgBrk_Click(sender, e);
e.Handled = true;
if (this.MyStepItem != null)
{
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.btnInsPgBrk_Click(sender, e);
e.Handled = true;
}
break;
}
}
@ -1668,15 +1674,18 @@ namespace Volian.Controls.Library
e.Handled = true;
break;
case Keys.F5:
if (e.Shift)
if (this.MyStepItem != null)
{
e.Handled = true;
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("StepPaste");
}
else if (!e.Control && !e.Alt)
{
e.Handled = true;
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.DoCopyStep();
if (e.Shift)
{
e.Handled = true;
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("StepPaste");
}
else if (!e.Control && !e.Alt)
{
e.Handled = true;
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.DoCopyStep();
}
}
break;
case Keys.F6:
@ -1690,7 +1699,7 @@ namespace Volian.Controls.Library
case Keys.Enter:
if (!e.Control && !e.Shift && !e.Alt)
{
if (!MyStepItem.MyItemInfo.IsTablePart)
if (MyStepItem != null && !MyStepItem.MyItemInfo.IsTablePart)
{
e.Handled = true;
MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ProcessEnterKey();