Exemplo n.º 1
0
        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();
                }
            }
        }
Exemplo n.º 2
0
 private string getCurrentVersion()
 {
     return(GBRegistry.checkRegistryKey(GBRegistry.GRAINBOUND_VERSION_KEY));
 }
Exemplo n.º 3
0
 private void UninstallForm_Load(object sender, EventArgs e)
 {
     tboxLocation.Text = GBRegistry.checkRegistryKey(GBRegistry.GRAINBOUND_INSTALL_KEY);
 }