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 there is no parent value, then use the volian default
if (s == string.Empty) if (s == string.Empty)
{ {
bool rval = MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.BreakOnSections; if (MyFormat != null)
return (rval)? SectionPagination.Separate : SectionPagination.Continuous;// default to volian default {
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); 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 there is no parent value, then use the volian default
if (s == string.Empty) if (s == string.Empty)
{ {
int rval = (int)MyFormat.PlantFormat.FormatData.SectData.StepSectionData.StepSectionLayoutData.PMode; if (MyFormat != null)
return (SectionColumnMode)rval;//SectionColumnMode.Two; //SectionColumnMode.Default;// default to volian default {
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 else
return (SectionColumnMode)int.Parse(s); return (SectionColumnMode)int.Parse(s);

View File

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