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


C# Transition.run方法代码示例

本文整理汇总了C#中Transitions.Transition.run方法的典型用法代码示例。如果您正苦于以下问题:C# Transition.run方法的具体用法?C# Transition.run怎么用?C# Transition.run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Transitions.Transition的用法示例。


在下文中一共展示了Transition.run方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Move

 public void Move(PlayingCard card, Point position)
 {
     var t = new Transition(new TransitionType_EaseInEaseOut(500));
     t.add(card, "Left", position.X);
     t.add(card, "Top", position.Y);
     t.run();
 }
开发者ID:nerdumdigitalis,项目名称:Kani,代码行数:7,代码来源:CardMover.cs

示例2: swipe

        public void swipe(bool show = true)
        {
            this.Visible = true;
            Transition _transasition = new Transitions.Transition(new TransitionType_EaseInEaseOut(500));
            _transasition.add(this, "Left", show ? 0 : this.Width);
            _transasition.run();

            while (this.Left != (show ? 0 : this.Width))
            {
                Application.DoEvents();
            }

            if (!show)
            {
                closed(new EventArgs());
                _owner.Resize -= owner_Resize;
                _owner.Controls.Remove(this);
                this.Dispose();
            }
            else
            {
                _loaded = true;
                ResizeForm();
                shown(new EventArgs());
            }
        }
开发者ID:juliooscar,项目名称:Pharma,代码行数:26,代码来源:pnlSlider.cs

示例3: transitionPictures

        /// <summary>
        /// Performs a random tarnsition between the two pictures.
        /// </summary>
        public void transitionPictures()
        {
            // We randomly choose where the current image is going to 
            // slide off to (and where we are going to slide the inactive
            // image in from)...
            int iDestinationLeft = (m_Random.Next(2) == 0) ? Width : -Width;
            int iDestinationTop = (m_Random.Next(3) - 1) * Height;

            // We move the inactive image to this location...
            SuspendLayout();
            m_InactivePicture.Top = iDestinationTop;
            m_InactivePicture.Left = iDestinationLeft;
            m_InactivePicture.BringToFront();
            ResumeLayout();

            // We perform the transition which moves the active image off the
            // screen, and the inactive one onto the screen...
            Transition t = new Transition(new TransitionType_EaseInEaseOut(1000));
            t.add(m_InactivePicture, "Left", 0);
            t.add(m_InactivePicture, "Top", 0);
            t.add(m_ActivePicture, "Left", iDestinationLeft);
            t.add(m_ActivePicture, "Top", iDestinationTop);
            t.run();

            // We swap over which image is active and inactive for next time
            // the function is called...
            PictureBox tmp = m_ActivePicture;
            m_ActivePicture = m_InactivePicture;
            m_InactivePicture = tmp;
        }
开发者ID:CreeperLava,项目名称:ME3Explorer,代码行数:33,代码来源:KittenPuppyControl.cs

示例4: LabelMain_MouseLeave

 private void LabelMain_MouseLeave(object sender, EventArgs e)
 {
     Transition T = new Transition(new TransitionType_EaseInEaseOut(400));
     T.add(this, "ForeColor", Color.Silver);
     T.add(LabelMain, "ForeColor", Color.Silver);
     T.run();
 }
开发者ID:ptx-console,项目名称:cheetah-web-browser,代码行数:7,代码来源:LabelButton.cs

示例5: FadePicBoxes

 private void FadePicBoxes(float xOpacity, float plusOpacity)
 {
     var fade = new Transition(new TransitionType_Linear(400));
     fade.add(pictureBoxX, "Opacity", xOpacity);
     fade.add(pictureBoxPlus, "Opacity", plusOpacity);
     fade.run();
 }
开发者ID:RodrigoVarasLopez,项目名称:ardupilot-mega,代码行数:7,代码来源:ConfigAccelerometerCalibrationQuad.cs

示例6: Ask

 public void Ask(string question)
 {
     if (question == "quit")
     {
         HideAssistant();
         Application.Exit();
     }
     if (asked == 3)
     {
         Transition t = new Transition(new TransitionType_Deceleration(500));
         t.add(MessagePanelz, "Top", MessagePanelz.Location.Y - 290);
         t.run();
         asked = 0;
     }
     DisplayQuestion(question);
     try
     {
         string uriString = "http://infini-dev.com/WISA/WISA.php"; //post request to server and get response
         WebClient myWebClient = new WebClient();
         NameValueCollection PostParams = new NameValueCollection();
         PostParams.Add("request", question);
         byte[] responseArray =
         myWebClient.UploadValues(uriString, "POST", PostParams);
         string response = Encoding.ASCII.GetString(responseArray);
         DisplayResponse(response);
     }
     catch
     {
         DisplayResponse("I'm sorry, I could not connect to the server");
     }
     asked++;
 }
开发者ID:codedit,项目名称:SpeechAssistant,代码行数:32,代码来源:Main.cs

示例7: cmdSwap_Click

        /// <summary>
        /// Called when the "Swap" button is pressed.
        /// </summary>
        private void cmdSwap_Click(object sender, EventArgs e)
        {
            // We swap over the group-boxes that show the "Bounce" and 
            // "Throw and Catch" transitions. The active one is animated 
            // left off the screen and the inactive one is animated right
            // onto the screen...

            // We work out which box is currently on screen and
            // which is off screen...
            Control ctrlOnScreen, ctrlOffScreen;
            if (gbBounce.Left == GROUP_BOX_LEFT)
            {
                ctrlOnScreen = gbBounce;
                ctrlOffScreen = gbThrowAndCatch;
            }
            else
            {
                ctrlOnScreen = gbThrowAndCatch;
                ctrlOffScreen = gbBounce;
            }
            ctrlOnScreen.SendToBack();
            ctrlOffScreen.BringToFront();

            // We create a transition to animate the two boxes simultaneously. One is
            // animated onto the screen, the other off the screen.

            // The ease-in-ease-out transition acclerates the rate of change for the 
            // first half of the animation, and decelerates during the second half.

            Transition t = new Transition(new TransitionType_EaseInEaseOut(1000));
            t.add(ctrlOnScreen, "Left", -1 * ctrlOnScreen.Width);
            t.add(ctrlOffScreen, "Left", GROUP_BOX_LEFT);
            t.run();
        }
开发者ID:ZakiMohammed,项目名称:dot-net-transitions,代码行数:37,代码来源:Form1.cs

示例8: AssistantGoUp

 private void AssistantGoUp()
 {
     //debug.Visible = true;
     Transition t = new Transition(new TransitionType_Deceleration(500));
     t.add(this, "Top", ScreenHeight/3);
        t.add(MicPanel, "Top", ScreenHeight/3*2-Mic.Height-10);
        //t.add(MessagePanelz, "Height", this.Height - 200);
     hidden = false;
     t.run();
     t.TransitionCompletedEvent += new EventHandler<Transition.Args>(t_TransitionCompletedEvent);
 }
开发者ID:codedit,项目名称:SpeechAssistant,代码行数:11,代码来源:Main.cs

示例9: AnimateShowFormTrigger

 private void AnimateShowFormTrigger()
 {
     this.Show();
     Transition t = new Transition(new TransitionType_Deceleration(100));
     int tempY = this.Location.Y;
     this.CenterToScreen();
     int centerY = this.Location.Y;
     this.Top = tempY;
     t.add(this, "Top", centerY);
     t.add(this, "Opacity", 1.0);
     t.run();
 }
开发者ID:nodegin,项目名称:dhs,代码行数:12,代码来源:MainForm.cs

示例10: SlideOut

        public void SlideOut()
        {
            this.Location = new Point(FindForm().Width, 66);
            this.Visible = true;
            this.BackColor = Color.Silver;
            this.BringToFront();

            var t = new Transition(new TransitionType_EaseInEaseOut(400));
            t.TransitionCompletedEvent += ShowTransitionCompletedEvent;
            t.add(this, "Left", 15);
            t.add(this, "BackColor", Color.White);
            t.run();
        }
开发者ID:CustomerFX,项目名称:SalesLogixMobileDeveloperTools,代码行数:13,代码来源:ActionPanel.cs

示例11: SetErrorMessageOpacity

        private void SetErrorMessageOpacity()
        {
            if (_presenter.HasError)
            {
                // Todo - is this the prob? maybe single log trasition
                var t = new Transition(new TransitionType_Acceleration(1000));
                t.add(PBOX_WarningIcon, "Opacity", 1.0F);
                t.add(LBL_Error, "Opacity", 1.0F);
                t.run();

                //Transition.runChain(_ErrorTransition);
            }
            else
            {
                _NoErrorTransition.run();
            }
        }
开发者ID:ECain,项目名称:MissionPlanner,代码行数:17,代码来源:ConfigCameraStab.cs

示例12: cmdTextTransition_Click

        /// <summary>
        /// Called when the "Text Transition" button is pressed.
        /// </summary>
        private void cmdTextTransition_Click(object sender, EventArgs e)
        {
            // We transition four properties simulataneously here:
            // - The two labels' text is changed.
            // - The two labels' colors are changed.

            // We work out the new text and colors to transition to...
            string strText1, strText2;
            Color color1, color2;
            if (lblTextTransition1.Text == STRING_SHORT)
            {
                strText1 = STRING_LONG;
                color1 = Color.Red;
                strText2 = STRING_SHORT;
                color2 = Color.Blue;
            }
            else
            {
                strText1 = STRING_SHORT;
                color1 = Color.Blue;
                strText2 = STRING_LONG;
                color2 = Color.Red;
            }

            // We create a transition to animate all four properties at the same time...
            Transition t = new Transition(new TransitionType_Linear(1000));
            t.add(lblTextTransition1, "Text", strText1);
            t.add(lblTextTransition1, "ForeColor", color1);
            t.add(lblTextTransition2, "Text", strText2);
            t.add(lblTextTransition2, "ForeColor", color2);
            t.run();
        }
开发者ID:ZakiMohammed,项目名称:dot-net-transitions,代码行数:35,代码来源:Form1.cs

示例13: CreateRetourManagement

        private void CreateRetourManagement()
        {
            if (_retourManagement != null) {
                return;
            }

            if (_reservationManagement != null || _empruntManagement != null) {
                if (_reservationManagement != null){
                    Controls.Remove(_reservationManagement);
                    Controls.Remove(_empruntManagement);
                }
                if (_reservationManagement != null) {
                    _reservationManagement.Dispose();
                    _reservationManagement = null;
                }
                if (_empruntManagement != null) {
                    _empruntManagement.Dispose();
                    _empruntManagement = null;
                }
            }

            _retourManagement = new RetourManagement(this) {Location = new Point(panel1.Width + 20, 56)};

            var t1 = new Transition(new TransitionType_EaseInEaseOut(1000));
            t1.add(this, "Width", _dashboardWidth + _retourManagement.Width + 10);
            t1.add(lblBibliothequeTitle, "Left", _lblBibliothequeTitleLocationX + _retourManagement.Width + 10);
            t1.add(cmbBibliotheque, "Left", _cmbBibliothequeLocationX + _retourManagement.Width + 10);

            Controls.Add(_retourManagement);

            t1.run();
        }
开发者ID:rsilvestre,项目名称:WebserviceLibraryManager,代码行数:32,代码来源:DashboardAdminManager.cs

示例14: run

 /// <summary>
 /// Creates and immediately runs a transition on the property passed in.
 /// </summary>
 public static void run(object target, string strPropertyName, object destinationValue, ITransitionType transitionMethod)
 {
     Transition t = new Transition(transitionMethod);
     t.add(target, strPropertyName, destinationValue);
     t.run();
 }
开发者ID:ZakiMohammed,项目名称:dot-net-transitions,代码行数:9,代码来源:Transition.cs

示例15: AnimateMenuPanel

        void AnimateMenuPanel()
        {
            //Util.Animate(menuPanel, Util.Effect.Slide, 100, 0); this.Refresh();

            menuPanel.BringToFront();
            // Left border and bottom left cornerborder would get overlapped otherwise
            LeftBorderPanel.BringToFront();
            BottomLeftCornerPanel.BringToFront();

            #region Animation
            if (this.WindowState == FormWindowState.Normal)
            {
                if (menuPanel.Left == -menuPanel.Width - 1)
                {
                    Transition t = new Transition(new TransitionType_Deceleration(300)); t.add(menuPanel, "Left", 1); t.run();
                }
                else
                {
                    Transition t = new Transition(new TransitionType_Deceleration(300)); t.add(menuPanel, "Left", -menuPanel.Width - 1); t.run();
                }
            }
            else
            {
                if (menuPanel.Left == -menuPanel.Width)
                {
                    Transition t = new Transition(new TransitionType_Deceleration(300)); t.add(menuPanel, "Left", 0); t.run();
                }
                else
                {
                    Transition t = new Transition(new TransitionType_Deceleration(300)); t.add(menuPanel, "Left", -menuPanel.Width); t.run();
                }
            }
            #endregion
        }
开发者ID:XeZrunner,项目名称:WViewer-WinForms,代码行数:34,代码来源:mainWindow.cs


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