private void StopMacroRecording_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { this.ParentWindow.mCommonHandler.StopMacroRecording(); this.mBlinkRecordingIconTimer.Stop(); this.mRecordingImage.ImageName = "recording_macro_title_bar"; ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "macro_record_stop", (string)null, RecordingTypes.SingleRecording.ToString(), (string)null, (string)null, (string)null, "Android"); }
private void Client_OnConnectionEstablished(object sender, ConnectionEstablishedMessage args) { Logger.Info("Discord connection Established"); this.mIsDiscordConnected = true; this.AssignTabChangeEventOnOpenedTabs(); ClientStats.SendMiscellaneousStatsAsync("DiscordConnected", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, RegistryManager.Instance.RegisteredEmail, Oem.Instance.OEM, (string)null, (string)null, (string)null, (string)null, "Android"); }
internal void Close() { try { this.Dispatcher.Invoke((Delegate)(() => { this.DisposeBrowser(); this.ParentWindow.mTopBar.mAppTabButtons.mLastPackageForQuitPopupDisplayed = ""; this.Visibility = Visibility.Hidden; ClientStats.SendMiscellaneousStatsAsync("quitpopupclosed", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, this.QuitPopupUrl, this.PackageName, (string)null, (string)null, (string)null, (string)null, "Android"); this.ParentWindow.HideDimOverlay(); if (string.IsNullOrEmpty(this.PackageName)) { this.ParentWindow.ForceCloseWindow(false); } else { this.ParentWindow.mTopBar.mAppTabButtons.CloseTab(this.PackageName, true, false, false, false, ""); } })); } catch (Exception ex) { Logger.Error("Exception when trying to close quit popup. " + ex.ToString()); } }
private static void SendStatsOfDeviceProfileChangeAsync( string successString, JObject newDeviceProfile, JObject oldDeviceProfile) { ClientStats.SendMiscellaneousStatsAsync("DeviceProfileChangeStats", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, successString, JsonConvert.SerializeObject((object)newDeviceProfile), JsonConvert.SerializeObject((object)oldDeviceProfile), RegistryManager.Instance.Version, "DeviceProfileSetting", (string)null, "Android"); }
private void ScriptSettingsImg_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { this.mMacroRecorderWindow.mOverlayGrid.Visibility = Visibility.Visible; MacroRecording macroRecording = MacroGraph.Instance.Vertices.Cast <MacroRecording>().Where <MacroRecording>((Func <MacroRecording, bool>)(macro => macro.Equals(this.mRecording))).FirstOrDefault <MacroRecording>(); MacroRecording mRecording = this.mRecording; if ((mRecording != null ? (mRecording.RecordingType == RecordingTypes.MultiRecording ? 1 : 0) : 0) != 0) { ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "merge_macro_edit", (string)null, (string)null, (string)null, (string)null, (string)null, "Android"); if (this.mMacroRecorderWindow.mMergeMacroWindow == null) { MacroRecorderWindow macroRecorderWindow = this.mMacroRecorderWindow; MergeMacroWindow mergeMacroWindow = new MergeMacroWindow(this.mMacroRecorderWindow, this.ParentWindow); mergeMacroWindow.Owner = (Window)this.ParentWindow; macroRecorderWindow.mMergeMacroWindow = mergeMacroWindow; } this.mMacroRecorderWindow.mMergeMacroWindow.Init(macroRecording, this); this.mMacroRecorderWindow.mMergeMacroWindow.Show(); } else { ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "macro_window_settings", (string)null, this.mRecording.RecordingType.ToString(), (string)null, (string)null, (string)null, "Android"); if (this.mMacroSettingsWindow == null || this.mMacroSettingsWindow.IsClosed) { this.mMacroSettingsWindow = new MacroSettingsWindow(this.ParentWindow, macroRecording, this.mMacroRecorderWindow); } this.mMacroSettingsWindow.ShowDialog(); } }
private void PlayScriptImg_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (!this.ParentWindow.mIsMacroPlaying) { if (MacroGraph.CheckIfDependentMacrosAreAvailable(this.mRecording)) { this.ToggleScriptPlayPauseUi(true); this.ParentWindow.mCommonHandler.PlayMacroScript(this.mRecording); ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "macro_play", "macro_popup", this.mRecording.RecordingType.ToString(), string.IsNullOrEmpty(this.mRecording.MacroId) ? "local" : "community", (string)null, (string)null, "Android"); this.ParentWindow.mCommonHandler.HideMacroRecorderWindow(); } else { CustomMessageWindow customMessageWindow = new CustomMessageWindow(); customMessageWindow.Owner = (Window)this.mMacroRecorderWindow; BlueStacksUIBinding.Bind(customMessageWindow.BodyTextBlock, "STRING_ERROR_IN_MERGE_MACRO", ""); customMessageWindow.AddButton(ButtonColors.Blue, "STRING_OK", (EventHandler)((o, evt) => {}), (string)null, false, (object)null, true); customMessageWindow.ShowDialog(); } } else { this.ParentWindow.mCommonHandler.AddToastPopup((Window)this.mMacroRecorderWindow, LocaleStrings.GetLocalizedString("STRING_STOP_THE_SCRIPT", ""), 4.0, true); } }
internal void InstallApk(string apkPath, bool addToChooseApkList = false) { Logger.Info("Console: Installing apk: {0}", (object)apkPath); string package = string.Empty; string appName = string.Empty; if (string.Equals(Path.GetExtension(apkPath), ".xapk", StringComparison.InvariantCultureIgnoreCase)) { JToken infoFromXapk = Utils.ExtractInfoFromXapk(apkPath); if (infoFromXapk != null) { package = infoFromXapk.GetValue("package_name"); appName = infoFromXapk.GetValue("name"); Logger.Debug("Package name from manifest.json.." + package); } } else { AppInfoExtractor apkInfo = AppInfoExtractor.GetApkInfo(apkPath); package = apkInfo.PackageName; appName = apkInfo.AppName; } ClientStats.SendMiscellaneousStatsAsync("open_apk", RegistryManager.Instance.UserGuid, "import_apk", package, RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); if (addToChooseApkList) { DownloadInstallApk.sApkInstalledFromChooser.Add(package); } if (!string.IsNullOrEmpty(package)) { this.ParentWindow.Dispatcher.Invoke((Delegate)(() => this.ParentWindow.mWelcomeTab.mHomeAppManager.AddAppIcon(package, appName, string.Empty, this))); } this.InstallApk(package, apkPath, false, false, ""); }
private void Client_OnConnectionFailed(object sender, ConnectionFailedMessage args) { Logger.Info("Discord connection failed. ErrorCode: {0}", (object)args.Type); this.mIsDiscordConnected = false; this.Dispose(); ClientStats.SendMiscellaneousStatsAsync("DiscordNotConnected", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, RegistryManager.Instance.RegisteredEmail, Oem.Instance.OEM, (string)null, (string)null, (string)null, (string)null, "Android"); }
private void UnifyButton_Click(object sender, RoutedEventArgs e1) { if (this.mOriginalMacroRecording == null) { this.mOriginalMacroRecording = new MacroRecording(); } this.mOriginalMacroRecording.CopyFrom(this.MergedMacroRecording); CustomMessageWindow customMessageWindow = new CustomMessageWindow(); customMessageWindow.TitleTextBlock.Text = string.Format((IFormatProvider)CultureInfo.InvariantCulture, LocaleStrings.GetLocalizedString("STRING_UNIFY_0", ""), (object)this.mOriginalMacroRecording.Name); BlueStacksUIBinding.Bind(customMessageWindow.BodyTextBlock, "STRING_UNIFIYING_LOSE_CONFIGURE", ""); bool closeWindow = false; customMessageWindow.AddButton(ButtonColors.Blue, string.Format((IFormatProvider)CultureInfo.InvariantCulture, LocaleStrings.GetLocalizedString("STRING_CONTINUE", ""), (object)"").Trim(), (EventHandler)((o, evt) => { ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "merge_unify", (string)null, (string)null, (string)null, (string)null, (string)null, "Android"); this.mMacroRecorderWindow.FlattenRecording(this.mOriginalMacroRecording, false); CommonHandlers.SaveMacroJson(this.mOriginalMacroRecording, this.mOriginalMacroRecording.Name + ".json"); CommonHandlers.RefreshAllMacroRecorderWindow(); closeWindow = true; }), (string)null, false, (object)null, true); customMessageWindow.AddButton(ButtonColors.White, "STRING_CANCEL", (EventHandler)((o, evt) => ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "merge_unify_cancel", (string)null, (string)null, (string)null, (string)null, (string)null, "Android")), (string)null, false, (object)null, true); customMessageWindow.CloseButtonHandle((EventHandler)((o, e2) => ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "merge_unify_cancel", (string)null, (string)null, (string)null, (string)null, (string)null, "Android")), (object)null); customMessageWindow.Owner = (Window)this; customMessageWindow.ShowDialog(); if (!closeWindow) { return; } this.CloseWindow(); }
private void GameGuide_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { if (!this.ParentWindow.mCommonHandler.ToggleGamepadAndKeyboardGuidance("gamepad", false)) { KMManager.HandleInputMapperWindow(this.ParentWindow, "gamepad"); } ClientStats.SendMiscellaneousStatsAsync("topbar", RegistryManager.Instance.UserGuid, "gameGuide", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, this.ParentWindow.mTopBar.mAppTabButtons.SelectedTab?.PackageName, (string)null, "Android"); }
private void PreferenceDropDownControl_RestoreDefaultConfirmationClicked( object sender, EventArgs e) { ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "RestoreDefaultWallpaper", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, "Premium", (string)null, "Android"); this.mChooseWallpaperPopup.IsOpen = false; this.ParentWindow.Utils.RestoreWallpaperImageForAllVms(); }
private void PauseMacroRecording_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { this.ParentWindow.mFrontendHandler.SendFrontendRequestAsync("pauseRecordingCombo", (Dictionary <string, string>)null); this.PauseTimer(); this.mPauseMacroImg.Visibility = Visibility.Collapsed; this.mPlayMacroImg.Visibility = Visibility.Visible; ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "macro_record_pause", (string)null, RecordingTypes.SingleRecording.ToString(), (string)null, (string)null, (string)null, "Android"); }
private void OpenGameGuide() { BlueStacksUIUtils.CloseContainerWindow((FrameworkElement)MainWindow.SettingsWindow); if (!this.mParentWindow.mCommonHandler.ToggleGamepadAndKeyboardGuidance("gamepad", false)) { KMManager.HandleInputMapperWindow(this.mParentWindow, "gamepad"); } ClientStats.SendMiscellaneousStatsAsync("game_setting", RegistryManager.Instance.UserGuid, "gameGuide", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, this.PackageName, (string)null, "Android"); }
internal static void SendLocalQuitPopupStatsAsync(string tag, string eventType) { Logger.Debug("Sending LocalQuitPopupStats for {0}", (object)eventType); string userGuid = RegistryManager.Instance.UserGuid; string clientVersion = RegistryManager.Instance.ClientVersion; string campaignMd5 = RegistryManager.Instance.CampaignMD5; ClientStats.SendMiscellaneousStatsAsync(tag, eventType, userGuid, clientVersion, campaignMd5, "", (string)null, (string)null, (string)null, "Android"); }
private void mChangeSkinGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { ChangeThemeWindow changeThemeWindow = new ChangeThemeWindow(this.ParentWindow); int num1 = 504; int num2 = 652; ContainerWindow containerWindow = new ContainerWindow(this.ParentWindow, (UserControl)changeThemeWindow, (double)num2, (double)num1, false, true, false, -1.0, (Brush)null); ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "ChangeSkin", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); }
private void MacroSettings_Click(object sender, RoutedEventArgs e1) { ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "merge_macro_settings", (string)null, (string)null, (string)null, (string)null, (string)null, "Android"); if (this.mMacroSettingsWindow == null || this.mMacroSettingsWindow.IsClosed) { this.mMacroSettingsWindow = new MacroSettingsWindow(this.ParentWindow, this.MergedMacroRecording, this.mMacroRecorderWindow); this.mMacroSettingsWindow.Closed += (EventHandler)((o, e2) => this.CheckIfCanSave()); } this.mMacroSettingsWindow.ShowDialog(); }
private void ReportProblemGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Logger.Info("Clicked report problem button"); using (Process process = new Process()) { process.StartInfo.Arguments = "-vmname:" + this.ParentWindow.mVmName; process.StartInfo.FileName = System.IO.Path.Combine(RegistryStrings.InstallDir, "HD-LogCollector.exe"); process.Start(); } ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "ReportProblem", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); }
private void Group_PreviewMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { if (!(sender is CustomPictureBox customPictureBox)) { return; } ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "merge_group", (string)null, (string)null, (string)null, (string)null, (string)null, "Android"); int sourceIndex = this.mListBox.Items.IndexOf((object)(customPictureBox.DataContext as MergedMacroConfiguration)); this.Merge(sourceIndex, sourceIndex - 1); }
private void Setting_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { string tabName = string.Empty; if (this.ParentWindow.StaticComponents.mSelectedTabButton.mTabType == TabType.AppTab && !PackageActivityNames.SystemApps.Contains(this.ParentWindow.StaticComponents.mSelectedTabButton.PackageName)) { tabName = "STRING_GAME_SETTINGS"; } ClientStats.SendMiscellaneousStatsAsync("topbar", RegistryManager.Instance.UserGuid, "Settings", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); this.ParentWindow.mCommonHandler.LaunchSettingsWindow(tabName); }
private void MergeButton_Click(object sender, RoutedEventArgs e) { if (this.mOriginalMacroRecording == null) { this.mOriginalMacroRecording = new MacroRecording(); } this.mOriginalMacroRecording.CopyFrom(this.MergedMacroRecording); this.mMacroRecorderWindow.SaveMacroRecord(this.mOriginalMacroRecording); ClientStats.SendMiscellaneousStatsAsync("MacroOperations", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "merge_macro_success", (string)null, (string)null, (string)null, (string)null, (string)null, "Android"); this.CloseWindow(); }
private void SigninLaterBtn_Click(object sender, RoutedEventArgs e) { try { ClientStats.SendMiscellaneousStatsAsync("GoogleSigninLater", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, (string)null, (string)null, RegistryManager.Instance.InstallID, (string)null, (string)null, (string)null, "Android"); BlueStacksUIUtils.CloseContainerWindow((FrameworkElement)this); } catch (Exception ex) { Logger.Error("Exception in SigninLaterBtn_Click. Exception: " + ex?.ToString()); } }
internal void ToggleTopbarVisibilityInFullscreen(bool isVisible) { if (isVisible) { this.ParentWindow.mFullscreenTopbarPopup.Width = this.ParentWindow.MainGrid.ActualWidth; this.ParentWindow.mFullscreenTopbarPopup.VerticalOffset = -(this.ParentWindow.MainGrid.ActualHeight / 2.0); this.ParentWindow.mFullscreenTopbarPopupInnerGrid.Width = this.ParentWindow.MainGrid.ActualWidth; ClientStats.SendMiscellaneousStatsAsync("fullscreen", RegistryManager.Instance.UserGuid, "topBarButton", "MouseClick", RegistryManager.Instance.ClientVersion, Oem.Instance.OEM, (string)null, (string)null, (string)null, "Android"); } this.ParentWindow.mFullscreenTopbarPopup.IsOpen = isVisible; this.ParentWindow.mFullscreenTopbarPopupButton.IsOpen = false; }
private void SaveGameSettings(object obj) { bool restartReq = false; bool flag = false; switch (this.CurrentGame) { case CurrentGame.PubG: restartReq = this.PubgGameSettingViewModel.Save(restartReq); this.PubgGameSettingViewModel.LockOriginal(); flag = true; break; case CurrentGame.CallOfDuty: restartReq = this.CallOfDutyGameSettingViewModel.Save(restartReq); this.CallOfDutyGameSettingViewModel.LockOriginal(); flag = true; break; case CurrentGame.FreeFire: restartReq = this.FreeFireGameSettingViewModel.Save(restartReq); this.FreeFireGameSettingViewModel.LockOriginal(); flag = true; break; case CurrentGame.OtherApp: restartReq = this.OtherAppGameSetting.Save(restartReq); this.OtherAppGameSetting.LockOriginal(); flag = true; break; } if (flag) { ClientStats.SendMiscellaneousStatsAsync("game_setting", RegistryManager.Instance.UserGuid, this.AppName, "Save", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); } if (this.mPreviousCursorMode != this.CursorMode) { RegistryManager.Instance.CustomCursorEnabled = this.CursorMode == CursorMode.Custom; foreach (MainWindow mainWindow in BlueStacksUIUtils.DictWindows.Values) { mainWindow.mCommonHandler.SetCustomCursorForApp(this.PackageName); } this.mPreviousCursorMode = this.CursorMode; ClientStats.SendMiscellaneousStatsAsync("game_setting", RegistryManager.Instance.UserGuid, "Is Custom Cursor", (this.CursorMode == CursorMode.Custom).ToString((IFormatProvider)CultureInfo.InvariantCulture), RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); } this.AddToastPopup(LocaleStrings.GetLocalizedString("STRING_CHANGES_SAVED", "")); if (!restartReq) { return; } GameSettingViewModel.RestartApp(this.mParentWindow, this.AppName); }
private void EngineSettingGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Logger.Info("Clicked settings button"); this.ParentWindow.mTopBar.mSettingsMenuPopup.IsOpen = false; string tabName = string.Empty; if (this.ParentWindow.StaticComponents.mSelectedTabButton.mTabType == TabType.AppTab && !PackageActivityNames.SystemApps.Contains(this.ParentWindow.StaticComponents.mSelectedTabButton.PackageName)) { tabName = "STRING_GAME_SETTINGS"; } ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "Settings", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); this.ParentWindow.mCommonHandler.LaunchSettingsWindow(tabName); }
private void ChooseNewGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { this.ParentWindow.mTopBar.mSettingsMenuPopup.IsOpen = false; if (RegistryManager.Instance.IsPremium) { ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "ChangeWallPaperButton", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, "Premium", (string)null, "Android"); this.ParentWindow.Utils.ChooseWallpaper(); } else { ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "ChangeWallPaperButton", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, "NonPremium", (string)null, "Android"); this.ParentWindow.mTopBar.mAppTabButtons.AddWebTab(WebHelper.GetUrlWithParams(WebHelper.GetServerHost() + "/bluestacks_account?extra=section:plans", (string)null, (string)null, (string)null) + "&email=" + RegistryManager.Instance.RegisteredEmail + "&token=" + RegistryManager.Instance.Token, "STRING_ACCOUNT", "account_tab", true, "account_tab", false); } }
private void SaveBtnClick(object sender, RoutedEventArgs e) { this.ParentWindow.mCommonHandler.SaveAndReloadShortcuts(); this.AddToastPopup(LocaleStrings.GetLocalizedString("STRING_CHANGES_SAVED", "")); this.ParentSettingsWindow.mIsShortcutEdited = false; this.mSaveBtn.IsEnabled = false; this.mRevertBtn.IsEnabled = true; if (this.ParentWindow.mCommonHandler.mShortcutsConfigInstance.Shortcut != null) { this.RefreshShortcutConfigForUI(); } this.ParentWindow.mTopbarOptions?.SetLabel(); ClientStats.SendMiscellaneousStatsAsync("Setting-save", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "Shortcut-Settings", "", (string)null, this.ParentWindow.mVmName, (string)null, (string)null, "Android"); }
private void mHelpCenterGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { string helpCenterUrl = BlueStacksUIUtils.GetHelpCenterUrl(); this.ParentWindow.mTopBar.mSettingsMenuPopup.IsOpen = false; ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "HelpCentre", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); if (RegistryManager.Instance.InstallationType == InstallationTypes.GamingEdition) { BlueStacksUIUtils.OpenUrl(helpCenterUrl); } else { this.ParentWindow.mTopBar.mAppTabButtons.AddWebTab(helpCenterUrl, "STRING_FEEDBACK", "help_center", true, "FEEDBACK_TEXT", false); } }
internal void Init(string appPackage) { this.Width = 740.0; this.Height = 490.0; this.PackageName = appPackage; ClientStats.SendMiscellaneousStatsAsync("quitpopupdisplayed", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, this.QuitPopupUrl, this.PackageName, (string)null, (string)null, (string)null, (string)null, "Android"); if (this.mBrowser == null) { this.LoadBrowser(); } this.ParentWindow.mQuitPopupBrowserLoadGrid.Children.Remove((UIElement)this.mBrowser); this.mBrowserGrid.Children.Add((UIElement)this.mBrowser); this.mBrowser.Visibility = Visibility.Visible; this.ParentWindow.ShowDimOverlay((IDimOverlayControl)this); }
private void SaveChangesBtn_Click(object sender, RoutedEventArgs e) { this.mSaveChangesBtn.IsEnabled = false; this.mIsProfileChanged = false; string jsonString; JObject deviceProfileObject = this.GetChangedDeviceProfileObject(out jsonString); this.SendDeviceProfileChangeToGuest(jsonString, deviceProfileObject); bool?isChecked = this.mEnableRootAccessCheckBox.IsChecked; bool rootAccessStatus = this.mCurrentRootAccessStatus; if (!(isChecked.GetValueOrDefault() == rootAccessStatus & isChecked.HasValue)) { string res = (string)null; new Thread((ThreadStart)(() => { try { res = this.mCurrentRootAccessStatus ? HTTPUtils.SendRequestToGuest("unbindmount", (Dictionary <string, string>)null, this.ParentWindow.mVmName, 0, (Dictionary <string, string>)null, false, 1, 0, "bgp") : HTTPUtils.SendRequestToGuest("bindmount", (Dictionary <string, string>)null, this.ParentWindow.mVmName, 0, (Dictionary <string, string>)null, false, 1, 0, "bgp"); if (string.Equals(JObject.Parse(res)["result"].ToString(), "ok", StringComparison.InvariantCulture)) { this.AddToastPopup(LocaleStrings.GetLocalizedString("STRING_CHANGES_SAVED", "")); this.mCurrentRootAccessStatus = !this.mCurrentRootAccessStatus; this.SendStatsOfRootAccessStatusAsync("success", this.mCurrentRootAccessStatus); if (!SecurityMetrics.SecurityMetricsInstanceList.ContainsKey(this.ParentWindow.mVmName) || !this.mCurrentRootAccessStatus) { return; } SecurityMetrics.SecurityMetricsInstanceList[this.ParentWindow.mVmName].AddSecurityBreach(SecurityBreach.DEVICE_ROOTED, string.Empty); } else { this.AddToastPopup(LocaleStrings.GetLocalizedString("STRING_ROOT_ACCESS_FAILURE", "")); this.Dispatcher.Invoke((Delegate)(() => this.mEnableRootAccessCheckBox.IsChecked = new bool?(this.mCurrentRootAccessStatus))); this.SendStatsOfRootAccessStatusAsync("failed", this.mCurrentRootAccessStatus); } } catch (Exception ex) { Logger.Error("Exception in sending mount unmount request to Android: " + ex.ToString()); } })) { IsBackground = true }.Start(); } ClientStats.SendMiscellaneousStatsAsync("Setting-save", RegistryManager.Instance.UserGuid, RegistryManager.Instance.ClientVersion, "Device-Settings", "", (string)null, this.ParentWindow.mVmName, (string)null, (string)null, "Android"); }
private void SpeedUpBstGrid_MouseLeftButtonUp(object sender, MouseButtonEventArgs e) { Logger.Info("Clicked SpeedUp BlueStacks button"); SpeedUpBlueStacks speedUpBlueStacks = new SpeedUpBlueStacks(); if (this.ParentWindow.mTopBar.mSnailMode == PerformanceState.VtxDisabled) { speedUpBlueStacks.mEnableVt.Visibility = Visibility.Visible; } speedUpBlueStacks.mUpgradeComputer.Visibility = Visibility.Visible; speedUpBlueStacks.mPowerPlan.Visibility = Visibility.Visible; speedUpBlueStacks.mConfigureAntivirus.Visibility = Visibility.Visible; ContainerWindow containerWindow = new ContainerWindow(this.ParentWindow, (UserControl)speedUpBlueStacks, 640.0, 440.0, false, true, false, -1.0, (Brush)null); ClientStats.SendMiscellaneousStatsAsync("hamburgerMenu", RegistryManager.Instance.UserGuid, "SpeedUpBlueStacks", "MouseClick", RegistryManager.Instance.ClientVersion, RegistryManager.Instance.Version, RegistryManager.Instance.Oem, (string)null, (string)null, "Android"); }