Ejemplo n.º 1
0
 /// <summary>
 /// Handles the MouseClick event of the ni control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.Windows.Forms.MouseEventArgs"/> instance containing the event data.</param>
 void ni_MouseClick(object sender, MouseEventArgs e)
 {
     // Handle mouse button clicks.
     if (e.Button == MouseButtons.Left)
     {
         // Start Windows Explorer.
         //Process.Start("explorer", null);
         HelperContext _hlp = new HelperContext();
         try
         {
             //var jobPath = ConfigurationManager.AppSettings["BatchFile"];
             //Process.Start(jobPath, null);
             //_hlp.Logging("AutoCommittedSuccessfully", "Sync_Click");
             ni.MouseClick += new MouseEventHandler(ni_MouseClick);
             ni.Icon        = Resources.SyncTrayApp;
             ni.Text        = _hlp.SyncStatus();
             ni.Visible     = true;
         }
         catch (Exception ex)
         {
             _hlp.Logging(ex.Message, "Sync_Click");
         }
     }
 }