Ejemplo n.º 1
0
 private void buttonShowStudy_Click_1(object sender, RoutedEventArgs e)
 {
     if (isToCompare)
     {
         if (listOfStudy.SelectedIndex >= 0)
         {
             List <int> selectedStudiesId = new List <int>();
             foreach (Study tmp in selectedStudies)
             {
                 selectedStudiesId.Add(tmp.intId);
             }
             WindowCompare    view = new WindowCompare();
             PresenterCompare pr   = new PresenterCompare(view, selectedStudiesId);
             view.Owner = this;
             view.WindowStartupLocation = WindowStartupLocation.CenterOwner;
             view.Show();
         }
     }
     else
     {
         if (listOfStudy.SelectedIndex >= 0)
         {
             Study       tmp    = (Study)listOfStudy.SelectedValue;
             WindowStudy wstudy = new WindowStudy(selectedItemId, tmp.name, tmp.date);
             wstudy.Owner = this;
             wstudy.WindowStartupLocation = WindowStartupLocation.CenterOwner;
             wstudy.Show();
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("Оберіть дослідження для перегляду", "Помилка!", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
         }
     }
 }
Ejemplo n.º 2
0
 private void buttonShowStudy_Click_1(object sender, RoutedEventArgs e)
 {
     if (isToCompare)
     {
         if (listOfStudy.SelectedIndex >= 0)
         {
             List<int> selectedStudiesId = new List<int>();
             foreach (Study tmp in selectedStudies)
             {
                 selectedStudiesId.Add(tmp.intId);
             }
             WindowCompare view = new WindowCompare();
             PresenterCompare pr = new PresenterCompare(view, selectedStudiesId);
             view.Owner = this;
             view.WindowStartupLocation = WindowStartupLocation.CenterOwner;
             view.Show();
         }
     }
     else
     {
         if (listOfStudy.SelectedIndex >= 0)
         {
             Study tmp = (Study)listOfStudy.SelectedValue;
             WindowStudy wstudy = new WindowStudy(selectedItemId, tmp.name, tmp.date);
             wstudy.Owner = this;
             wstudy.WindowStartupLocation = WindowStartupLocation.CenterOwner;
             wstudy.Show();
         }
         else
         {
             System.Windows.Forms.MessageBox.Show("Оберіть дослідження для перегляду", "Помилка!", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
         }
     }
 }