• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# ITransition类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ITransition的典型用法代码示例。如果您正苦于以下问题:C# ITransition类的具体用法?C# ITransition怎么用?C# ITransition使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ITransition类属于命名空间,在下文中一共展示了ITransition类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: CompleteTransition

        /// <summary>
        /// Completes a transition operation by stopping it, restoring 
        /// interactivity, and then firing the OnEndTransition event.
        /// </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 CompleteTransition(NavigationTransition navigationTransition, ContentPresenter presenter, ITransition transition)
        {
            if (transition != null)
            {
                transition.Stop();
            }

            RestoreContentPresenterInteractivity(presenter);

            if (navigationTransition != null)
            {
                navigationTransition.OnEndTransition();
            }
        }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:21,代码来源:TransitionFrame.cs


示例17: TransitionNewContent

        /// <summary>
        /// Transitions the new <see cref="T:System.Windows.UIElement"/>.
        /// </summary>
        /// <param name="newTransition">The <see cref="T:Microsoft.Phone.Controls.ITransition"/> 
        /// for the new <see cref="T:System.Windows.UIElement"/>.</param>
        /// <param name="navigationInTransition">The <see cref="T:Microsoft.Phone.Controls.NavigationInTransition"/> 
        /// for the new <see cref="T:System.Windows.UIElement"/>.</param>
        private void TransitionNewContent(ITransition newTransition, NavigationInTransition navigationInTransition)
        {
            if (_oldContentPresenter != null)
            {
                _oldContentPresenter.Visibility = Visibility.Collapsed;
                _oldContentPresenter.Content = null;
            }

            if (null == newTransition)
            {
                RestoreContentPresenterInteractivity(_newContentPresenter);
                return;
            }

            EnsureStoppedTransition(newTransition);
            newTransition.Completed += delegate
            {
                CompleteTransition(navigationInTransition, _newContentPresenter, newTransition);
            };

            _readyToTransitionToNewContent = false;
            _storedNavigationInTransition = null;
            _storedNewTransition = null;

            PerformTransition(navigationInTransition, _newContentPresenter, newTransition);
        }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:33,代码来源:TransitionFrame.cs


示例18: EnsureStoppedTransition

 /// <summary>
 /// This checks to make sure that, if the transition not be in the clock
 /// state of Stopped, that is will be stopped.
 /// </summary>
 /// <param name="transition">The transition instance.</param>
 private static void EnsureStoppedTransition(ITransition transition)
 {
     if (transition != null && transition.GetCurrentState() != ClockState.Stopped)
     {
         transition.Stop();
     }
 }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:12,代码来源:TransitionFrame.cs


示例19: OnContentChanged

        /// <summary>
        /// Called when the value of the
        /// <see cref="P:System.Windows.Controls.ContentControl.Content"/>
        /// property changes.
        /// </summary>
        /// <param name="oldContent">The old <see cref="T:System.Object"/>.</param>
        /// <param name="newContent">The new <see cref="T:System.Object"/>.</param>
        protected override void OnContentChanged(object oldContent, object newContent)
        {
            base.OnContentChanged(oldContent, newContent);

            _contentReady = true;

            UIElement oldElement = oldContent as UIElement;
            UIElement newElement = newContent as UIElement;

            // Require the appropriate template parts plus a new element to
            // transition to.
            if (_firstContentPresenter == null || _secondContentPresenter == null || newElement == null)
            {
                return;
            }

            NavigationInTransition navigationInTransition = null;
            ITransition newTransition = null;

            if (newElement != null)
            {
                navigationInTransition = TransitionService.GetNavigationInTransition(newElement);
                TransitionElement newTransitionElement = null;
                if (navigationInTransition != null)
                {
                    newTransitionElement = _isForwardNavigation ? navigationInTransition.Forward : navigationInTransition.Backward;
                }
                if (newTransitionElement != null)
                {
                    newElement.UpdateLayout();

                    newTransition = newTransitionElement.GetTransition(newElement);
                    PrepareContentPresenterForCompositor(_newContentPresenter);
                }
            }

            _newContentPresenter.Opacity = 0;
            _newContentPresenter.Visibility = Visibility.Visible;
            _newContentPresenter.Content = newElement;

            _oldContentPresenter.Opacity = 1;
            _oldContentPresenter.Visibility = Visibility.Visible;
            _oldContentPresenter.Content = oldElement;

            if (_readyToTransitionToNewContent)
            {
                TransitionNewContent(newTransition, navigationInTransition);
            }
            else
            {
                _storedNewTransition = newTransition;
                _storedNavigationInTransition = navigationInTransition;
            }
        }
开发者ID:no10pc,项目名称:PhoneToolkit,代码行数:61,代码来源:TransitionFrame.cs


示例20: OnAfterWorkflowAdvance

		/// <summary>
		/// This method is invoked after a Workflow advanced through a Transition
		/// </summary>
		/// <param name="transtion">The transtion that Workflow advanced through</param>
		/// <param name="session">The session that must be used to perform tasks on additional objects</param>
		/// <remarks>When this action is invoked, none of the object involved were saved to Content Store yet.</remarks>
		public void OnAfterWorkflowAdvance(ITransition transtion, IUserWriteSession session)
		{
			
		}
开发者ID:BYUI-Web,项目名称:custom-tab-applications,代码行数:10,代码来源:CustomHooks.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ITranslation类代码示例发布时间:2022-05-24
下一篇:
C# ITransferProgress类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap