public SkipperForm() { try { //throw new Exception("Don't load from the file during debugging"); Persistance.LoadFromFile(); } catch { Persistance.CreateNew(); } SelectRace sr = new SelectRace(); sr.ShowDialog(); Race r = sr.SelectedRace; EditRace er = new EditRace(r); er.ShowDialog(); //Persistance.SaveToFile(); InitializeComponent(); viewPanel.Initialize(r,new Notify(this.RequestStatisticsUpdate)); foreach (AmphibianSoftware.Skipper.Data.Boat b in r.Boats) { boatsLB.Items.Add(b); } boatsLB.SelectedIndex = 0; this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); _drawThread = new Thread(new ThreadStart(drawLoop)); _drawThread.Start(); }
public SkipperForm() { try { //throw new Exception("Don't load from the file during debugging"); Persistance.LoadFromFile(); } catch { Persistance.CreateNew(); } SelectRace sr = new SelectRace(); sr.ShowDialog(); Race r = sr.SelectedRace; EditRace er = new EditRace(r); er.ShowDialog(); //Persistance.SaveToFile(); InitializeComponent(); viewPanel.Initialize(r, new Notify(this.RequestStatisticsUpdate)); foreach (AmphibianSoftware.Skipper.Data.Boat b in r.Boats) { boatsLB.Items.Add(b); } boatsLB.SelectedIndex = 0; this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); _drawThread = new Thread(new ThreadStart(drawLoop)); _drawThread.Start(); }
private void NewPerso_Click(object sender, RoutedEventArgs e) { SelectRace screen = new SelectRace(); this.Hide(); screen.ShowDialog(); this.Close(); }