Beispiel #1
0
        public ReplayForm(string fileName)
        {
            InitializeComponent();
            textFile = fileName;
            //XYGraphButton.Visible = false;
            if (File.Exists(Login.fileName + textFile + "Log" + ".txt"))
            {
                string line;
                int    i = 0;
                using (StreamReader sr = File.OpenText(Login.fileName + textFile + "Log" + ".txt"))
                {
                    while ((line = sr.ReadLine()) != null)
                    {
                        inputLine[i] = line;
                        i++;
                    }
                }
                label1.Text = inputLine[0];
                label2.Text = inputLine[1];
                label3.Text = inputLine[2];
                label4.Text = inputLine[3];
                label5.Text = inputLine[4];
                label6.Text = inputLine[5];
                label7.Text = inputLine[6];
            }
            else
            {
                MessageBox.Show("Sorry,no data was found.");
                button1.Visible          = false;
                shootPointButton.Visible = false;
                XYGraphButton.Visible    = false;
            }
            TargetBox targetBox = new TargetBox();

            height           = this.Height;
            width            = this.Width;
            this.WindowState = FormWindowState.Maximized;
            calculateInfo();
        }
Beispiel #2
0
 public GraphForm(TargetBox t)
 {
     InitializeComponent();
     tb = t;
     this.StartPosition = FormStartPosition.CenterScreen;
 }