Ejemplo n.º 1
0
 private void mLaunchInstanceManagerBtn_Click(object sender, RoutedEventArgs e)
 {
     BlueStacksUIUtils.LaunchMultiInstanceManager();
     ClientStats.SendMiscellaneousStatsAsync("syncWindow", RegistryManager.Instance.UserGuid, "MultiInstance", "shortcut", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android");
 }
Ejemplo n.º 2
0
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     Logger.Info("Clicked app icon, package name {0}", (object)this.mAppIconModel.PackageName);
     if (this.mUnInstallTabButton.IsMouseOver)
     {
         this.UninstallButtonClicked();
     }
     else if (this.mErrorGrid.IsVisible)
     {
         this.mErrorGrid.Visibility = Visibility.Hidden;
         if (this.mAppIconModel.IsDownLoadingFailed)
         {
             this.mDownloader?.DownloadApk(this.mAppIconModel.ApkUrl, this.mAppIconModel.PackageName, false, false, "");
         }
         else
         {
             if (!this.mAppIconModel.IsInstallingFailed)
             {
                 return;
             }
             this.mDownloader?.InstallApk(this.mAppIconModel.PackageName, this.mAppIconModel.ApkFilePath, false, false, "");
         }
     }
     else
     {
         if (this.mAppIconModel.IsDownloading)
         {
             return;
         }
         if (this.mAppIconModel.IsInstalling)
         {
             if (this.mDownloader != null)
             {
                 return;
             }
             this.ParentWindow.mWelcomeTab.mFrontendPopupControl.Init(this.mAppIconModel.PackageName, this.mAppIconModel.AppName, PlayStoreAction.OpenApp, false);
         }
         else if (this.mAppIconModel.IsRerollIcon)
         {
             this.HandleRerollClick();
         }
         else if (this.mAppIconModel.IsAppSuggestionActive)
         {
             this.HandleAppSuggestionClick();
             if (!this.mAppIconModel.IsRedDotVisible)
             {
                 return;
             }
             this.mAppIconModel.IsRedDotVisible = false;
             HomeAppManager.AddPackageInRedDotShownRegistry(this.mAppIconModel.PackageName);
         }
         else
         {
             if (string.IsNullOrEmpty(this.mAppIconModel.PackageName))
             {
                 return;
             }
             if (string.Equals(this.mAppIconModel.PackageName, "help_center", StringComparison.InvariantCulture))
             {
                 this.ParentWindow.mTopBar.mAppTabButtons.AddWebTab(BlueStacksUIUtils.GetHelpCenterUrl(), "STRING_FEEDBACK", "help_center", true, "STRING_FEEDBACK", false);
             }
             else if (string.Equals(this.mAppIconModel.PackageName, "instance_manager", StringComparison.InvariantCulture))
             {
                 BlueStacksUIUtils.LaunchMultiInstanceManager();
             }
             else if (string.Equals(this.mAppIconModel.PackageName, "macro_recorder", StringComparison.InvariantCulture))
             {
                 this.ParentWindow.mCommonHandler.ShowMacroRecorderWindow();
             }
             else
             {
                 this.ParentWindow.mWelcomeTab.mHomeAppManager.OpenApp(this.mAppIconModel.PackageName, true);
             }
         }
     }
 }