예제 #1
0
        private void рапортПоКоманде2ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            SecondRaport raport = new SecondRaport();

            raport.Show();
            Hide();
        }
예제 #2
0
        private void Open_Click(object sender, EventArgs e)
        {
            OpenFileDialog openFileDialog = new OpenFileDialog
            {
                Filter = "text files (*.txt)|*.txt"
            };

            if (openFileDialog.ShowDialog() == DialogResult.OK)
            {
                string   fileName = openFileDialog.FileName;
                string[] textFile = File.ReadAllText(fileName).Split('&');
                if (textFile[0] == "firstcommand")
                {
                    SympleRaport raport = new SympleRaport();
                    raport.Initiate(textFile);
                    raport.Show();
                    Hide();
                }
                else if (textFile[0] == "secondcommand")
                {
                    SecondRaport raport = new SecondRaport();
                    raport.Initiate(textFile);
                    raport.Show();
                    Hide();
                }
            }
        }