- Removed Debug
- Don't resize grid when initializing - Use LoadGrid which adjusts the Grid Font - Only save contents if in edit mode Changes to Comments Added Property MySymbolFontName - Setup GoTo button to handle ROTable Grids - Support GoTo for ROTable Grids (MyFlexGrid.IsRoTable) - Restored code to handle Vertical Alignment - Added MyItemInfo property - Removed commented-out debug in DPI property - Support Font Override - Use DisplayText to do ReplaceWords - Set Text Color to Black (Change Links to Black) Use DebugOutput property rather than _DebugOutput field - Override Font for printing grids - Override Font for printing text
This commit is contained in:
@@ -243,7 +243,7 @@ namespace Volian.Controls.Library
|
||||
void _MyStepRTB_LinkChanged(object sender, StepPanelLinkEventArgs args)
|
||||
{
|
||||
// do all Transition and ReferencedObject menu items/buttons based on whether a 'link is selected' and the link type.
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.IsSelectionLinked(_MyStepRTB.SelectionStart, _MyStepRTB.SelectionLength);
|
||||
SetupGoToButton();
|
||||
if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro...
|
||||
{
|
||||
btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition") > -1; // selected link must be a transition
|
||||
@@ -255,6 +255,13 @@ namespace Volian.Controls.Library
|
||||
btnCMEditRO.Enabled = false;
|
||||
}
|
||||
}
|
||||
private void SetupGoToButton()
|
||||
{
|
||||
if (MyEditItem is GridItem && (MyEditItem as GridItem).MyFlexGrid.IsRoTable)
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = true;
|
||||
else
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.IsSelectionLinked(_MyStepRTB.SelectionStart, _MyStepRTB.SelectionLength);
|
||||
}
|
||||
void _MyStepRTB_Leave(object sender, EventArgs e)
|
||||
{
|
||||
// The following two lines were replaced by the third line so that the Ribbon KeyTips will work properly.
|
||||
@@ -418,7 +425,8 @@ namespace Volian.Controls.Library
|
||||
SetPasteButtonEnabled();
|
||||
|
||||
// do all Transition and ReferencedObject menu items/buttons based on whether a 'link is selected' and the link type.
|
||||
btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.IsSelectionLinked(_MyStepRTB.SelectionStart, _MyStepRTB.SelectionLength); //(_MyStepRTB.MyLinkText != null);
|
||||
//btnCMGoTo.Enabled = btnGoTo.Enabled = _MyStepRTB.IsSelectionLinked(_MyStepRTB.SelectionStart, _MyStepRTB.SelectionLength); //(_MyStepRTB.MyLinkText != null);
|
||||
SetupGoToButton();
|
||||
if (btnCMGoTo.Enabled == true && _MyStepRTB.MyLinkText != null) // must have some link test, use it to set edit of transition or ro...
|
||||
{
|
||||
btnCMEditTran.Enabled = _MyStepRTB.MyLinkText.IndexOf("Transition") > -1; // selected link must be a transition
|
||||
@@ -847,18 +855,30 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
// if on a transition, go to the selected transition 'to'. If on
|
||||
// a referenced object, bring up ReferencedObject Editor (for now, just put up a message box.
|
||||
if (_MyStepRTB.MyLinkText.IndexOf("Transition") > -1)
|
||||
if (_MyStepRTB.MyLinkText != null && _MyStepRTB.MyLinkText.IndexOf("Transition") > -1)
|
||||
{
|
||||
_MyEditItem.MyStepPanel.OnLinkClicked(sender, new StepPanelLinkEventArgs(_MyStepRTB.MyLinkText));
|
||||
}
|
||||
else
|
||||
{
|
||||
string roapp = Environment.GetEnvironmentVariable("roapp");
|
||||
LinkText lt = new LinkText(_MyStepRTB.MyLinkText);
|
||||
string args = "\"" + lt.MyRoUsageInfo.MyRODb.FolderPath + "\" " + lt.MyRoUsageInfo.ROID.ToLower();
|
||||
if (!Directory.Exists(lt.MyRoUsageInfo.MyRODb.FolderPath))
|
||||
string myROID;
|
||||
RODbInfo myRODB;
|
||||
if (MyFlexGrid != null && MyFlexGrid.IsRoTable)
|
||||
{
|
||||
MessageBox.Show(string.Format("RO Database directory does not exist: {0}", lt.MyRoUsageInfo.MyRODb.FolderPath));
|
||||
myROID = MyFlexGrid.ROID.ToLower();
|
||||
myRODB = RODbInfo.Get(MyFlexGrid.RODbId);
|
||||
}
|
||||
else
|
||||
{
|
||||
LinkText lt = new LinkText(_MyStepRTB.MyLinkText);
|
||||
myROID = lt.MyRoUsageInfo.ROID.ToLower();
|
||||
myRODB = lt.MyRoUsageInfo.MyRODb;
|
||||
}
|
||||
string roapp = Environment.GetEnvironmentVariable("roapp");
|
||||
string args = "\"" + myRODB.FolderPath + "\" " + myROID;
|
||||
if (!Directory.Exists(myRODB.FolderPath))
|
||||
{
|
||||
MessageBox.Show(string.Format("RO Database directory does not exist: {0}", myRODB.FolderPath));
|
||||
return;
|
||||
}
|
||||
System.Diagnostics.Process.Start(roapp, args);
|
||||
@@ -1555,55 +1575,55 @@ namespace Volian.Controls.Library
|
||||
|
||||
private void btnTblDgnAlgnTxTopLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalTopText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.LeftTop);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Left);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxTopCenter_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalTopText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.CenterTop);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Center);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxTopRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalTopText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.RightTop);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Right);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxCenterLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalCenterText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.LeftCenter);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Left);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxCenterCenter_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalCenterText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.CenterCenter);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Center);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxCenterRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalCenterText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.RightCenter);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Right);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxBottomLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalBottomText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.LeftBottom);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Left);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxBottomCenter_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalBottomText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.CenterBottom);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Center);
|
||||
}
|
||||
|
||||
private void btnTblDgnAlgnTxBottomRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
MyFlexGrid.VerticalBottomText();
|
||||
MyFlexGrid.ChangeCellAlign(MyFlexGrid.Selection, C1.Win.C1FlexGrid.TextAlignEnum.RightBottom);
|
||||
MyFlexGrid.RTFTextAlignment(MyFlexGrid.Selection, HorizontalAlignment.Right);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user