- Added tools to find Symbol Characters in Word Documents
- If the range does not have any characters return an empty string Refresh Most Recent Items when the office button is pressed Added OrdinalChanged Event Used OrdinalChanged Event rather than MyContent.Changed Event when Ordinal is updated. Use OrdinalChanged Event to update Tree Node Refresh MRU list as items are added Use OrdinalChanged Event to update Step Tab - RTBFillIn changed to only update the RTB when the contents change - AdjustSizeForContents changed to raise the HeightChanged event when the Height changes Update the treeview tabs even if the step is not open.
This commit is contained in:
@@ -23,6 +23,7 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
public new MostRecentItem Add(MostRecentItem myMRI)
|
||||
{
|
||||
Refresh();
|
||||
MostRecentItem tmp = null;
|
||||
// Look for the ItemID
|
||||
foreach (MostRecentItem mri in this)
|
||||
@@ -42,6 +43,11 @@ namespace Volian.Controls.Library
|
||||
myMRI.MyItemInfo.BeforeDelete += new ItemInfoEvent(MyItemInfo_BeforeDelete);
|
||||
return myMRI;
|
||||
}
|
||||
public void Refresh()
|
||||
{
|
||||
foreach (MostRecentItem mri in this)
|
||||
mri.Refresh();
|
||||
}
|
||||
|
||||
// delete the item from the most recently used list. This event gets handled
|
||||
// when a delete item occurs.
|
||||
@@ -105,6 +111,7 @@ namespace Volian.Controls.Library
|
||||
public System.Collections.Specialized.StringCollection ToSettings()
|
||||
{
|
||||
if (Count == 0) return null;
|
||||
Refresh();
|
||||
System.Collections.Specialized.StringCollection retval = new System.Collections.Specialized.StringCollection();
|
||||
foreach (MostRecentItem mri in this)
|
||||
retval.Add(mri.ToString());
|
||||
@@ -131,6 +138,10 @@ namespace Volian.Controls.Library
|
||||
_ToolTip = GetToolTip(_MyItemInfo);
|
||||
}
|
||||
}
|
||||
internal void Refresh()
|
||||
{
|
||||
MyItemInfo = MyItemInfo;
|
||||
}
|
||||
private int _ItemID;
|
||||
public int ItemID
|
||||
{
|
||||
|
@@ -149,9 +149,13 @@ namespace Volian.Controls.Library
|
||||
if (VlnSettings.StepTypeToolType)SetToolTip(_MyItemInfo.ToolTip);
|
||||
ChangeBar = _MyItemInfo.HasChangeBar();
|
||||
value.MyContent.Changed += new ContentInfoEvent(MyContent_Changed);
|
||||
value.OrdinalChanged += new ItemInfoEvent(value_OrdinalChanged);
|
||||
}
|
||||
}
|
||||
|
||||
void value_OrdinalChanged(object sender)
|
||||
{
|
||||
TabFormat = null; // Reset Tab
|
||||
}
|
||||
private void SetToolTip(string tip)
|
||||
{
|
||||
DevComponents.DotNetBar.SuperTooltipInfo tpi = new DevComponents.DotNetBar.SuperTooltipInfo("", "", tip, null, null, DevComponents.DotNetBar.eTooltipColor.Lemon);
|
||||
@@ -169,7 +173,6 @@ namespace Volian.Controls.Library
|
||||
// Update the text to reflect the content change
|
||||
MyStepRTB.MyItemInfo.RefreshItemAnnotations();
|
||||
MyStepRTB.MyItemInfo=MyStepRTB.MyItemInfo; // Reset Text
|
||||
TabFormat = null; // Reset Tab
|
||||
SetExpandAndExpander(MyItemInfo);
|
||||
// TODO: Need code to update tabs ? not sure what this is - maybe for
|
||||
// transitions?
|
||||
|
@@ -201,7 +201,6 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
_InitializingRTB = true;
|
||||
_SelectedRtfSB.Remove(0, _SelectedRtfSB.Length);
|
||||
DisplayText vlntxt = new DisplayText(_MyItemInfo, EpMode, VwMode, !edit, FieldToEdit, true);
|
||||
//if (_origDisplayText != null && vlntxt.StartText == _origDisplayText.StartText)
|
||||
//{
|
||||
@@ -222,9 +221,12 @@ namespace Volian.Controls.Library
|
||||
// TODO: Release Mode
|
||||
//Font = _origDisplayText.TextFont.WindowsFont; // font defined in plant's format
|
||||
}
|
||||
Text = ""; // Initialize text before add text
|
||||
// RHM 20101201 - Don't reset the text. Calculate the text and compare it with the existing text in AddRTFText
|
||||
//Text = ""; // Initialize text before add text
|
||||
// IMPORTANT: SetLineSpacing must be set before Links, otherwise it
|
||||
// was confusing the 'handle' of the rtf box.
|
||||
//Console.WriteLine("'font',{0}", Font);
|
||||
if(Text == "")SelectionFont = Font; // Initialize SelectionFont
|
||||
RTBAPI.SetLineSpacing(this, RTBAPI.ParaSpacing.PFS_EXACT);
|
||||
AddRtfText(vlntxt.StartText);
|
||||
//AddRtfStyles();
|
||||
@@ -714,14 +716,18 @@ namespace Volian.Controls.Library
|
||||
#region AddRtfTextAndStyles
|
||||
private void AddRtfText(string txt)
|
||||
{
|
||||
AddFontTable();
|
||||
_RtfPrefix = _SelectedRtfSB.ToString();
|
||||
_SelectedRtfSB.Append(txt);
|
||||
SelectedRtf = _SelectedRtfSB.ToString() + "}";
|
||||
StringBuilder selectedRtfSB = new StringBuilder();
|
||||
AddFontTable(selectedRtfSB);
|
||||
_RtfPrefix = selectedRtfSB.ToString();
|
||||
selectedRtfSB.Append(txt);
|
||||
string newRTF = selectedRtfSB.ToString() + "}";
|
||||
SelectAll();
|
||||
if (SelectedRtf != newRTF)
|
||||
SelectedRtf = newRTF;
|
||||
//SelectedRtf = selectedRtfSB.ToString() + "}";
|
||||
FindAllLinks();
|
||||
}
|
||||
private StringBuilder _SelectedRtfSB = new StringBuilder();
|
||||
private void AddFontTable()
|
||||
private void AddFontTable(StringBuilder selectedRtfSB)
|
||||
{
|
||||
StringBuilder sbbeg = new StringBuilder();
|
||||
StringBuilder sbend = new StringBuilder();
|
||||
@@ -740,14 +746,14 @@ namespace Volian.Controls.Library
|
||||
sbbeg.Append(@"\i");
|
||||
sbend.Insert(0, @"\i0");
|
||||
}
|
||||
_SelectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + this.Font.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
|
||||
selectedRtfSB.Append(@"{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fcharset2 " + this.Font.FontFamily.Name + @";}"); //}\f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}}";
|
||||
if (!FontIsFixed())
|
||||
_SelectedRtfSB.Append(@"{\f1\fnil\fcharset0 Arial Unicode MS;}}{\colortbl ;\red255\green0\blue0;}");
|
||||
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 Arial Unicode MS;}}{\colortbl ;\red255\green0\blue0;}");
|
||||
else
|
||||
_SelectedRtfSB.Append(@"{\f1\fnil\fcharset0 VESymbFix;}}{\colortbl ;\red255\green0\blue0;}");
|
||||
_SelectedRtfSB.Append("\r\n");
|
||||
selectedRtfSB.Append(@"{\f1\fnil\fcharset0 VESymbFix;}}{\colortbl ;\red255\green0\blue0;}");
|
||||
selectedRtfSB.Append("\r\n");
|
||||
// use styles to construct rtf commands to insert into next line (where \b, etc is)
|
||||
_SelectedRtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(this.Font.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}";
|
||||
selectedRtfSB.Append(@"\viewkind4\uc1\pard\sl-240\slmult0" + sbbeg.ToString() + @"\fs" + Convert.ToInt32(this.Font.SizeInPoints * 2).ToString() + @" "); // \f0\fs" + this.Font.SizeInPoints * 2 + @" " + myDisplayTextElement.Text + @"}";
|
||||
}
|
||||
|
||||
private bool FontIsFixed()
|
||||
@@ -906,8 +912,10 @@ namespace Volian.Controls.Library
|
||||
Size szNew = new Size(((Text != "" && adjustWidth) ? widthNew : (widthNew > Width ? widthNew : Width)), heightNew);
|
||||
if (this.Size != szNew)
|
||||
{
|
||||
int heightOld = Height;
|
||||
this.Size = szNew;
|
||||
OnHeightChanged(this, new EventArgs());
|
||||
if (heightOld != Height)
|
||||
OnHeightChanged(this, new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -999,6 +999,7 @@ namespace Volian.Controls.Library
|
||||
ShowBrokenRules(step.BrokenRulesCollection);
|
||||
SetLastValues(StepInfo.Get(step.ItemID));
|
||||
tn = new VETreeNode(_LastStepInfo);
|
||||
_LastStepInfo.UpdateTransitionText();
|
||||
TreeNode par = SelectedNode.Parent;
|
||||
par.Nodes.Insert(tvindex + ((newtype == MenuSelections.StepBefore) ? 0 : 1), tn);
|
||||
}
|
||||
|
Reference in New Issue
Block a user