public MainForm()
		{
			if (Instance != null) {
				throw new Exception("mainform already exists");
			}

			Instance = this;
			InitializeComponent();

			new LoadingForm().ShowDialog();

			MapBox = new MapBox();
			MapBox.Show();

			MapBox.Dock = DockStyle.Fill;

			panel1.Controls.Add(MapBox);

			var timer = new Timer {Interval = Program.GalaxyRefreshSeconds*1000, AutoReset = true};
			timer.Elapsed += updateGalaxyTimer_Tick;
			timer.Start();
			base.Text = string.Format("{0} {1}", Application.ProductName, Application.ProductVersion);

			SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
		}
示例#2
0
        public MainForm()
        {
            if (Instance != null)
            {
                throw new Exception("mainform already exists");
            }

            Instance = this;
            InitializeComponent();

            new LoadingForm().ShowDialog();

            MapBox = new MapBox();
            MapBox.Show();

            MapBox.Dock = DockStyle.Fill;

            panel1.Controls.Add(MapBox);

            var timer = new Timer {
                Interval = Program.GalaxyRefreshSeconds * 1000, AutoReset = true
            };

            timer.Elapsed += updateGalaxyTimer_Tick;
            timer.Start();
            base.Text = string.Format("{0} {1}", Application.ProductName, Application.ProductVersion);

            SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer, true);
        }