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


C# System.Windows.Threading.DispatcherTimer.Start方法代码示例

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


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

示例1: ChooseReceiverWindow_Loaded

 void ChooseReceiverWindow_Loaded(object sender, RoutedEventArgs e)
 {
     System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer();
     timer.Interval = TimeSpan.FromSeconds(0.5);
     timer.Tick += new EventHandler(timer_Tick);
     timer.Start();
 }
开发者ID:al-main,项目名称:CloudyBank,代码行数:7,代码来源:ChooseReceiverWindow.xaml.cs

示例2: InitSysImg

        //初始化系统界面
        private void InitSysImg()
        {
            if (_flowElement != null)
            {
                //====================================================
                //操作按钮组
                InitOperBtnFrame();

                #region 事件处理
                this.txtNumShow.GotFocus += InputFocus;
                this.txtNumShow.LostFocus += LostFocus;
                #endregion

                //====================================================

                this.txtMachineCode.Text = GlobalCodeBuilder.MachineCodeBuilder;
                //二维码
                this.imgQrFram.Source = ButtonExtend.InitButtonWithNormalImg("imgQrFram");
                this.imgQr.Source = ButtonExtend.InitButtonWithNormalImg("QRcode");

                ShowTimer = new System.Windows.Threading.DispatcherTimer();
                ShowTimer.Tick += new EventHandler(ShowCurTimer); //起个Timer一直获取当前时间
                ShowTimer.Interval = new TimeSpan(0, 0, 0, 1, 0);
                ShowTimer.Start();

                //====================================================
                ProcessInit();
            }
        }
开发者ID:zhangcj,项目名称:hehePrint,代码行数:30,代码来源:ScanWindow.xaml.cs

示例3: Time_Start

 public void Time_Start(object sender, RoutedEventArgs e)
 {
     timer = new System.Windows.Threading.DispatcherTimer();
     timer.Interval = new TimeSpan(0, 0, 1);
     timer.Tick += new EventHandler(timer_Tick);
     timer.Start();
 }
开发者ID:red201432,项目名称:CSharpLearn,代码行数:7,代码来源:MainWindow.xaml.cs

示例4: AutoView

        public AutoView(Session session)
        {
            InitializeComponent();

            this.WindowState = WindowState.Maximized;
            this.WindowStyle = WindowStyle.None;
            this.ResizeMode = ResizeMode.NoResize;
            this.session = session;

            frameTimer = new System.Windows.Threading.DispatcherTimer();
            frameTimer.Tick += OnFrame;
            frameTimer.Interval = TimeSpan.FromSeconds(1.0 / 60.0);
            frameTimer.Start();

            frameTimer2 = new System.Windows.Threading.DispatcherTimer();
            frameTimer2.Tick += OnFrame2;
            frameTimer2.Interval = TimeSpan.FromSeconds(4.0);
            frameTimer2.Start();

            this.lastTick = Environment.TickCount;

            rand = new Random(this.GetHashCode());

            this.Show();

            this.KeyDown += new System.Windows.Input.KeyEventHandler(AutoView_KeyDown);

            CreateCircles();
            CreateMessagePanels();
        }
开发者ID:changman,项目名称:yammyy,代码行数:30,代码来源:AutoView.xaml.cs

示例5: SetUpMissingDeviceTimer

 private void SetUpMissingDeviceTimer()
 {
     System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
     dispatcherTimer.Tick += new EventHandler(MissingDeviceTimer_Tick);
     dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
     dispatcherTimer.Start();
 }
开发者ID:8055aa,项目名称:iot-utilities,代码行数:7,代码来源:MainWindow.xaml.cs

示例6: StartTimer

 public void StartTimer()
 {
     System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();
     myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 100); // 100 Milliseconds
     myDispatcherTimer.Tick += new EventHandler(Each_Tick);
     myDispatcherTimer.Start();
 }
开发者ID:ReuleDK,项目名称:g-authenticator-wp7,代码行数:7,代码来源:MainPage.xaml.cs

示例7: MainWindow

        /*********************************************************************************************************
         * 
         * СТАНДАРТНЫЕ ОБРАБОТЧИКИ
         * 
         * *******************************************************************************************************/
        public MainWindow()
        {
            InitializeComponent();
            this.Title = SW_CAPTION;// + " " + System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();// +"  " + SW_VERSION;

            //!_windowsList.Add(Window.GetWindow(this));

            initDevice();
            initWindows();
            initControlValues();
            loadWindows();
            initModules();

            loadAppSettings();

            //LogsClass.Instance.Files[LogsClass.MainIdx].LogText = "Программа " + SW_VERSION + " загрузилась";
            
            dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
            dispatcherTimer.Tick += new EventHandler(timerWork);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 1);
            dispatcherTimer.Start();
            //
            EGSE.Device.Start();
            //
            //DataContext = this.test;
            hsiWin.DataContext = EGSE;
        }
开发者ID:QuadMan,项目名称:kia_xsan,代码行数:32,代码来源:DefaultMainWindow.cs

示例8: HandleLoaded

        private void HandleLoaded(object sender, RoutedEventArgs e)
        {
            if (bridge == null)
            {
                WPFSpinnakerConfiguration.Init();

                // Using log4net with Spinnaker is optional.
                log4net.Config.XmlConfigurator.Configure();
                SpinnakerLog4netAdapter.Init();

                bridge = SpinnakerConfiguration.CurrentConfig.CreateBrowserBridge(webBrowser);
                SplashViewModel splashViewModel = new SampleApplication.Core.SampleApplication().Init();
                bridge.ShowView("SplashView.html", splashViewModel);
                splashViewModel.PropertyChanged += (propSender,propChangeEvent) =>
                {
                    if (propChangeEvent.PropertyName == "CurrentPage")
                        bridge.ExecuteScriptFunction("setHeroBackground");
                };

                System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
                dispatcherTimer.Tick += new EventHandler((o, tickArgs) =>
                {
                    splashViewModel.RealtimeViewModel.HandleGUITimerTick();
                });
                dispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 50);
                dispatcherTimer.Start();
            }
        }
