forked from Pai-Mei/SatTracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fmMain.cs
90 lines (79 loc) · 1.9 KB
/
fmMain.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Zeptomoby.OrbitTools;
namespace SatTracker
{
public partial class fmMain : Form
{
public fmSatInfo Info;
public fmViewer Viewer;
public Settings Settings;
private SpaceTrack.SpaceTrack m_ST;
public List<Eci> SatPos = new List<Eci>();
public List<Satellite> Sats = new List<Satellite>();
public List<Satellite> SelectedSats = new List<Satellite>();
public SpaceTrack.SpaceTrack ST { get { return m_ST; } }
public fmMain()
{
InitializeComponent();
Info = new fmSatInfo();
Viewer = new fmViewer();
}
private void fmMain_Load(object sender, EventArgs e)
{
fmAuth auth = new fmAuth();
if (auth.ShowDialog() != System.Windows.Forms.DialogResult.OK)
{
this.Close();
return;
}
Settings = Settings.Load();
m_ST = auth.ST;
Sats = m_ST.AllSats;
auth.Dispose();
Viewer.MdiParent = this;
Viewer.Show();
Info.MdiParent = this;
Info.DesktopLocation = new Point(500, 1);
Info.Show();
}
private void выходToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Close();
}
internal void SetStatus(string p)
{
this.StatusText.Text = p;
}
private void fmMain_FormClosing(object sender, FormClosingEventArgs e)
{
foreach(var form in this.MdiChildren)
{
form.Dispose();
}
Application.Exit();
}
private void toolStripButton1_Click(object sender, EventArgs e)
{
Viewer.InitGL();
}
private void симуляцияToolStripMenuItem_Click(object sender, EventArgs e)
{
fmSim sim = new fmSim(Sats.ToList());
sim.MdiParent = this;
sim.Show();
}
private void настройкиToolStripMenuItem_Click(object sender, EventArgs e)
{
var sd = new fmSettings();
sd.MdiParent = this;
sd.Show();
}
}
}