コード例 #1
0
ファイル: NewJob.cs プロジェクト: rnieva/ControlWork
 private MainPlace newMainWindow = new MainPlace(); //for a assignment
 public NewJob(MainPlace mainWindow)
 {
     Database.SetInitializer <DemoContext>(new CreateDatabaseIfNotExists <DemoContext>());
     InitializeComponent();
     typeWork.SelectedIndex             = 0;
     comboBoxHourStart.SelectedIndex    = 9;
     comboBoxMinuteStart.SelectedIndex  = 0;
     comboBoxHourFinish.SelectedIndex   = 10;
     comboBoxMinuteFinish.SelectedIndex = 0;
     newMainWindow = mainWindow;  //assignment from mainWindow
 }
コード例 #2
0
ファイル: EditItem.cs プロジェクト: rnieva/ControlWork
 private MainPlace newMainPlace = new MainPlace();                            //for a assignment
 public EditItem(String strSelect, int nFileEdit, int nColum, MainPlace form) //can be different name
 {
     InitializeComponent();
     if ((strSelect == "False") || (strSelect == "True"))
     {
         paidCheckBox.Show();
         paidCheckBox.Checked = Boolean.Parse(strSelect);
         textBox1Edit.Hide();
         flagCheckBox = true;
     }
     textBox1Edit.Text = strSelect; //field for edit from Form2
     newMainPlace      = form;      //assignment from mainplace origianal to new mainplace
     nFileEdit2        = nFileEdit; //to know later the ID number
     nColum2           = nColum;    //to know later the field to edit
 }