support for StepRTB on property pages
This commit is contained in:
parent
232d0d9b41
commit
e35ea8b8c5
@ -160,7 +160,7 @@ namespace Volian.Controls.Library
|
||||
Control = _MyStepTabPanel;
|
||||
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||
Text = _MyItemInfo.TabTitle;
|
||||
Tooltip = _MyItemInfo.TabToolTip;
|
||||
Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011","-");
|
||||
//
|
||||
_MyDisplayTabControl.Controls.Add(_MyStepTabPanel);
|
||||
_MyDisplayTabControl.MyBar.Items.Add(this);
|
||||
@ -185,7 +185,7 @@ namespace Volian.Controls.Library
|
||||
Control = _MyDSOTabPanel;
|
||||
Name = "tabItem Item " + _MyItemInfo.ItemID;
|
||||
Text = _MyItemInfo.TabTitle;
|
||||
Tooltip = _MyItemInfo.TabToolTip;
|
||||
Tooltip = _MyItemInfo.TabToolTip.Replace("\u2011","-");
|
||||
_MyDisplayTabControl.Controls.Add(_MyDSOTabPanel);
|
||||
DSOTabPanel.IgnoreEnter = true;
|
||||
Console.WriteLine("AddRange {0}", Name);
|
||||
|
@ -4,13 +4,70 @@ using System.Text;
|
||||
using System.Windows.Forms;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Drawing;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace VEPROMS.CSLA.Library
|
||||
namespace Volian.Controls.Library
|
||||
{
|
||||
public class DisplayText
|
||||
{
|
||||
#region Properties
|
||||
private E_FieldToEdit _FieldToEdit;
|
||||
public E_FieldToEdit FieldToEdit
|
||||
{
|
||||
get { return _FieldToEdit; }
|
||||
set { _FieldToEdit = value; }
|
||||
}
|
||||
private ItemInfo _MyItemInfo;
|
||||
private string InfoText
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (FieldToEdit)
|
||||
{
|
||||
case E_FieldToEdit.StepText:
|
||||
case E_FieldToEdit.Text:
|
||||
return _MyItemInfo.MyContent.Text;
|
||||
break;
|
||||
case E_FieldToEdit.Number:
|
||||
return _MyItemInfo.MyContent.Number;
|
||||
break;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
private Item _MyItem;
|
||||
private string EditText
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (FieldToEdit)
|
||||
{
|
||||
case E_FieldToEdit.StepText:
|
||||
case E_FieldToEdit.Text:
|
||||
return _MyItem.MyContent.Text;
|
||||
break;
|
||||
case E_FieldToEdit.Number:
|
||||
return _MyItem.MyContent.Number;
|
||||
break;
|
||||
}
|
||||
return string.Empty;
|
||||
}
|
||||
set
|
||||
{
|
||||
switch (FieldToEdit)
|
||||
{
|
||||
case E_FieldToEdit.StepText:
|
||||
case E_FieldToEdit.Text:
|
||||
_MyItem.MyContent.Text = value;
|
||||
break;
|
||||
case E_FieldToEdit.Number:
|
||||
_MyItem.MyContent.Number = value;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// list of 'pieces of text' for this item. Pieces include symbols, ros,
|
||||
// transitions & plain text.
|
||||
private List<displayTextElement> _DisplayTextElementList;
|
||||
@ -47,13 +104,15 @@ namespace VEPROMS.CSLA.Library
|
||||
/// E_ViewMode vw_mode - view or edit.
|
||||
/// bool noEdit - flags whether to edit or not (used to set data in
|
||||
/// rtb as resolved replacewords for non-active rtb.
|
||||
/// E_FieldToEdit fieldToEdit - identifies the field to edit (number or text)
|
||||
/// </summary>
|
||||
public DisplayText(ItemInfo itemInfo, E_EditPrintMode epMode, E_ViewMode vwMode, bool noEdit)
|
||||
public DisplayText(ItemInfo itemInfo, E_EditPrintMode epMode, E_ViewMode vwMode, bool noEdit,E_FieldToEdit fieldToEdit)
|
||||
{
|
||||
_FieldToEdit = fieldToEdit;
|
||||
_MyItemInfo = itemInfo;
|
||||
OriginalText = itemInfo.MyContent.Text;
|
||||
OriginalText = InfoText;
|
||||
TextFont = GetItemFont();
|
||||
string text = _MyItemInfo.MyContent.Text;
|
||||
string text = InfoText;
|
||||
|
||||
// if in print mode, view mode, or non-active richtextbox do replace words. Only if in
|
||||
// actual edit mode are replace words left as is.
|
||||
@ -132,10 +191,10 @@ namespace VEPROMS.CSLA.Library
|
||||
{
|
||||
try
|
||||
{
|
||||
Item itm = _MyItemInfo.Get();
|
||||
_MyItem = _MyItemInfo.Get();
|
||||
// check for different text, i.e. text from this itm doesn't match
|
||||
// original text, a change occurred in database, but not from this user.
|
||||
if (OriginalText != itm.MyContent.Text)
|
||||
if (OriginalText != EditText)
|
||||
{
|
||||
Console.WriteLine("Save Failed because text changed outside of this edit session.");
|
||||
return false;
|
||||
@ -155,30 +214,34 @@ namespace VEPROMS.CSLA.Library
|
||||
|
||||
// Compare ro/transition lists and delete or add any to the item for any ros/transitions that have been
|
||||
// added/deleted or modified.
|
||||
ProcessRoTranChanges(itm, origList);
|
||||
itm.MyContent.Text = DteToString();
|
||||
ProcessRoTranChanges(_MyItem, origList);
|
||||
EditText = DteToString();
|
||||
|
||||
// if new transitions/ros, we need to 'fix' the string in the embedded link to contain the
|
||||
// transition or usage record.
|
||||
Dictionary<int, ContentTransition> ctReplacements = BuildCtReplacements(itm.MyContent.ContentTransitions);
|
||||
Dictionary<int, ContentRoUsage> roUsgReplacements = BuildRoUsgReplacements(itm.MyContent.ContentRoUsages);
|
||||
itm.Save();
|
||||
Dictionary<int, ContentTransition> ctReplacements = BuildCtReplacements(_MyItem.MyContent.ContentTransitions);
|
||||
Dictionary<int, ContentRoUsage> roUsgReplacements = BuildRoUsgReplacements(_MyItem.MyContent.ContentRoUsages);
|
||||
_MyItem.Save();
|
||||
if (ctReplacements.Count > 0)
|
||||
{
|
||||
itm.MyContent.Text = FixCtReplacements(itm.MyContent.Text, ctReplacements);
|
||||
itm.Save();
|
||||
EditText = FixCtReplacements(EditText, ctReplacements);
|
||||
_MyItem.Save();
|
||||
}
|
||||
if (roUsgReplacements.Count > 0)
|
||||
{
|
||||
itm.MyContent.Text = FixRoUsgReplacements(itm.MyContent.Text, roUsgReplacements);
|
||||
itm.Save();
|
||||
EditText = FixRoUsgReplacements(EditText, roUsgReplacements);
|
||||
_MyItem.Save();
|
||||
}
|
||||
modtext = itm.MyContent.Text;
|
||||
modtext = EditText;
|
||||
}
|
||||
else
|
||||
{
|
||||
itm.MyContent.Text = modtext;
|
||||
itm.Save();
|
||||
EditText = modtext;
|
||||
foreach (Csla.Validation.BrokenRule br in _MyItem.MyContent.BrokenRulesCollection)
|
||||
{
|
||||
Console.WriteLine("{0} - {1}", br.Property, br.Description);
|
||||
}
|
||||
_MyItem.Save();
|
||||
}
|
||||
OriginalText = modtext;
|
||||
}
|
||||
|
@ -86,6 +86,12 @@ namespace Volian.Controls.Library
|
||||
// return prams;
|
||||
// }
|
||||
//}
|
||||
private E_FieldToEdit _FieldToEdit = E_FieldToEdit.StepText;
|
||||
public E_FieldToEdit FieldToEdit
|
||||
{
|
||||
get { return _FieldToEdit; }
|
||||
set { _FieldToEdit = value; }
|
||||
}
|
||||
private string _RtfPrefix; // contains Font table and styles (bold/underline/italics) for rtb from step style
|
||||
public string RtfPrefix
|
||||
{
|
||||
@ -152,7 +158,7 @@ namespace Volian.Controls.Library
|
||||
_InitializingRTB = true;
|
||||
_SelectedRtfSB.Remove(0, _SelectedRtfSB.Length);
|
||||
|
||||
DisplayText vlntxt = new DisplayText(_MyItemInfo, EpMode, VwMode, !edit);
|
||||
DisplayText vlntxt = new DisplayText(_MyItemInfo, EpMode, VwMode, !edit, FieldToEdit);
|
||||
_origDisplayText = vlntxt;
|
||||
#if(DEBUG)
|
||||
// Use Times New Roman for Debugging
|
||||
|
@ -25,6 +25,9 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
}
|
||||
private ItemInfo MyItemInfo
|
||||
{ get { return _MyStepRTB.MyItemInfo; } }
|
||||
|
||||
private int _MyLastFormatID = -1;
|
||||
private StepRTB _MyStepRTB;
|
||||
public StepRTB MyStepRTB
|
||||
@ -36,7 +39,18 @@ namespace Volian.Controls.Library
|
||||
if (value != null)
|
||||
{
|
||||
//Console.WriteLine(string.Format("StepTabRibbon: In set of MyStepRTB, Selected Text = {0}", MyStepRTB.SelectedText));
|
||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
|
||||
switch (_MyStepRTB.FieldToEdit)
|
||||
{
|
||||
case E_FieldToEdit.StepText:
|
||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit);
|
||||
break;
|
||||
case E_FieldToEdit.Text:
|
||||
case E_FieldToEdit.Number:
|
||||
_ContextMenuBar.SetContextMenuEx(_MyStepRTB, btnCMRtfEdit3);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
//_MyStepRTB.KeyDown += new KeyEventHandler(MyStepRTB_SelectionChanged);
|
||||
_MyStepRTB.KeyUp += new KeyEventHandler(MyStepRTB_SelectionChanged);
|
||||
_MyStepRTB.ModeChange += new StepRTBModeChangeEvent(_MyStepRTB_ModeChange);
|
||||
@ -46,48 +60,54 @@ namespace Volian.Controls.Library
|
||||
// Add symbols into the tab ribbon based on format selection. For now, only add symbols once
|
||||
// because all symbols are same!!! If we start defining different symbols in different formats
|
||||
// this will have to change, i.e. remove the second part of 'if' statement.
|
||||
if (_MyStepRTB.MyStepItem.MyItemInfo.ActiveFormat.FormatID != _MyLastFormatID && _MyLastFormatID == -1)
|
||||
if (MyItemInfo.ActiveFormat.FormatID != _MyLastFormatID && _MyLastFormatID == -1)
|
||||
{
|
||||
// Add symbols to the tabribbon & also to the context menu getting info from the format file...
|
||||
// Note that the ButtonItems must be used in order to place the buttons on a gallery (cannot
|
||||
// use buttonx or dotnet/windows/button). However, you cannot change the font on ButtonItems so
|
||||
// the ribbon MUST use the Arial Unicode MS Font for this to work!!!!
|
||||
FormatInfo fmt = _MyStepRTB.MyStepItem.MyItemInfo.ActiveFormat;
|
||||
FormatInfo fmt = MyItemInfo.ActiveFormat;
|
||||
SymbolList sl = fmt.PlantFormat.FormatData.SymbolList;
|
||||
if (sl == null || sl.Count <= 0)
|
||||
{
|
||||
MessageBox.Show("No symbols are available, check with administrator");
|
||||
return;
|
||||
}
|
||||
foreach (Symbol sym in sl)
|
||||
{
|
||||
DevComponents.DotNetBar.ButtonItem btn = new DevComponents.DotNetBar.ButtonItem();
|
||||
btn.Text = string.Format("{0}", (char)sym.Unicode);
|
||||
// to name button use unicode rather than desc, desc may have spaces or odd chars
|
||||
btn.Name = "btn" + sym.Unicode.ToString();
|
||||
btn.Tooltip = sym.Desc;
|
||||
btn.Tag = string.Format(@"{0}", sym.Unicode);
|
||||
btn.FontBold = true;
|
||||
btn.Click += new System.EventHandler(btnSym_Click);
|
||||
galleryContainerSymbols.SubItems.Add(btn);
|
||||
DevComponents.DotNetBar.ButtonItem btnCM = new DevComponents.DotNetBar.ButtonItem();
|
||||
btnCM.Text = string.Format("{0}", (char)sym.Unicode);
|
||||
// to name button use unicode rather than desc, desc may have spaces or odd chars
|
||||
btnCM.Name = "btnCM" + sym.Unicode.ToString();
|
||||
btnCM.Tooltip = sym.Desc;
|
||||
btnCM.Tag = string.Format(@"{0}", sym.Unicode);
|
||||
btnCM.FontBold = true;
|
||||
btnCM.Click += new System.EventHandler(btnSym_Click);
|
||||
galleryContainerSymbolsCM.SubItems.Add(btnCM);
|
||||
}
|
||||
BuildSymbolGallery(sl, galleryContainerSymbolsCM);
|
||||
BuildSymbolGallery(sl, galleryContainerSymbolsCM3);
|
||||
}
|
||||
SetButtonAndMenuEnabling();
|
||||
SetStepButtonAndMenuEnabling();
|
||||
_MyLastFormatID = _MyStepRTB.MyStepItem.MyItemInfo.ActiveFormat.FormatID;
|
||||
_MyLastFormatID = MyItemInfo.ActiveFormat.FormatID;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void BuildSymbolGallery(SymbolList sl, DevComponents.DotNetBar.GalleryContainer gc)
|
||||
{
|
||||
foreach (Symbol sym in sl)
|
||||
{
|
||||
DevComponents.DotNetBar.ButtonItem btn = new DevComponents.DotNetBar.ButtonItem();
|
||||
btn.Text = string.Format("{0}", (char)sym.Unicode);
|
||||
// to name button use unicode rather than desc, desc may have spaces or odd chars
|
||||
btn.Name = "btn" + sym.Unicode.ToString();
|
||||
btn.Tooltip = sym.Desc;
|
||||
btn.Tag = string.Format(@"{0}", sym.Unicode);
|
||||
btn.FontBold = true;
|
||||
btn.Click += new System.EventHandler(btnSym_Click);
|
||||
galleryContainerSymbols.SubItems.Add(btn);
|
||||
DevComponents.DotNetBar.ButtonItem btnCM = new DevComponents.DotNetBar.ButtonItem();
|
||||
btnCM.Text = string.Format("{0}", (char)sym.Unicode);
|
||||
// to name button use unicode rather than desc, desc may have spaces or odd chars
|
||||
btnCM.Name = "btnCM" + sym.Unicode.ToString();
|
||||
btnCM.Tooltip = sym.Desc;
|
||||
btnCM.Tag = string.Format(@"{0}", sym.Unicode);
|
||||
btnCM.FontBold = true;
|
||||
btnCM.Click += new System.EventHandler(btnSym_Click);
|
||||
gc.SubItems.Add(btnCM);
|
||||
}
|
||||
}
|
||||
|
||||
void _MyStepRTB_ModeChange(object sender, StepRTBModeChangeEventArgs args)
|
||||
{
|
||||
SetButtonAndMenuEnabling();
|
||||
@ -156,9 +176,33 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
else
|
||||
{
|
||||
_MyStepItem.AddChild((E_FromType)fromtype, contenttype);
|
||||
// Maybe someday for Grid Tables
|
||||
//bool addchild = true;
|
||||
//if (InsertingTable(contenttype))
|
||||
//{
|
||||
// VlnFlexGrid grd = CreateNewTable();
|
||||
// // if (grd == null) // if null grd, then user changed mind, abort insert of table
|
||||
// addchild = false;
|
||||
//}
|
||||
//if (addchild)
|
||||
_MyStepItem.AddChild((E_FromType)fromtype, contenttype);
|
||||
}
|
||||
}
|
||||
// Future Table Grid?
|
||||
//private bool InsertingTable(int contenttype)
|
||||
//{
|
||||
// bool rtnval = false;
|
||||
// switch (contenttype)
|
||||
// {
|
||||
// case 20008: // Centered table
|
||||
// case 20010: // AER table
|
||||
// case 20033: // AER table without boarder
|
||||
// case 20034: // Centered table without boarder
|
||||
// rtnval = true;
|
||||
// break;
|
||||
// }
|
||||
// return rtnval;
|
||||
//}
|
||||
private void btnInsBefore_Click(object sender, EventArgs e)
|
||||
{
|
||||
_MyStepItem.AddSiblingBefore();
|
||||
@ -200,6 +244,8 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private void SetButtonAndMenuEnabling()
|
||||
{
|
||||
if (_MyStepRTB.FieldToEdit != E_FieldToEdit.StepText)
|
||||
return; // No need to change menu that does not get used
|
||||
if (_MyStepRTB == null) return;
|
||||
DocVersionInfo dvi = MyStepItem.MyItemInfo.MyProcedure.ActiveParent as DocVersionInfo;
|
||||
if (dvi == null) return;
|
||||
@ -245,15 +291,15 @@ namespace Volian.Controls.Library
|
||||
private void SetStepButtonAndMenuEnabling()
|
||||
{
|
||||
// see if manual page break - only available on HLS
|
||||
if (_MyStepItem.MyItemInfo.IsHigh)
|
||||
if (MyItemInfo.IsHigh)
|
||||
{
|
||||
StepConfig cfg = _MyStepItem.MyItemInfo.MyConfig as StepConfig;
|
||||
StepConfig cfg = MyItemInfo.MyConfig as StepConfig;
|
||||
btnInsPgBrk.Checked = cfg == null ? false : cfg.Step_ManualPagebreak;
|
||||
}
|
||||
btnInsPgBrk.Enabled = _MyStepItem.MyItemInfo.IsHigh;
|
||||
btnInsPgBrk.Enabled = MyItemInfo.IsHigh;
|
||||
|
||||
// if on procedure or section 'change type' & 'insert' buttons should be disabled.
|
||||
if (_MyStepItem.MyItemInfo.IsProcedure || _MyStepItem.MyItemInfo.IsSection)
|
||||
if (MyItemInfo.IsProcedure || MyItemInfo.IsSection)
|
||||
{
|
||||
btnChgTyp.Enabled = false;
|
||||
btnInsHLS.Enabled = btnInsCaut.Enabled = btnInsNote.Enabled = btnInsRNO.Enabled = btnInsFig.Enabled =
|
||||
@ -268,7 +314,7 @@ namespace Volian.Controls.Library
|
||||
|
||||
// set up insert buttons based on format
|
||||
E_AccStep? actable = 0;
|
||||
StepData sd = _MyStepItem.MyItemInfo.FormatStepData;
|
||||
StepData sd = MyItemInfo.FormatStepData;
|
||||
actable = sd.StepEditData.AcTable;
|
||||
if (actable == null) actable = 0;
|
||||
btnInsHLS.Enabled = true;
|
||||
@ -294,12 +340,12 @@ namespace Volian.Controls.Library
|
||||
btnInsRNO.Tag = string.Format("{0} {1}", (int)E_FromTypes.RNOs, MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.GetIndexFromType("RNOType"));
|
||||
|
||||
// add subitems depending on whether parent type is enabled:
|
||||
if (btnInsHLS.Enabled) GalleryForSubTypes(_MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, sd, btnInsHLS, 0);
|
||||
if (btnInsCaut.Enabled) GalleryForSubTypes(_MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Caution, sd, btnInsCaut, (int)E_FromType.Caution);
|
||||
if (btnInsNote.Enabled) GalleryForSubTypes(_MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Note, sd, btnInsNote, (int)E_FromType.Note);
|
||||
if (btnInsFig.Enabled) GalleryForSubTypes(_MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Fig, sd, btnInsFig, (int)E_FromType.Table);
|
||||
if (btnInsTable.Enabled) GalleryForSubTypes(_MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Table, sd, btnInsTable, (int)E_FromType.Table);
|
||||
if (btnInsSubstep.Enabled) GalleryForSubTypes(_MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Substep, sd, btnInsSubstep, (int)E_FromType.Step);
|
||||
if (btnInsHLS.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.HLS, sd, btnInsHLS, 0);
|
||||
if (btnInsCaut.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Caution, sd, btnInsCaut, (int)E_FromType.Caution);
|
||||
if (btnInsNote.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Note, sd, btnInsNote, (int)E_FromType.Note);
|
||||
if (btnInsFig.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Fig, sd, btnInsFig, (int)E_FromType.Table);
|
||||
if (btnInsTable.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Table, sd, btnInsTable, (int)E_FromType.Table);
|
||||
if (btnInsSubstep.Enabled) GalleryForSubTypes(MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList.Substep, sd, btnInsSubstep, (int)E_FromType.Step);
|
||||
|
||||
btnInsTrans.Enabled = btnCMTransition.Enabled = btnInsRO.Enabled = btnCMRO.Enabled = true;
|
||||
}
|
||||
@ -318,17 +364,17 @@ namespace Volian.Controls.Library
|
||||
// regardless of whether in the AER or RNO column (set to true). For all types, get both except for figures
|
||||
// and tables.
|
||||
bool getall = !(btn.Name == "btnInsFig" || (btn.Name == "btnInsTable"));
|
||||
List<StepDataRetval> sdl = _MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepGetLevelTypes(getall, sdc, ref cursel, selType.Type, _MyStepItem.MyItemInfo);
|
||||
List<StepDataRetval> sdl = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepGetLevelTypes(getall, sdc, ref cursel, selType.Type, MyItemInfo);
|
||||
if (sdl != null && sdl.Count > 0)
|
||||
{
|
||||
foreach (StepDataRetval sdr in sdl)
|
||||
{
|
||||
bool addit = true;
|
||||
StepData sd = _MyStepItem.MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[sdr.Index];
|
||||
StepData sd = MyItemInfo.ActiveFormat.PlantFormat.FormatData.StepDataList[sdr.Index];
|
||||
int hlsSubType = -1; // if on hls, use this to set default on substep menu to first child
|
||||
if (_MyStepItem.MyItemInfo.IsHigh && _MyStepItem.MyItemInfo.Steps != null)
|
||||
if (MyItemInfo.IsHigh && MyItemInfo.Steps != null)
|
||||
{
|
||||
hlsSubType = (int)_MyStepItem.MyItemInfo.Steps[0].MyContent.Type - 20000;
|
||||
hlsSubType = (int)MyItemInfo.Steps[0].MyContent.Type - 20000;
|
||||
}
|
||||
// unfortunately, there are some special cases to be handled.
|
||||
// if high level step, don't put the rno button on
|
||||
@ -343,7 +389,7 @@ namespace Volian.Controls.Library
|
||||
bi.Text = sdr.Name;
|
||||
bi.Tag = string.Format("{0} {1}", fromtype, sdr.Index); // index of type to insert it when button is clicked
|
||||
bi.Checked = (sd.Type == selType.Type);
|
||||
if (_MyStepItem.MyItemInfo.IsHigh && hlsSubType != -1 && sdr.Index == hlsSubType) bi.Checked = true;
|
||||
if (MyItemInfo.IsHigh && hlsSubType != -1 && sdr.Index == hlsSubType) bi.Checked = true;
|
||||
bi.Click += new System.EventHandler(btnInsStep_Click);
|
||||
btn.SubItems.Add(bi);
|
||||
}
|
||||
@ -370,10 +416,10 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
private void btnInsPgBrk_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (_MyStepItem.MyItemInfo.IsProcedure || _MyStepItem.MyItemInfo.IsSection) return;
|
||||
if (MyItemInfo.IsProcedure || MyItemInfo.IsSection) return;
|
||||
|
||||
// toggle manual page break
|
||||
StepConfig cfg = _MyStepItem.MyItemInfo.MyConfig as StepConfig;
|
||||
StepConfig cfg = MyItemInfo.MyConfig as StepConfig;
|
||||
cfg.Step_ManualPagebreak = !cfg.Step_ManualPagebreak;
|
||||
btnInsPgBrk.Checked = cfg.Step_ManualPagebreak;
|
||||
}
|
||||
@ -561,4 +607,6 @@ namespace Volian.Controls.Library
|
||||
#endif
|
||||
#endregion
|
||||
}
|
||||
public enum E_FieldToEdit { StepText, Text, Number };
|
||||
}
|
||||
|
||||
|
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
BIN
PROMS/Volian.Controls.Library/StepTabRibbon.designer.cs
generated
Binary file not shown.
@ -118,15 +118,6 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="btnInsRO.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
|
||||
EnEB89x6jgAAAIBJREFUOE/FU9ESgCAIy///aAMU0DDYSxecV6KOObB1squRs3VyNY1Z4OWHATYTFHI1
|
||||
gp0RXdm+vlGoLC5zPowCHDeiAGkmhMHnAEFpDwwRjcFKV++/6xyLVgEk2UfhnuVTNsVBa5Njk8xV6c1k
|
||||
hNwGBmaHAP5n4G8q6gFdoZLjBpE7j5KJdaRlAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnCut.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
@ -137,6 +128,15 @@
|
||||
t0ekztKvaA7ibixOyvoLADqYiGMXHIUWy7uQa+cSuZGUDb7FswWYwclx9oES/hqzGAmV1UTdSPiQ8Uqw
|
||||
DCdiNtgFHwAtVpjbIvESaA4ZqUrP2xELFPEBUMwlqmH7iDiNNQAph2DskIMaIF16YfCVIoZOmtyveQF9
|
||||
2CVVWYKhQwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnInsRO.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
|
||||
EnEB89x6jgAAAIBJREFUOE/FU9ESgCAIy///aAMU0DDYSxecV6KOObB1squRs3VyNY1Z4OWHATYTFHI1
|
||||
gp0RXdm+vlGoLC5zPowCHDeiAGkmhMHnAEFpDwwRjcFKV++/6xyLVgEk2UfhnuVTNsVBa5Njk8xV6c1k
|
||||
hNwGBmaHAP5n4G8q6gFdoZLjBpE7j5KJdaRlAAAAAElFTkSuQmCC
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnListUsers.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
@ -229,6 +229,18 @@
|
||||
t0ekztKvaA7ibixOyvoLADqYiGMXHIUWy7uQa+cSuZGUDb7FswWYwclx9oES/hqzGAmV1UTdSPiQ8Uqw
|
||||
DCdiNtgFHwAtVpjbIvESaA4ZqUrP2xELFPEBUMwlqmH7iDiNNQAph2DskIMaIF16YfCVIoZOmtyveQF9
|
||||
2CVVWYKhQwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
<data name="buttonItem3.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
|
||||
YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAScQAA
|
||||
EnEB89x6jgAAASBJREFUOE+lU7ERwjAMFCOwQmbJCKFIQQtFGorccS5oUnApU9B4hayQFViBFVgh/Ecm
|
||||
Z8cmcAd3wlEkvaV/ZTOOo/z1I8DbRIoBtvXfLeJ2GZuLtZMCf9c2BYDYgfEfACxATBYlSvEUOX0FaEUI
|
||||
YPtF62ft7rY+go5hHgrS7NxYWy2uCRzxE3DgCnKRjskP56Orkv45yU2asKMbpcPJ2839ozKfJTMgbSKU
|
||||
t0ekztKvaA7ibixOyvoLADqYiGMXHIUWy7uQa+cSuZGUDb7FswWYwclx9oES/hqzGAmV1UTdSPiQ8Uqw
|
||||
DCdiNtgFHwAtVpjbIvESaA4ZqUrP2xELFPEBUMwlqmH7iDiNNQAph2DskIMaIF16YfCVIoZOmtyveQF9
|
||||
2CVVWYKhQwAAAABJRU5ErkJggg==
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
@ -555,6 +555,13 @@ namespace Volian.Controls.Library
|
||||
OnNodeOpenProperty(this, new vlnTreePropertyEventArgs(title, sect.SectionConfig));
|
||||
}
|
||||
}
|
||||
private void OpenProperties(StepInfo stpinfo)
|
||||
{
|
||||
using (Step stp = stpinfo.Get())
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
#region OpenNode
|
||||
private void tv_KeyPress(object sender, KeyPressEventArgs e)
|
||||
|
Loading…
x
Reference in New Issue
Block a user