예제 #1
0
 private void cmdOK_Click(object sender, EventArgs e)
 {
     try
     {
         if (SetEditingNotifierHost())
         {
             SelectedConfig = editingNotifierHost.ToXml();
             DialogResult   = System.Windows.Forms.DialogResult.OK;
             Close();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show("An error occured while saving the config!\r\n" + ex.Message, "Saving config", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
     }
 }
예제 #2
0
        //private bool loading = false;

        public DialogResult ShowDialog(NotifierHost nh, MonitorPack hostingMonitorPack = null)
        {
            if (nh != null)
            {
                SelectedConfig     = nh.ToXml();
                HostingMonitorPack = hostingMonitorPack;
                return(ShowDialog());
            }
            else
            {
                return(System.Windows.Forms.DialogResult.Cancel);
            }
        }