This commit is contained in:
@@ -15,7 +15,6 @@ namespace Volian.Controls.Library
|
||||
public partial class DisplayTransition : UserControl
|
||||
{
|
||||
#region Properties
|
||||
|
||||
private int _TranFmtIndx = -1; // stores selected transition format
|
||||
private ItemInfo _CurItemFrom; // stores what item transition is 'from'
|
||||
private TransitionInfo _CurTrans; // if modify, this is transition to modify
|
||||
@@ -23,19 +22,22 @@ namespace Volian.Controls.Library
|
||||
{
|
||||
get { return _CurTrans; }
|
||||
set
|
||||
{
|
||||
_CurTrans = value;
|
||||
if (_CurTrans == null) // Insert a transition
|
||||
{
|
||||
if (!Visible) return;
|
||||
if (value == null) // Insert a transition
|
||||
{
|
||||
if (MyRTB == null) return;
|
||||
if (_CurTrans == value && _CurItemFrom == MyRTB.MyItem) return;
|
||||
_CurItemFrom = MyRTB.MyItem;
|
||||
_TranFmtIndx = 0;
|
||||
}
|
||||
else // Modify a transition
|
||||
else // Modify a transition
|
||||
{
|
||||
_TranFmtIndx = _CurTrans.TranType;
|
||||
if (_CurTrans == value) return;
|
||||
_TranFmtIndx = value.TranType;
|
||||
_CurItemFrom = MyRTB.MyItem;
|
||||
}
|
||||
_CurTrans = value;
|
||||
_SavCurItemFrom = _CurItemFrom;
|
||||
_SavTranFmtIndx = _TranFmtIndx;
|
||||
TransitionFillIn();
|
||||
@@ -60,7 +62,30 @@ namespace Volian.Controls.Library
|
||||
public DisplayRTB MyRTB
|
||||
{
|
||||
get { return _MyRTB; }
|
||||
set { _MyRTB = value; }
|
||||
set
|
||||
{
|
||||
if (!Visible) return;
|
||||
// add or remove events for
|
||||
if (_MyRTB != null)
|
||||
_MyRTB.LinkChanged -= new DisplayRTBLinkEvent(_MyRTB_LinkChanged);
|
||||
if (value == null) return;
|
||||
_MyRTB = value;
|
||||
_MyRTB.LinkChanged += new DisplayRTBLinkEvent(_MyRTB_LinkChanged);
|
||||
if (_MyRTB.MyLinkText == null)
|
||||
{
|
||||
CurTrans = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
void _MyRTB_LinkChanged(object sender, LinkClickedEventArgs e)
|
||||
{
|
||||
if (_MyRTB.MyLinkText == null)
|
||||
CurTrans = null;
|
||||
else
|
||||
{
|
||||
DisplayLinkEventArgs tmp = new DisplayLinkEventArgs(null, e);
|
||||
CurTrans = tmp.MyTransition;
|
||||
}
|
||||
}
|
||||
private ItemInfo _CurrentItemProcedure; // the selected item's procedure
|
||||
private ItemInfo _CurrentToProcedure; // the 'to' location's procedure (may be same as _CurrentItemProcedure)
|
||||
|
Reference in New Issue
Block a user