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


C# System.Windows.Forms.Timer.Start方法代码示例

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


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

示例1: SledSyntaxCheckerService

        public SledSyntaxCheckerService(ISettingsService settingsService)
        {
            Enabled = true;
            Verbosity = SledSyntaxCheckerVerbosity.Overall;

            var enabledProp =
                new BoundPropertyDescriptor(
                    this,
                    () => Enabled,
                    "Enabled",
                    null,
                    "Enable or disable the syntax checker");

            var verboseProp =
                new BoundPropertyDescriptor(
                    this,
                    () => Verbosity,
                    "Verbosity",
                    null,
                    "Verbosity level");

            // Persist settings
            settingsService.RegisterSettings(this, enabledProp, verboseProp);

            // Add user settings
            settingsService.RegisterUserSettings("Syntax Checker", enabledProp, verboseProp);

            m_syncContext = SynchronizationContext.Current;

            m_batchTimer = new Timerz { Interval = TimerIntervalMsec };
            m_batchTimer.Tick += BatchTimerTick;
            m_batchTimer.Start();
        }
开发者ID:arsaccol,项目名称:SLED,代码行数:33,代码来源:SledSyntaxCheckerService.cs

示例2: GameMultiplayerControl

        public GameMultiplayerControl(Control Control, GameScreen GameScreen, int MapIndex, int SaveGameIndex, MultiplayerMatchStartInformation MP)
            : base(Control, GameScreen, MapIndex, SaveGameIndex, true)
        {
            this.UserName = MP.UserName;
            this.Password = MP.Password;
            this.MatchId = MP.MatchId;
            this.GameState = 0;
            this.MultiplayerMatch = true;
            this.MultiplayerFraction = MP.MultiplayerFraction;

            // timer checking if a newer game state is available
            NewGameStateAvailableTimer = new System.Windows.Forms.Timer();
            NewGameStateAvailableTimer.Interval = 1000;
            NewGameStateAvailableTimer.Tick += UpdateGameState;
            NewGameStateAvailableTimer.Start();

            // show multiplayer tab (gui) and update it's content
            GameScreen.TabItem_Multiplayer.Visibility = Visibility.Visible;
            GameScreen.Button_Restart.IsEnabled = false; // disable restart map button for multiplayer matches
            GameScreen.Label_Multiplayer_MatchID.Content = R.String("MatchID") + ": " + MatchId.ToString();
            GameScreen.Label_Multiplayer_MatchVersion.Content = R.String("MatchVersion") + ": " + GameState.ToString();

            // background worker
            BackgroundWorkerDownloadLatestGameState.DoWork += BackgroundWorkerDownloadLatestGameStateWork;
            BackgroundWorkerDownloadLatestGameState.RunWorkerCompleted += BackgroundWorkerDownloadLatestGameState_RunWorkerCompleted;
        }
开发者ID:Simsso,项目名称:Crusades,代码行数:26,代码来源:GameMultiplayerControl.cs

示例3: Open

        public void Open()
        {
            try
            {
                bool isConnected = FindTheHid(vendorId, productId);

                if (isConnected)
                {
                    Tracer.Trace("OK: USB Interface connected with PIC USB Proximity Board");
                }
                else
                {
                    string str = string.Format("USB Interface could not connect with device with Vendor ID={0} Product ID={1}", vendorId, productId);
                    Tracer.Error(str);
                    throw new Exception(str);
                }

                // run a monitoring thread in case we need to reset things:
                picUsbTickerTimer = new System.Windows.Forms.Timer();
                picUsbTickerTimer.Interval = 1000;    // ms
                picUsbTickerTimer.Tick += new EventHandler(picUsbTicker);
                picUsbTickerTimer.Start();

                Tracer.Trace("OK: PIC Proximity Board ticker ON");
            }
            catch (Exception ex)
            {
                Tracer.Error(ex);
                throw;
            }
        }
开发者ID:slgrobotics,项目名称:TrackRoamer,代码行数:31,代码来源:ProximityModule.cs

示例4: CreateTimer

 private Timer CreateTimer(Action action, int seconds)
 {
     var timer = new Timer();
     timer.Tick += (sender, args) => action();
     timer.Interval = seconds * 1000;
     timer.Start();
     return timer;
 }
开发者ID:crmckenzie,项目名称:SpecFlow.VisualStudio,代码行数:8,代码来源:VsBrowserGuidanceNotificationService.cs

示例5: breakdown

 public void breakdown()
 {
     setBrokenDown(true);
     breakdownTimer = new System.Windows.Forms.Timer();
     breakdownTimer.Interval = Settings.getSimSettings().getBreakdownTime();
     breakdownTimer.Start();
     breakdownTimer.Tick += new EventHandler(breakdown_Tick);
 }
开发者ID:heizhai,项目名称:cp2013team7,代码行数:8,代码来源:Car.cs

示例6: SparkleBubble

 public SparkleBubble(string title, string subtext)
     : base(title, subtext)
 {
     System.Windows.Forms.Timer timer = new System.Windows.Forms.Timer ();
     timer.Tick += delegate { this.Close (); };
     timer.Interval = 4500;
     timer.Start ();
 }
开发者ID:BillTheBest,项目名称:SparkleShare,代码行数:8,代码来源:SparkleBubble.cs

示例7: MovieScrapeFactory

        /// <summary>
        /// Initializes static members of the <see cref="MovieScrapeFactory"/> class. 
        /// </summary>
        static MovieScrapeFactory()
        {
            postProcess = new BindingList<MovieModel>();

            timer = new Timer();
            timer.Tick += Timer_Tick;
            timer.Interval = 100;
            timer.Start();
        }
