예제 #1
0
파일: Form1.cs 프로젝트: naithar/Gamma
 //инициализация формы
 public formMain()
 {
     InitializeComponent();
     HidePanels();
     patientsList = new Patients();
     patientsList.currentPatient = -1;
     patientsList.patients = new List<Patient>();
     //загрузка из файлов
     if (File.Exists(screenFile))
         screenData = ClassesLib.Screen.Read(screenFile);
     if (File.Exists(file))
     {
         patientsList = Patients.Read(file);
         if (File.Exists(resultsFile))
             ResultsToPatients();
     }
     //обновление модели данных
     if (patientsList.patients.Count != 0)
     {
         if (patientsList.currentPatient == -1 && patientsList.currentPatient > patientsList.patients.Count)
             patientsList.currentPatient = 0;
         panelMain.Visible = true;
         MainPanelShowInfo(patientsList.patients[patientsList.currentPatient]);
     }
     else
     {
         panelPacients.Visible = true;
         PatientShowInfo(patientsList);
         ShowButtons();
         buttonPacients.Visible = false;
         buttonStart.Visible = false;
         buttonSessions.Visible = false;
         buttonLevels.Visible = false;
         buttonResults.Visible = false;
         buttonPalitre.Visible = false;
         buttonMain.Visible = false;
         MessageBox.Show("Выберите пациента или создайте нового", "Внимание");
     }
 }
예제 #2
0
파일: Form1.cs 프로젝트: naithar/Gamma
 //сохранение
 private void buttonScreenSave_Click(object sender, EventArgs e)
 {
     PixelParams();
     screenData = bufferScreen;
     saved = true;
     ScreenActivateSaving(false);
     ClassesLib.Screen.Write(screenFile, screenData);
 }
예제 #3
0
파일: Form1.cs 프로젝트: naithar/Gamma
 //отмена
 private void buttonScreenCancel_Click(object sender, EventArgs e)
 {
     textBoxScreenHeight.Text = screenData.Height.ToString();
     textBoxScreenWidth.Text = screenData.Width.ToString();
     screenData = ClassesLib.Screen.Read(screenFile);
     ScreenShowInfo(screenData);
     saved = true;
     ScreenActivateSaving(false);
 }