Exemple #1
0
 private void MainForm_FormClosing(object sender, FormClosingEventArgs e)
 {
     try
     {
         ServiceBusManager.Stop();
     }
     catch (Exception ex)
     {
         e.Cancel = true;
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Exemple #2
0
 private void StopServiceBus()
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         ServiceBusManager.Stop();
         stopImg.Visible     = true;
         startImg.Visible    = false;
         lblStatus.Text      = "Stoped";
         btnStop.Visible     = false;
         btnStart.Visible    = true;
         lblStatus.ForeColor = Color.Red;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }