Example #1
0
 /// <summary>
 /// Check for plugins, sniffer and main app updates
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void getUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (NetworkInterface.GetAllNetworkInterfaces().Any(x => x.OperationalStatus == OperationalStatus.Up))
     {
         Thread lUpdateAvailableThread = new Thread(delegate()
         {
             if (NetworkInterface.GetAllNetworkInterfaces().Any(x => x.OperationalStatus == OperationalStatus.Up))
             {
                 if (Updates.InfrastructureFacade.getInstance().IsUpdateAvailable())
                 {
                     Updates.FormNewVersion lNewVersion = new Updates.FormNewVersion();
                     lNewVersion.TopMost = true;
                     lNewVersion.ShowDialog();
                 }
                 else
                 {
                     LogConsole.Main.LogConsole.pushMsg("No new updates available.");
                     MessageBox.Show("No new updates available.", "Update information", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
             }
         });
         lUpdateAvailableThread.Start();
     }
     else
     {
         LogConsole.Main.LogConsole.pushMsg("Can't check for updates. Internet connection is down.");
         MessageBox.Show("Can't check for updates. Internet connection is down.", "Update information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
Example #2
0
 /// <summary>
 /// Check for plugins, sniffer and main app updates
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void getUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (NetworkInterface.GetAllNetworkInterfaces().Any(x => x.OperationalStatus == OperationalStatus.Up))
       {
     Thread lUpdateAvailableThread = new Thread(delegate()
     {
       if (NetworkInterface.GetAllNetworkInterfaces().Any(x => x.OperationalStatus == OperationalStatus.Up))
       {
     if (Updates.InfrastructureFacade.getInstance().IsUpdateAvailable())
     {
       Updates.FormNewVersion lNewVersion = new Updates.FormNewVersion();
       lNewVersion.TopMost = true;
       lNewVersion.ShowDialog();
     }
     else
     {
       LogConsole.Main.LogConsole.pushMsg("No new updates available.");
       MessageBox.Show("No new updates available.", "Update information", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
       }
     });
     lUpdateAvailableThread.Start();
       }
       else
       {
     LogConsole.Main.LogConsole.pushMsg("Can't check for updates. Internet connection is down.");
     MessageBox.Show("Can't check for updates. Internet connection is down.", "Update information", MessageBoxButtons.OK, MessageBoxIcon.Information);
       }
 }
Example #3
0
    /// <summary>
    /// Check for plugins, sniffer and main app updates
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    private void getUpdatesToolStripMenuItem_Click(object sender, EventArgs e)
    {
      if (NetworkInterface.GetAllNetworkInterfaces().Any(x => x.OperationalStatus == OperationalStatus.Up))
      {
        Thread lUpdateAvailableThread = new Thread(delegate()
        {
          if (NetworkInterface.GetAllNetworkInterfaces().Any(x => x.OperationalStatus == OperationalStatus.Up))
          {
            try
            {
              Simsang.Updates.Config.UpdateData lUpdateMetaData = Simsang.Common.Updates.FetchUpdateInformationFromServer();

              if (lUpdateMetaData.IsUpdateAvaliable == true)
              {
                Updates.FormNewVersion lNewVersion = new Updates.FormNewVersion();
                lNewVersion.TopMost = true;
                lNewVersion.ShowDialog();
              }
              else
              {
                LogConsole.Main.LogConsole.LogInstance.LogMessage("No new updates available.");
                MessageBox.Show("No new updates available.", "Update information", MessageBoxButtons.OK, MessageBoxIcon.Information);
              }
            }
            catch (Exception lEx)
            { 
            }
          }
        });
        lUpdateAvailableThread.Start();
      }
      else
      {
        LogConsole.Main.LogConsole.LogInstance.LogMessage("Can't check for updates. Internet connection is down.");
        MessageBox.Show("Can't check for updates. Internet connection is down.", "Update information", MessageBoxButtons.OK, MessageBoxIcon.Information);
      }
    }