Пример #1
0
        public OfflineWorld(double size, ItemOptionsArco itemOptions)
        {
            const int INTERVAL = 50;

            this.Size = size;

            _thread = new TimerCreateThread <WorldVars>(Prep, Tick, TearDown,
                                                        itemOptions, size, INTERVAL);

            _thread.Interval = INTERVAL;

            _thread.Start();
        }
Пример #2
0
        private void btnTimerCreateThread_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                TimerCreateThread <World> timer = new TimerCreateThread <World>(Prep4, Tick4, Teardown4);
                _timers4.Add(timer);

                timer.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), this.Title, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        private void btnTimerCreateThread_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                TimerCreateThread<World> timer = new TimerCreateThread<World>(Prep4, Tick4, Teardown4);
                _timers4.Add(timer);

                timer.Start();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString(), this.Title, MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
Пример #4
0
        public OfflineWorld(double size, ItemOptionsArco itemOptions)
        {
            const int INTERVAL = 50;

            this.Size = size;

            _thread = new TimerCreateThread<WorldVars>(Prep, Tick, TearDown,
                itemOptions, size, INTERVAL);

            _thread.Interval = INTERVAL;

            _thread.Start();
        }