Exemplo n.º 1
0
 private bool Open_EditDialog(ORGANIZER_ITEM item)
 {
     mdlg = new MakeEventDialog(item);
     if (mdlg.ShowDialog(this) == DialogResult.OK)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Exemplo n.º 2
0
 public MakeEventDialog(ORGANIZER_ITEM item)
 {
     InitializeComponent();
     isAcceptClose = false;
     dtPicker_EventStart.Format = DateTimePickerFormat.Custom;
     dtPicker_EventEnd.Format   = DateTimePickerFormat.Custom;
     string[] ob = Enum.GetValues(typeof(Signal)).Cast <Signal>().Select(v => v.ToString()).ToArray();
     comboBox_TypeSignal.Items.AddRange(ob);
     comboBox_TypeSignal.SelectedIndex = 0;
     if (item != null)
     {
         this.item = item;
     }
 }
Exemplo n.º 3
0
 private void MakeEventDialog_Load(object sender, EventArgs e)
 {
     try {
         if (item is null)
         {
             item = new ORGANIZER_ITEM();
         }
         else
         {
             textBox_Description.Text         = item.sDescription;
             dtPicker_EventStart.Value        = item.dtStartTime;
             dtPicker_EventEnd.Value          = item.dtEndTime;
             checkBox_EventEnable.Checked     = item.isActive;
             comboBox_TypeSignal.SelectedItem = Enum.GetName(typeof(Signal), item.eSignal);
         }
     } catch {
         MessageBox.Show("Entered data incorrect!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }