Exemplo n.º 1
0
        private void Button_ok_Click(object sender, RoutedEventArgs e)
        {
            Button button  = sender as Button;
            string content = button.Content as string;

            if (content == InstallWizardString.Button_Next)
            {
                FourthScreen_New.Visibility = Visibility.Visible;
                LaunchOrDownloadInstaller();

                Button_ok.Visibility = Visibility.Visible;
            }

            else if (content == InstallWizardString.Button_Agree)
            {
                ThirdScreen_New.Visibility = Visibility.Visible;
            }

            else if (content == InstallWizardString.Button_Install ||
                     content == InstallWizardString.Button_OK)
            {
                ToolsPathInfo.ToolsRootPath = info.Path;
                ToolsPathInfo.IsDirty       = true;
                OnToolsDirChanged?.Invoke(info.Path);
                this.DialogResult = true;
            }
        }
Exemplo n.º 2
0
        private void LaunchOrDownloadInstaller()
        {
            ToolsPathInfo.ToolsRootPath = info.Path;
            ToolsPathInfo.IsDirty       = true;
            OnToolsDirChanged?.Invoke(info.Path);
            installer = new SdkInstaller();

            if (installer.IsDownloadNeeded())
            {
                installer.StartDownload(OnUpdateDownloadProgress, OnDownloadComplete);
            }
            else
            {
                OnDownloadComplete(null, null);
            }
        }