private void MainForm_Load(object sender, EventArgs e)
        {
            tboxLocation.Text = "C:\\Users\\" + Environment.UserName + "\\Desktop\\GrainBound";

            WebRequest.DefaultWebProxy = null;
            webClient       = new WebClient();
            webClient.Proxy = null;
            webClient.DownloadFileCompleted   += new AsyncCompletedEventHandler(DownloadCompleted);
            webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(DownloadProgressChanged);

            string installLoc = GBRegistry.checkRegistryKey(GBRegistry.GRAINBOUND_INSTALL_KEY);

            if (installLoc != null)
            {
                if (Directory.Exists(installLoc))
                {
                    this.Hide();
                    (new UninstallForm()).ShowDialog();
                }
                else
                {
                    GBRegistry.removeRegistryKey();
                }
            }
        }
 private string getCurrentVersion()
 {
     return(GBRegistry.checkRegistryKey(GBRegistry.GRAINBOUND_VERSION_KEY));
 }
Esempio n. 3
0
 private void UninstallForm_Load(object sender, EventArgs e)
 {
     tboxLocation.Text = GBRegistry.checkRegistryKey(GBRegistry.GRAINBOUND_INSTALL_KEY);
 }