private void OpenExec(object sender, ExecutedRoutedEventArgs e) { e.Handled = true; /* if ( mSelected.Any() ) { RaceThread.RaceInfo = mRace; ThreadStart threadDelegate = new ThreadStart(RaceThread.Run); Thread newThread = new Thread(threadDelegate); newThread.Start(); } */ Window W = new MainWindow(mRace); W.ShowDialog(); }
public MainWindow() { InitializeComponent(); cBox.Items.Add("1"); cBox.Items.Add("2"); cBox.Items.Add("3"); gameDelegate = Game; myDelegate = ChangeValueProgressBar; finishColorDelegate = FinishColor; moneyChangeDelegate = MoneyChange; label.Content = money.ToString(); mainWindow = this; brushes[0] = Brushes.Green; brushes[1] = Brushes.Yellow; brushes[2] = Brushes.Red; }
public static void Run() { MainWindow Window = new MainWindow(RaceInfo); Window.ShowDialog(); }