This commit is contained in:
@@ -36,6 +36,7 @@ namespace Volian.Controls.Library
|
||||
if (value is GridItem)
|
||||
{
|
||||
ToggleTableDesignButtons(true);
|
||||
MyFlexGrid_SelChange(this,new EventArgs());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,7 +126,11 @@ namespace Volian.Controls.Library
|
||||
if (_MyEditItem != null) _MyEditItem.Leave += new EventHandler(_MyEditItem_Leave);
|
||||
//_MyStepRTB.Leave += new EventHandler(_MyStepRTB_Leave);
|
||||
_MyStepRTB.LinkChanged += new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
|
||||
if (MyFlexGrid != null) MyFlexGrid.CopyOptionChanged += new VlnFlexGridEvent(MyFlexGrid_CopyOptionChanged);
|
||||
if (MyFlexGrid != null)
|
||||
{
|
||||
MyFlexGrid.CopyOptionChanged += new VlnFlexGridEvent(MyFlexGrid_CopyOptionChanged);
|
||||
MyFlexGrid.SelChange+=new EventHandler(MyFlexGrid_SelChange);
|
||||
}
|
||||
// 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.
|
||||
@@ -154,6 +159,14 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
}
|
||||
|
||||
void MyFlexGrid_SelChange(object sender, EventArgs e)
|
||||
{
|
||||
if (MyFlexGrid.Selection.c1 < 0 || MyFlexGrid.Selection.r1 < 0)
|
||||
return;
|
||||
C1.Win.C1FlexGrid.CellRange cr = MyFlexGrid.GetEvenSelection();
|
||||
rbnBorderSelectionPanel.InitializeBorder(MyFlexGrid.MyBorders, cr.r1, cr.c1, cr.r2, cr.c2);
|
||||
}
|
||||
|
||||
void _MyEditItem_Leave(object sender, EventArgs e)
|
||||
{
|
||||
// The following two lines were replaced by the third line so that the Ribbon KeyTips will work properly.
|
||||
@@ -161,10 +174,34 @@ namespace Volian.Controls.Library
|
||||
//_MyStepRTB.KeyUp -=new KeyEventHandler(_MyStepRTB_KeyUp);
|
||||
//_MyStepRTB.MouseUp -= new MouseEventHandler(_MyStepRTB_MouseUp);
|
||||
_MyStepRTB.SelectionChanged -= new EventHandler(_MyStepRTB_SelectionChanged);
|
||||
_MyEditItem.Leave += new EventHandler(_MyEditItem_Leave);
|
||||
_MyEditItem.Leave -= new EventHandler(_MyEditItem_Leave);
|
||||
_MyEditItem.Enter += new EventHandler(_MyEditItem_Enter);
|
||||
//_MyStepRTB.Leave -= new EventHandler(_MyStepRTB_Leave);
|
||||
_MyStepRTB.LinkChanged -= new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
|
||||
if (MyFlexGrid != null) MyFlexGrid.CopyOptionChanged -= new VlnFlexGridEvent(MyFlexGrid_CopyOptionChanged);
|
||||
if (MyFlexGrid != null)
|
||||
{
|
||||
MyFlexGrid.CopyOptionChanged -= new VlnFlexGridEvent(MyFlexGrid_CopyOptionChanged);
|
||||
MyFlexGrid.SelChange -= new EventHandler(MyFlexGrid_SelChange);
|
||||
}
|
||||
}
|
||||
|
||||
void _MyEditItem_Enter(object sender, EventArgs e)
|
||||
{
|
||||
// The following two lines were replaced by the third line so that the Ribbon KeyTips will work properly.
|
||||
// ex. Positon on a substep, press <shift><F6> <N> <S> <S>, to list the substep types
|
||||
//_MyStepRTB.KeyUp -=new KeyEventHandler(_MyStepRTB_KeyUp);
|
||||
//_MyStepRTB.MouseUp -= new MouseEventHandler(_MyStepRTB_MouseUp);
|
||||
_MyStepRTB.SelectionChanged += new EventHandler(_MyStepRTB_SelectionChanged);
|
||||
_MyEditItem.Leave += new EventHandler(_MyEditItem_Leave);
|
||||
_MyEditItem.Enter -= new EventHandler(_MyEditItem_Enter);
|
||||
//_MyStepRTB.Leave -= new EventHandler(_MyStepRTB_Leave);
|
||||
_MyStepRTB.LinkChanged += new StepRTBLinkEvent(_MyStepRTB_LinkChanged);
|
||||
if (MyFlexGrid != null)
|
||||
{
|
||||
MyFlexGrid.CopyOptionChanged += new VlnFlexGridEvent(MyFlexGrid_CopyOptionChanged);
|
||||
MyFlexGrid.SelChange += new EventHandler(MyFlexGrid_SelChange);
|
||||
Console.WriteLine("Turn on SelChange");
|
||||
}
|
||||
}
|
||||
|
||||
void MyFlexGrid_CopyOptionChanged(object sender, EventArgs args)
|
||||
@@ -1716,7 +1753,13 @@ namespace Volian.Controls.Library
|
||||
btnTblDgnAlignText.Enabled = enable;
|
||||
btnTblDgnCopy.Enabled = enable;
|
||||
btnTblDgnRemove.Enabled = enable;
|
||||
btnTblDgnGridStyle.Enabled = enable;
|
||||
//btnTblDgnGridStyle.Enabled = enable;
|
||||
//rbTblBorder.Enabled = enable;
|
||||
rbnBorderlistBox.Enabled = enable;
|
||||
rbnBorderSelectionPanel.Enabled = enable;
|
||||
btnTblNoBorder.Enabled = enable;
|
||||
btnTblOutline.Enabled = enable;
|
||||
btnTblInside.Enabled = enable;
|
||||
btnTblDgnInsertColumn.Enabled = enable;
|
||||
btnTblDgnInsertRow.Enabled = enable;
|
||||
btnTblDgnMergeCells.Enabled = enable;
|
||||
@@ -1832,6 +1875,38 @@ namespace Volian.Controls.Library
|
||||
}
|
||||
#endregion
|
||||
|
||||
private void rbnBorderlistBox_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
rbnBorderSelectionPanel.SelectedBorder = rbnBorderlistBox.SelectedLinePattern;
|
||||
}
|
||||
|
||||
private void rbnBorderSelectionPanel_BordersChanged(object sender, EventArgs args)
|
||||
{
|
||||
C1.Win.C1FlexGrid.CellRange cr = MyFlexGrid.GetEvenSelection();
|
||||
//foreach (C1.Win.C1FlexGrid.CellRange cr in MyFlexGrid.MySelection)
|
||||
//{
|
||||
MyFlexGrid.MyBorders.SetRange(cr.r1, cr.c1, cr.r2, cr.c2, rbnBorderSelectionPanel.TopBorder, rbnBorderSelectionPanel.InsideHorizontalBorder,
|
||||
rbnBorderSelectionPanel.BottomBorder, rbnBorderSelectionPanel.LeftBorder, rbnBorderSelectionPanel.InsideVerticalBorder, rbnBorderSelectionPanel.RightBorder);
|
||||
//}
|
||||
MyEditItem.Invalidate();
|
||||
MyFlexGrid.Invalidate();
|
||||
}
|
||||
|
||||
private void btnTblNoBorder_Click(object sender, EventArgs e)
|
||||
{
|
||||
rbnBorderSelectionPanel.AllBorders = GridLinePattern.None;
|
||||
}
|
||||
|
||||
private void btnTblOutline_Click(object sender, EventArgs e)
|
||||
{
|
||||
rbnBorderSelectionPanel.OutlineBorder = rbnBorderlistBox.SelectedLinePattern;
|
||||
}
|
||||
|
||||
private void btnTblInside_Click(object sender, EventArgs e)
|
||||
{
|
||||
rbnBorderSelectionPanel.InsideBorders = rbnBorderlistBox.SelectedLinePattern;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user