예제 #1
0
파일: Program.cs 프로젝트: RodionD/restart
 static void Main()
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     if (ConnectionString != string.Empty)
     {
         using (worker cworker = new worker())
         {
             if (cworker.ID > 0)
             {
                 using (KursForm kf = new KursForm(cworker))
                 {
                     if (kf.ShowDialog() == DialogResult.OK)
                     {
                         using (MainForm mf = new MainForm(cworker))
                         {
                             mf.ShowDialog();
                         }
                     }
                 }
             }
             else
             {
                 MessageBox.Show("Неверно определен пользователь!", string.Empty, MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
         }
     }
 }
예제 #2
0
파일: MainForm.cs 프로젝트: RodionD/restart
 private void chngKursB_Click(object sender, EventArgs e)
 {
     using (KursForm kf = new KursForm(cworker))
     {
         kf.ShowDialog();
     }
 }