开发者ID:Acrisius,项目名称:YANFOE.v2,代码行数:12,代码来源:MovieScrapeFactory.cs

示例8: ShowPage

        public bool ShowPage(string url)
        {
            var window = dte.ItemOperations.Navigate(url, vsNavigateOptions.vsNavigateOptionsNewWindow);

            activationTimer = new System.Windows.Forms.Timer();
            activationTimer.Tick += (sender, args) => ActivateWindow(window);
            activationTimer.Interval = 5000;
            activationTimer.Start();

            return true;
        }
开发者ID:njwilloughby,项目名称:SpecFlow,代码行数:11,代码来源:VsBrowserGuidanceNotificationService.cs

示例9: CreateTickTimer

        private void CreateTickTimer()
        {
            DestroyTickTimer();

            const float fps = 80;
            float interval = (1.0f / fps) * 1000.0f;
            tickTimer = new System.Windows.Forms.Timer();
            tickTimer.Interval = (int)interval;
            tickTimer.Tick += tickTimer_Tick;
            tickTimer.Start();
        }
开发者ID:AKNightHawk,项目名称:AssaultKnights2,代码行数:11,代码来源:WPFAppEngineApp.cs

示例10: Start

        public void Start()
        {
            IsFlooding = true; LastAction = Tick();

            tTimepoll = new System.Windows.Forms.Timer();
            tTimepoll.Tick += new EventHandler(tTimepoll_Tick);
            tTimepoll.Start();

            BackgroundWorker bw = new BackgroundWorker();
            bw.DoWork += new DoWorkEventHandler(bw_DoWork);
            bw.RunWorkerAsync();
        }
开发者ID:anon-erebus,项目名称:LOIC,代码行数:12,代码来源:HTTPFlooder.cs

示例11: SampleCounter

        /// <summary>
        /// Constructor.
        /// </summary>
        public SampleCounter()
        {
            // Initialise variables
            prevSamplesReceived = 0;
            SamplesReceived = 0;

            // Setup timer
            timer = new System.Windows.Forms.Timer();
            timer.Interval = 1000;
            timer.Tick += new EventHandler(timer_Tick);
            timer.Start();
        }
开发者ID:Kamerton,项目名称:Kamerton5_0,代码行数:15,代码来源:SampleCounter.cs

示例12: ProgressMeter

        /// <summary>
        /// Constructs a Time-Based progress meter that shows progress against an expected time.
        /// </summary>
        /// <param name="progressHandler"></param>
        /// <param name="baseMessage"></param>
        /// <param name="EstimatedTime"></param>
        public ProgressMeter(IProgressHandler progressHandler, string baseMessage, TimeSpan EstimatedTime)
        {
            _progressHandler = progressHandler;
            _baseMessage = baseMessage;
            _timeSpan = EstimatedTime;
            _endValue = EstimatedTime.TotalSeconds * 1000;

            _timer = new System.Windows.Forms.Timer();
            _timer.Interval = Convert.ToInt32(_timeSpan.TotalSeconds * 10); // Attempt to have a tick once during each estimated percentile
            //_timer.Interval = 100;
            _timer.Tick += new EventHandler(_timer_tick);
            _timer.Start(); // Timers should be on another thread...
        }
开发者ID:zhongshuiyuan,项目名称:mapwindowsix,代码行数:19,代码来源:ProgressMeter.cs

示例13: TimerBox

        public TimerBox(TimeSpan time)
        {
            InitializeComponent();

            this.Topmost = true;
            this.Top = 0;
            this.Left = 0;
            timer = time;
            timer1 =new  System.Windows.Forms.Timer();
            timer1.Interval = 1000;
            timer1.Tick += new EventHandler(timer1_Tick);
            initiate();
            timer1.Start();
        }
开发者ID:FlorinFlo,项目名称:PrinchBookingSystem,代码行数:14,代码来源:Timer.xaml.cs

示例14: VirtualCapture

        public VirtualCapture(string name, string uuid, Size size, int fps, int numRadialDistortionCoefficients = 0, Matrix<float> undistortMapX = null, Matrix<float> undistortMapY = null)
            : base(name, uuid, size)
        {
            NumRadialDistortionCoefficients = numRadialDistortionCoefficients;
            UndistortMapX = undistortMapX;
            UndistortMapY = undistortMapY;

            Rgba = new Picture<Rgba, byte>(Width, Height);
            Gray = new Picture<Gray, byte>(Width, Height);
            
            Timer = new Timer();
            Timer.Interval = 1000 / fps;
            Timer.Tick += Update;
            Timer.Start();
        }
开发者ID:JaapSuter,项目名称:Pentacorn,代码行数:15,代码来源:VirtualCapture.cs

示例15: GifImageStyle

        public GifImageStyle(FastColoredTextBox parent)
            : base(null, null, FontStyle.Regular)
        {
            ImagesByText = new Dictionary<string, Image>();
            this.parent = parent;

            //create timer
            timer = new System.Windows.Forms.Timer();
            timer.Interval = 100;
            timer.Tick += (EventHandler)delegate
            {
                ImageAnimator.UpdateFrames();
                parent.Invalidate();
            };
            timer.Start();
        }
开发者ID:phaufe,项目名称:ynoteclassic,代码行数:16,代码来源:ImageRenderer.cs


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