当前位置: 首页>>代码示例>>C#>>正文


C# ITransition类代码示例

本文整理汇总了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;
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:7,代码来源:PetriNet.cs

示例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;
 }
开发者ID:Zananok,项目名称:Harmonize,代码行数:7,代码来源:Factory.cs

示例3: Connecting

        public Connecting(ITransition transition, Command.Endpoint.IFactory commandEndpointFactory, Context.IConnection context)
        {
            _transition = transition;
            _commandEndpointFactory = commandEndpointFactory;

            _context = context;
        }
开发者ID:Zananok,项目名称:Harmonize,代码行数:7,代码来源:Connecting.cs

示例4: Arc

 public Arc(int id,ITransition transition,IPlace place)
     : base(id,transition,place)
 {
     this.place=place;
     this.transition=transition;
     this.isInputArc=false;
 }
开发者ID:BackupTheBerlios,项目名称:mbunit-svn,代码行数:7,代码来源:Arc.cs

示例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;
 }
开发者ID:NigelThorne,项目名称:ndependencyinjection,代码行数:7,代码来源:PetriNet.cs

示例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;
 }
开发者ID:jamesleech,项目名称:Harmonize,代码行数:7,代码来源:Listening.cs

示例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;
 }
开发者ID:NigelThorne,项目名称:ndependencyinjection,代码行数:8,代码来源:Arc.cs

示例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();
 }
开发者ID:tuanly,项目名称:SGM,代码行数:10,代码来源:MainForm.cs

示例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);
            }
        }
开发者ID:ssethi,项目名称:TestFrameworks,代码行数:50,代码来源:TransitionPresenter.cs

示例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;
        }
开发者ID:alcardac,项目名称:SDMXRI_WS_OF,代码行数:21,代码来源:TransitionMutableCore.cs

示例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());
            }
        }
开发者ID:ernstnaezer,项目名称:Manssiere,代码行数:22,代码来源:TransitionPresenter.cs

示例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);
        }
开发者ID:dickiepotter,项目名称:State,代码行数:44,代码来源:StateMachineBase.cs

示例13: IsTransitionAllowed

 public abstract bool IsTransitionAllowed(ITransition transition);
开发者ID:nelsestu,项目名称:objectflow,代码行数:1,代码来源:WhenTransitionIsBlocked.cs

示例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;
            }
        }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:52,代码来源:TransitionFrame.cs

示例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();
     }
 }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:23,代码来源:TransitionFrame.cs


注:本文中的ITransition类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。