本文整理汇总了C#中ITransition类的典型用法代码示例。如果您正苦于以下问题:C# ITransition类的具体用法?C# ITransition怎么用?C# ITransition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITransition类属于命名空间,在下文中一共展示了ITransition类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddArc
public IArc AddArc(IPlace place, ITransition transition)
{
IArc arc=new Arc(version++,place,transition);
this.arcs.Add(arc);
this.graph.AddEdge(arc);
return arc;
}
示例2: Factory
public Factory(Gateway.Event.IMediator eventMediator, ITransition transition, Command.Endpoint.IFactory commandEndpointFactory, Packet.Endpoint.IFactory packetEndpointFactory)
{
_eventMediator = eventMediator;
_transition = transition;
_commandEndpointFactory = commandEndpointFactory;
_packetEndpointFactory = packetEndpointFactory;
}
示例3: Connecting
public Connecting(ITransition transition, Command.Endpoint.IFactory commandEndpointFactory, Context.IConnection context)
{
_transition = transition;
_commandEndpointFactory = commandEndpointFactory;
_context = context;
}
示例4: Arc
public Arc(int id,ITransition transition,IPlace place)
: base(id,transition,place)
{
this.place=place;
this.transition=transition;
this.isInputArc=false;
}
示例5: AddArc
public IArc AddArc(ITransition transition, IPlace place)
{
IArc arc = new Arc(this.version++, transition, place);
this.arcs.Add(arc);
this.graph.AddEdge(transition, place);
return arc;
}
示例6: Listening
public Listening(Gateway.Event.IMediator eventMediator, ITransition transition, Packet.Endpoint.IFactory packetEndpointFactory, Context.IListen context)
{
_eventMediator = eventMediator;
_transition = transition;
_packetEndpointFactory = packetEndpointFactory;
_context = context;
}
示例7: Arc
public Arc(int id, ITransition transition, IPlace place)
: base(id, transition, place)
{
this.annotation = new IdentityExpression();
this.place = place;
this.transition = transition;
this.isInputArc = false;
}
示例8: transitionManager1_AfterTransitionEnds
void transitionManager1_AfterTransitionEnds(ITransition transition, System.EventArgs e) {
if(!IsHandleCreated) return;
var method = new MethodInvoker(() => {
// bottomPanelBase1.Enabled = true;
// var moduleControl = viewModel.SelectedModule as DevExpress.DevAV.Modules.BaseModuleControl;
// if(moduleControl != null) moduleControl.OnTransitionCompleted();
});
if(InvokeRequired) BeginInvoke(method);
else method();
}
示例9: DoTransition
public void DoTransition(object newContent, ITransition transition)
{
if(newContent == null)
{
Children.Clear();
return;
}
UIElement view;
if(ContentTemplate != null)
{
var template = ContentTemplate.LoadContent();
var fe = template as FrameworkElement;
if(fe != null)
fe.DataContext = newContent;
view = template as UIElement;
}
else view = newContent as UIElement;
if(view == null) return;
if (Children.Contains(view))
{
Children.Clear();
Children.Add(view);
return;
}
if(Children.Count > 0)
{
if(transition.RequiresNewContentTopmost)
{
Children.Add(view);
transition.BeginTransition(this, Children[0], view);
}
else
{
Children.Insert(0, view);
transition.BeginTransition(this, Children[1], view);
}
}
else
{
Children.Add(view);
TransitionEnded(transition, null, view);
}
}
示例10: TransitionMutableCore
/// <summary>
/// Initializes a new instance of the <see cref="TransitionMutableCore"/> class.
/// </summary>
/// <param name="transitionType">
/// The transition type.
/// </param>
public TransitionMutableCore(ITransition transitionType)
: base(transitionType)
{
this._conditions = new List<ITextTypeWrapperMutableObject>();
this._targetStep = transitionType.TargetStep.Id;
if (transitionType.Condition != null)
{
foreach (ITextTypeWrapper textTypeWrapper in transitionType.Condition)
{
this._conditions.Add(new TextTypeWrapperMutableCore(textTypeWrapper));
}
}
this._localId = transitionType.LocalId;
}
示例11: DoTransition
/// <summary>
/// Starts the specified transition.
/// </summary>
/// <param name="previousContent"></param>
/// <param name="newContent"></param>
/// <param name="transition"></param>
public void DoTransition(UIElement previousContent, UIElement newContent, ITransition transition)
{
Children.Clear();
Children.Add(previousContent);
if (transition.RequiresNewContentTopmost)
{
if (newContent != null) Children.Add(newContent);
transition.BeginTransition(this, Children.Cast<UIElement>().First(), Children.Cast<UIElement>().Last());
}
else
{
if (newContent != null) Children.Insert(0, newContent);
transition.BeginTransition(this, Children.Cast<UIElement>().Last(), Children.Cast<UIElement>().First());
}
}
示例12: ChangeState
public virtual void ChangeState(ITransition transition)
{
if (transition == null)
{
throw new ArgumentNullException(nameof(transition), "Cannot change state with a null transition");
}
var oldState = this.State;
var newState = this.GetDestinationState(transition);
if (newState == null)
{
throw new InvalidTransitionException(oldState, transition);
}
FireChanging(newState);
// Exit old State
try
{
State.Exit(transition);
}
catch (Exception e)
{
throw new StateFailedToExitException(oldState, transition, e);
}
// Change State
State = newState;
// Enter new State
try
{
State.Enter(transition);
}
catch (Exception e)
{
throw new StateFailedToEnterException(oldState, transition, newState, e);
}
FireChanged();
State.Action(this);
}
示例13: IsTransitionAllowed
public abstract bool IsTransitionAllowed(ITransition transition);
示例14: OnNavigating
/// <summary>
/// Handles the Navigating event of the frame, the immediate way to
/// begin a transition out before the new page has loaded or had its
/// layout pass.
/// </summary>
/// <param name="sender">The source object.</param>
/// <param name="e">The event arguments.</param>
private void OnNavigating(object sender, NavigatingCancelEventArgs e)
{
_isForwardNavigation = e.NavigationMode != NavigationMode.Back;
var oldElement = Content as UIElement;
if (oldElement == null)
{
return;
}
FlipPresenters();
TransitionElement oldTransitionElement = null;
NavigationOutTransition navigationOutTransition = null;
ITransition oldTransition = null;
navigationOutTransition = TransitionService.GetNavigationOutTransition(oldElement);
if (navigationOutTransition != null)
{
oldTransitionElement = _isForwardNavigation ? navigationOutTransition.Forward : navigationOutTransition.Backward;
}
if (oldTransitionElement != null)
{
oldTransition = oldTransitionElement.GetTransition(oldElement);
}
if (oldTransition != null)
{
EnsureStoppedTransition(oldTransition);
_storedNavigationOutTransition = navigationOutTransition;
_storedOldTransition = oldTransition;
oldTransition.Completed += OnExitTransitionCompleted;
_performingExitTransition = true;
PerformTransition(navigationOutTransition, _oldContentPresenter, oldTransition);
PrepareContentPresenterForCompositor(_oldContentPresenter);
}
else
{
_readyToTransitionToNewContent = true;
}
}
示例15: PerformTransition
/// <summary>
/// Performs a transition when given the appropriate components,
/// includes calling the appropriate start event and ensuring opacity
/// on the content presenter.
/// </summary>
/// <param name="navigationTransition">The navigation transition.</param>
/// <param name="presenter">The content presenter.</param>
/// <param name="transition">The transition instance.</param>
private static void PerformTransition(NavigationTransition navigationTransition, ContentPresenter presenter, ITransition transition)
{
if (navigationTransition != null)
{
navigationTransition.OnBeginTransition();
}
if (presenter != null && presenter.Opacity != 1)
{
presenter.Opacity = 1;
}
if (transition != null)
{
transition.Begin();
}
}