public void PlayRecord(SimpleLoLRecord slr) { if (!Dispatcher.CheckAccess()) { RecordDelegate prd = new RecordDelegate(PlayRecord); Dispatcher.Invoke(prd, slr); return; } Logger.Instance.WriteLog(String.Format("Play record: {0}", slr.FileName)); if (_launcher == null) { if (slr.RecoringRecorder != null) { StartLoLLauncher(new LoLLauncher(slr.RecoringRecorder)); } else { StartLoLLauncher(new LoLLauncher(slr)); } } else { PopupWindow.ShowMessage(this, Utilities.GetString("AlreadyPlaying") as string); } }
public void TryToPlayCommand(String command) { if (!Dispatcher.CheckAccess()) { TryToPlayCommandDelegate act = new TryToPlayCommandDelegate(TryToPlayCommand); Dispatcher.Invoke(act, command); return; } Logger.Instance.WriteLog(String.Format("Play command line: {0}", command)); LoLCommandAnalyzer lca = new LoLCommandAnalyzer(command); if (lca.IsSuccess) { Nullable <Boolean> result = YesNoPopupWindow.AskQuestion(this, Utilities.GetString("WatchNow") as string); if (result == true) { StartNewRecoding(lca.GetGameInfo(), true); } else if (result == false) { StartNewRecoding(lca.GetGameInfo(), false); } } else { PopupWindow.ShowMessage(this, Utilities.GetString("UselessCommand") as string); } }
private void DetectDuplicateExecute() { if (Utilities.GetProcessCount("BaronReplays") > 1) { if (!DisableDuplicateExecuteAlert) { PopupWindow.ShowMessage(null, Utilities.GetString("BRAlreadyRunning") as string); } NormalStart = false; } }
public void LoLLauncherDone(bool isSuccess, string reason) { if (!isSuccess) { if (reason.CompareTo("OldVersionReplay") == 0) { Nullable <Boolean> result = YesNoPopupWindow.AskQuestion(this, String.Format(Utilities.GetString("OldVersionReplay"))); if (result == true) { GoToOldVersionReplayGuide(); } } else { PopupWindow.ShowMessage(this, Utilities.GetString(reason) as String); } } _launcher = null; }
public static Boolean CheckLoLExeSelected() { if (Properties.Settings.Default.LoLGameExe.Length != 0) { if (!File.Exists(Properties.Settings.Default.LoLGameExe)) { Properties.Settings.Default.LoLGameExe = String.Empty; } else if (Properties.Settings.Default.LoLGameExe.Contains("LoLExecutable")) { String gameExeRoot = Properties.Settings.Default.LoLGameExe.Substring(0, Properties.Settings.Default.LoLGameExe.IndexOf("LoLExecutable")); if (String.Compare(gameExeRoot, AppDomain.CurrentDomain.BaseDirectory) == 0) { Properties.Settings.Default.LoLGameExe = String.Empty; } } } if (Properties.Settings.Default.LoLGameExe.Length == 0) { String path = GetRiotRegionExePath(); if (path != null) { Properties.Settings.Default.LoLGameExe = path; return(true); } foreach (String s in LoLExeDefaultPaths) { if (File.Exists(s)) { Properties.Settings.Default.LoLGameExe = s; Properties.Settings.Default.Save(); return(true); } } PopupWindow.ShowMessage(MainWindow.Instance, Utilities.GetString("SelectLoLExe") as string); if (!Utilities.SelectLoLExePath()) { return(false); } } return(true); }
private async void Menu_Function_Update_Click(object sender, EventArgs e) { if (LockMainView) { return; } if (await Task.Run(() => Utilities.IsUpdateAvailable())) { UpdateNotifyWindow updateWindow = new UpdateNotifyWindow(); updateWindow.Owner = this; updateWindow.ShowDialog(); if (updateWindow.IsUpdateAccepted) { Utilities.UpdateSoftware(); } } else { PopupWindow.ShowMessage(this, Utilities.GetString("NewestVersion") as string); } }
private void ChangePlatform(String p) { if (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) { PopupWindow.ShowMessage(MainWindow.Instance, Utilities.GetString("NetworkError") as String); return; } StartLoadingLineAnimation(); if (gameManager == null) { gameManager = new FeaturedGamesManager(p, this); } else { if (gameManager.IsBusy) { hasNewRequest = true; } CancelWaitForData(); gameManager.Platform = p; } }