コード例 #1
0
ファイル: SkipperForm.cs プロジェクト: brookpatten/VisualSail
        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();
        }
コード例 #2
0
        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();
        }
コード例 #3
0
        private void NewPerso_Click(object sender, RoutedEventArgs e)
        {
            SelectRace screen = new SelectRace();

            this.Hide();
            screen.ShowDialog();
            this.Close();
        }