Inheritance: System.Windows.Forms.Form
Example #1
0
 /// <summary>
 /// Gets the current version of the extension and displays a window with this information and a changelog.
 /// </summary>
 /// <returns>
 /// The current version.
 /// </returns>
 public static Primitive Version()
 {
     string info = "This version is " + Assembly.GetExecutingAssembly().GetName().Version.ToString() + "\r\n";
     try
     {
         WebRequest webRequest = WebRequest.Create(Utilities.URL + "/LitDev-version.html");
         WebResponse webResponse = webRequest.GetResponse();
         StreamReader streamReader = new StreamReader(webResponse.GetResponseStream());
         info += "The current version is " + streamReader.ReadLine();
     }
     catch (Exception ex)
     {
         Utilities.OnError(Utilities.GetCurrentMethod(), ex);
     }
     FormAbout aboutBox = new FormAbout();
     aboutBox.ProductVersionLabel = info;
     aboutBox.TopMost = true;
     aboutBox.ShowDialog(Utilities.ForegroundHandle());
     return Assembly.GetExecutingAssembly().GetName().Version.ToString();
 }