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(); }
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); } }
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(); }