开发者ID:Gnomesoft,项目名称:spinnaker,代码行数:28,代码来源:MainWindow.xaml.cs

示例9: KeepScreenAlive

 public void KeepScreenAlive()
 {
     System.Windows.Threading.DispatcherTimer timer = new System.Windows.Threading.DispatcherTimer();
     timer.Tick += timer_Tick;
     timer.Interval = TimeSpan.FromSeconds(60);
     timer.Start();
 }
开发者ID:tobyqin,项目名称:KeepScreenAlive,代码行数:7,代码来源:MouseJiggleApproach.cs

示例10: StartTimer

 private void StartTimer(object sender, System.Windows.RoutedEventArgs e)
 {
     System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();
     myDispatcherTimer.Interval = new TimeSpan(0, 0, 1);
     myDispatcherTimer.Tick += new EventHandler(Each_Tick);
     myDispatcherTimer.Start();
 }
开发者ID:lengocluyen,项目名称:pescode,代码行数:7,代码来源:AnalogClock.xaml.cs

示例11: startTimer

 private void startTimer()
 {
     System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
     dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
     dispatcherTimer.Interval = new TimeSpan(0, 0, 3);
     dispatcherTimer.Start();
 }
开发者ID:ApexGIS,项目名称:developer-support,代码行数:7,代码来源:MainWindow.xaml.cs

示例12: calibrateButton_Click

        //private void rightOverLeft_Checked(object sender, RoutedEventArgs e)
        //{
        //    colorWindow.changeHandOrientation(0);
        //}

        //private void leftOverRight_Checked(object sender, RoutedEventArgs e)
        //{
        //    colorWindow.changeHandOrientation(1);
        //}


        private void calibrateButton_Click(object sender, RoutedEventArgs e)
        {
                myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();
                myDispatcherTimer.Interval = new TimeSpan(0, 0, 1); // 1 second
                myDispatcherTimer.Tick += new EventHandler(Each_Tick);
                myDispatcherTimer.Start();
        }
开发者ID:mikey555,项目名称:MIT-P--Kinect-,代码行数:18,代码来源:Window1.xaml.cs

示例13: Button_Click

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();
            ofd.AddExtension = true;
            ofd.DefaultExt = "*.*";
            ofd.Filter = "Media Files (*.*)|*.*";
            ofd.ShowDialog();

            try
            {
                mediaElement.Source = new Uri(ofd.FileName);
                textBlock.Text = mediaElement.Volume.ToString();
                mediaElement.Pause();
            }

            catch
            {
                new NullReferenceException("Error");
            }

            System.Windows.Threading.DispatcherTimer dispatchTimer = new System.Windows.Threading.DispatcherTimer();
            dispatchTimer.Tick += new EventHandler(timer_Tick);
            dispatchTimer.Interval = new TimeSpan(0, 0, 1);
            dispatchTimer.Start();
        }
开发者ID:NicoBarbaros,项目名称:Viviplayer,代码行数:25,代码来源:MainWindow.xaml.cs

示例14: MainViewModel

        public MainViewModel()
        {
            this.agencies = new ObservableCollection<Agency>();
            this.routes = new ObservableCollection<Route>();
            this.stops = new ObservableCollection<Stop>();
            this.selectedRoutesNames = new ObservableCollection<string>();
            this.currVehicles = new ObservableCollection<Vehicle>();

            this.routeCache = new Dictionary<long, Route>();
            this.stopCache = new Dictionary<long, Stop>();
            this.arrivalCache = new Dictionary<long, Dictionary<long, ArrivalInfo>>();
            this.segmentCache = new Dictionary<long,string>();

            this.selectedRoutes = new List<long>();
            this.selectedAgencies = new List<long>();

            this.restoredAgencies = new List<long>();
            this.restoredRoutes = new List<long>();

            dt = new System.Windows.Threading.DispatcherTimer();
            dt.Interval = new TimeSpan(0, 0, 0, 5);
            dt.Tick += new EventHandler(dt_Tick);
            dt.Start();

            dataHandler = new TranslocDataHandler();
        }
开发者ID:vineetk32,项目名称:Translocator2,代码行数:26,代码来源:MainViewModel.cs

示例15: Accelerometro

        public Accelerometro()
        {
            InitializeComponent();

            accelerometer = new Accelerometer();
            accelerometer.TimeBetweenUpdates = TimeSpan.FromMilliseconds(100);
            accelerometer.Start();

            myFile = IsolatedStorageFile.GetUserStoreForApplication();

            if (!myFile.FileExists("Impo.txt"))
            {
                IsolatedStorageFileStream dataFile = myFile.CreateFile("Impo.txt");
                dataFile.Close();
            }

            Wb = new WebBrowser();
            Connesso = false;
            Carica();

            System.Windows.Threading.DispatcherTimer dt = new System.Windows.Threading.DispatcherTimer();
            dt.Interval = new TimeSpan(0, 0, 0, 0, 250); // 500 Milliseconds
            dt.Tick += new EventHandler(dt_Tick);
            dt.Start();
        }
开发者ID:AndreaBruno,项目名称:Macchinino,代码行数:25,代码来源:Accelerometro.xaml.cs


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