コード例 #1
0
 public void SetWorkForm(WorkForm w, WorkForm2 w2, WorkForm3 w3, WorkForm4 w4)
 {
     wkfrm  = w;
     wkfrm2 = w2;
     wkfrm3 = w3;
     wkfrm4 = w4;
 }
コード例 #2
0
        //To medical question report
        private void button5_Click(object sender, EventArgs e)
        {
            if (rlfrm != null)
            {
                rlfrm.Close();
            }

            SaveTextBoxes();
            WorkForm4 wkfrm4 = new WorkForm4(Settings.Default.msrIsNew);

            wkfrm4.Location = this.Location;

            wkfrm4.FormClosed += (s, args) => this.Close();
            wkfrm4.Show();

            this.Hide();
        }
コード例 #3
0
ファイル: Form3.cs プロジェクト: Trevh5/ReportGenerator
        private void button1_Click(object sender, EventArgs e)
        {
            if (listBox1.SelectedIndex != -1 || listBox2.SelectedIndex != -1)
            {
                Settings.Default["attorneyFirstName"]  = listBox1.SelectedItem.ToString().Split(' ')[0];
                Settings.Default["attorneyLastName"]   = listBox1.SelectedItem.ToString().Split(' ')[1];
                Settings.Default["clientFirstName"]    = textBox4.Text;
                Settings.Default["clientLastName"]     = textBox3.Text;
                Settings.Default["attorneyAddress"]    = File.ReadAllText(Settings.Default["programFilesDirectory"].ToString() + "\\attorney_data\\" + listBox1.SelectedItem.ToString() + ".txt");
                Settings.Default["physicianSignature"] = File.ReadAllText(Settings.Default["programFilesDirectory"].ToString() + "\\physician_data\\" + listBox2.SelectedItem.ToString() + ".txt");
                Settings.Default.Save();

                bool isNewDocument = true;

                Settings.Default["msrIsNew"]  = true;
                Settings.Default["imerIsNew"] = true;
                Settings.Default["socIsNew"]  = true;
                Settings.Default["rqrIsNew"]  = true;
                Settings.Default.Save();
                if (radioButton1.Checked)
                {
                    WorkForm wkfrm = new WorkForm(Settings.Default.msrIsNew);

                    wkfrm.Location = this.Location;

                    wkfrm.FormClosed += (s, args) => this.Close();
                    wkfrm.Show();

                    this.Hide();
                }
                else if (radioButton2.Checked)
                {
                    WorkForm2 wkfrm2 = new WorkForm2(Settings.Default.imerIsNew);

                    wkfrm2.Location = this.Location;

                    wkfrm2.FormClosed += (s, args) => this.Close();
                    wkfrm2.Show();

                    this.Hide();
                }
                else if (radioButton3.Checked)
                {
                    WorkForm3 wkfrm3 = new WorkForm3(Settings.Default.socIsNew);

                    wkfrm3.Location = this.Location;

                    wkfrm3.FormClosed += (s, args) => this.Close();
                    wkfrm3.Show();

                    this.Hide();
                }
                else if (radioButton4.Checked)
                {
                    WorkForm4 wkfrm4 = new WorkForm4(Settings.Default.rqrIsNew);

                    wkfrm4.Location = this.Location;

                    wkfrm4.FormClosed += (s, args) => this.Close();
                    wkfrm4.Show();

                    this.Hide();
                }
            }
            else
            {
                MessageBox.Show("Please SELECT an attorney and a Physician");
            }
        }