This commit is contained in:
Kathy Ruffing 2010-09-10 18:01:51 +00:00
parent 202b08e8ef
commit 7fb6638c2d
2 changed files with 10 additions and 7 deletions

View File

@ -172,7 +172,7 @@ namespace Volian.Controls.Library
public void SetBackColor()
{
if (MyStepItem == null || MyStepItem.MyStepPanel == null) return;
BackColor = _MyItemInfo.ItemAnnotationCount == 0 ? MyStepItem.MyStepPanel.InactiveColor : Color.FromArgb(255, 255, 128);
if (!Focused)BackColor = _MyItemInfo.ItemAnnotationCount == 0 ? MyStepItem.MyStepPanel.InactiveColor : Color.FromArgb(255, 255, 128);
}
public void HighlightBackColor()
{
@ -265,8 +265,6 @@ namespace Volian.Controls.Library
// }
//}
_origRTF = Rtf;
if (_MyItemInfo.ItemID == 74)
Console.WriteLine("'{0}'", Rtf);
_InitializingRTB = false;
_MyItemInfo.MyConfig.PropertyChanged += new PropertyChangedEventHandler(MyConfig_PropertyChanged);
AdjustSizeForContents(!edit); // TODO: this is not quite right yet.
@ -809,7 +807,8 @@ namespace Volian.Controls.Library
string fonttab = FontTable;
string fontsize = FontSize;
this.DetectUrls = false;
if (SelectionLength > 0) DeleteCurrentSelection(null);
//if (SelectionLength > 0) DeleteCurrentSelection(null);
if (SelectionLength > 0)HandleDeleteKeyWithSelectedText(new KeyEventArgs(Keys.None), null);
int position = SelectionStart;
SelectionLength = 0;
//Console.WriteLine(this.Rtf);
@ -1670,7 +1669,8 @@ namespace Volian.Controls.Library
if (e.Shift)
{
e.Handled = true;
this.MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("StepPaste");
if (MyStepItem.MyStepPanel.MyStepTabPanel.MyDisplayTabControl.MyCopyStep == null) return;
MyStepItem.MyStepPanel.MyStepTabPanel.MyStepTabRibbon.ShortCutContextMenu("StepPaste");
}
else if (!e.Control && !e.Alt)
{

View File

@ -836,6 +836,8 @@ namespace Volian.Controls.Library
using (DocVersion dv = DocVersion.Get(MyDVI.VersionID))
{
ROFst newrofst = ROFstInfo.UpdateRoFst(roFstInfo.MyRODb, dv.DocVersionAssociations[0], dv, roFstInfo);
StepPanelTabDisplayEventArgs args = new StepPanelTabDisplayEventArgs("DisplayROUpdateROFST");
MyStepItem.MyStepPanel.OnTabDisplay(sender, args);
}
Cursor = Cursors.Default;
}
@ -1138,11 +1140,13 @@ namespace Volian.Controls.Library
private void btnPasteAfter_Click(object sender, EventArgs e)
{
StepTabPanel tmp = Parent as StepTabPanel;
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
MyStepItem.PasteSiblingAfter(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
}
private void btnPasteBefore_Click(object sender, EventArgs e)
{
StepTabPanel tmp = Parent as StepTabPanel;
if (tmp.MyDisplayTabControl.MyCopyStep == null) return;
MyStepItem.PasteSiblingBefore(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
}
private void btnStepPaste_Click(object sender, EventArgs e)
@ -1173,12 +1177,11 @@ namespace Volian.Controls.Library
private void btnPasteReplace_Click(object sender, EventArgs e)
{
StepTabPanel tmp = Parent as StepTabPanel;
if (tmp.MyDisplayTabControl.MyCopyStep==null) return;
StepItem oldStepItem = MyStepItem;
MyStepItem = MyStepItem.PasteReplace(tmp.MyDisplayTabControl.MyCopyStep.ItemID);
if (MyStepItem.MyItemInfo.ItemID != oldStepItem.MyItemInfo.ItemID) oldStepItem.Dispose();
}
}
public enum E_FieldToEdit { StepText, Text, Number };
}