예제 #1
0
 private void btnEdit_Click(object sender, EventArgs e)
 {
     logOptChosen = (Logger)cmbLog.SelectedItem;
     
     if (logOption == null || logOption.IsDisposed)
     {
         logOption = new EditLogForm(log, logOptChosen, this);
     }
     logOption.Show();
 }
예제 #2
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            logOptChosen = (Logger)cmbLog.SelectedItem;

            if (logOption == null || logOption.IsDisposed)
            {
                logOption = new EditLogForm(log, logOptChosen, this);
            }
            logOption.Show();
        }
예제 #3
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {
            string newLogName = "Log " + (cmbLog.Items.Count);

            if (!cmbLog.Items.Contains(newLogName))
            {
                // Helps in repopulating of combobox.
                BindingManagerBase bmOrders = this.BindingContext[log.getLogList()];
                bmOrders.SuspendBinding();

                log.AddNewLogger(newLogName);

                bmOrders.ResumeBinding();
            }
            else
            {
                MessageBox.Show("?");
                return;
            }

            cmbLog.SelectedItem = log.FindLogger(newLogName);
            logOptChosen        = (Logger)cmbLog.SelectedItem;

            if (logOption == null || logOption.IsDisposed)
            {
                logOption = new EditLogForm(log, logOptChosen, this);
            }
            logOption.Show();

            /*
             * if (addOption == null || addOption.IsDisposed)
             * {
             *  addOption = new AddLogForm(this, log);
             * }
             * addOption.Show();
             * */
        }
예제 #4
0
        private void btnAddNew_Click(object sender, EventArgs e)
        {

            string newLogName = "Log " + (cmbLog.Items.Count);

            if (!cmbLog.Items.Contains(newLogName))
            {
                // Helps in repopulating of combobox.
                BindingManagerBase bmOrders = this.BindingContext[log.getLogList()];
                bmOrders.SuspendBinding();

                log.AddNewLogger(newLogName);

                bmOrders.ResumeBinding();
            }
            else
            {
                MessageBox.Show("?");
                return;
            }

            cmbLog.SelectedItem = log.FindLogger(newLogName);
            logOptChosen = (Logger)cmbLog.SelectedItem;

            if (logOption == null || logOption.IsDisposed)
            {
                logOption = new EditLogForm(log, logOptChosen, this);
            }
            logOption.Show();

            /*
            if (addOption == null || addOption.IsDisposed)
            {
                addOption = new AddLogForm(this, log);
            }
            addOption.Show();
             * */
        }