Ejemplo n.º 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();
 }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
             * */
        }
Ejemplo n.º 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();
             * */
        }