public IFunctionReference SelectFunction(Guid?selectedFunctionId) { var functionService = _owner.GetService <IFunctionService>(); if (functionService == null) { var messageBoxService = new MessageBoxService(); messageBoxService.Show("No function service was provided."); return(null); } var functions = functionService.GetFunctions(); var viewModel = new FunctionSelectionDialogViewModel(functions, selectedFunctionId); var view = new FunctionSelectionDialogView() { DataContext = viewModel, Owner = WindowUtil.GetActiveWindow() }; if (view.ShowDialog() == true) { return(viewModel.SelectedFunction); } return(null); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); toggle.Draw(); ok.Draw(); if (ok.isClick()) { if (DontShowThisMessageAgain) { MyInfoManager.Instance.SaveDonotCommonMask(MyInfoManager.COMMON_OPT.DONOT_ESCAPE_GUIDE); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override void DrawMiddle(float x, ref float y, float width) { PlusMinusLabel(x, ref y, width, "Skill Gains", this.skillGainsPlusMinus); foreach (var v in this.skillGains) { v.Draw(x, ref y, width); } PlusMinusLabel(x, ref y, width, "Required Work Tags", this.requiredWorkTags); WindowUtil.DrawFlagList(x, ref y, width, workTags, (int)this.Backstory.requiredWorkTags, v => v == WorkTags.None); y += 10; PlusMinusLabel(x, ref y, width, "Disabled Work Tags", this.workDisables); WindowUtil.DrawFlagList(x, ref y, width, workTags, (int)this.Backstory.workDisables, v => v == WorkTags.None); y += 10; PlusMinusLabel(x, ref y, width, "Forced Traits", this.forcedTraitsPlusMinus); foreach (var v in this.forcedTraits) { v.Draw(x + 10, ref y, width - 10); } y += 10; PlusMinusLabel(x, ref y, width, "Disallowed Traits", this.disallowedTraitsPlusMinus); foreach (var v in this.disallowedTraits) { v.Draw(x + 10, ref y, width - 10); } }
public FenceWindow(FenceInfo fenceInfo) { InitializeComponent(); DropShadow.ApplyShadows(this); BlurUtil.EnableBlur(Handle); WindowUtil.HideFromAltTab(Handle); //DesktopUtil.GlueToDesktop(Handle); //DesktopUtil.PreventMinimize(Handle); this.titleHeight = fenceInfo.TitleHeight; this.MouseWheel += FenceWindow_MouseWheel; thumbnailProvider.IconThumbnailLoaded += ThumbnailProvider_IconThumbnailLoaded; if (titleHeight < 16 || titleHeight > 100) { titleHeight = 35; } ReloadFonts(); AllowDrop = true; this.fenceInfo = fenceInfo; Text = fenceInfo.Name; Location = new Point(fenceInfo.PosX, fenceInfo.PosY); Width = fenceInfo.Width; Height = fenceInfo.Height; prevHeight = Height; lockedToolStripMenuItem.Checked = fenceInfo.Locked; minifyToolStripMenuItem.Checked = fenceInfo.CanMinify; Minify(); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); if (GlobalVars.Instance.isLoadBattleTutor) { GUI.Label(new Rect(0f, 10f, size.x, size.y - sizeOk.y - 20f), StringMgr.Instance.Get("TUTORIAL_COMPLETE"), "MsgLabel"); } else { GUI.Label(new Rect(0f, 10f, size.x, size.y - sizeOk.y - 20f), StringMgr.Instance.Get("TUTORIAL_COMPLETE2"), "MsgLabel"); } if (GlobalVars.Instance.MyButton(new Rect((GlobalVars.Instance.ScreenRect.width - sizeOk.x) / 2f, size.y - sizeOk.y - 10f, sizeOk.x, sizeOk.y), StringMgr.Instance.Get("OK"), "BtnAction")) { if (MyInfoManager.Instance.Tutorialed < 2) { DialogManager.Instance.Push(DialogManager.DIALOG_INDEX.TUTOR_Q_POPUP, string.Empty); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
void EnablePortCustomization_Checked(object sender, RoutedEventArgs e) { if (!EnablePortCustomization.IsChecked.Value) { return; } var rDialog = new TaskDialog() { Caption = StringResources.Instance.Main.Product_Name, Instruction = StringResources.Instance.Main.PreferenceWindow_Network_Port_Customization_Dialog_Instruction, Icon = TaskDialogIcon.Information, Content = StringResources.Instance.Main.PreferenceWindow_Network_Port_Customization_Dialog_Content, Buttons = { new TaskDialogButton(TaskDialogCommonButton.Yes, StringResources.Instance.Main.PreferenceWindow_Network_Port_Customization_Dialog_Button_Yes), new TaskDialogButton(TaskDialogCommonButton.No, StringResources.Instance.Main.PreferenceWindow_Network_Port_Customization_Dialog_Button_No), }, DefaultCommonButton = TaskDialogCommonButton.No, OwnerWindow = WindowUtil.GetTopWindow(), ShowAtTheCenterOfOwner = true, }; if (rDialog.Show().ClickedCommonButton == TaskDialogCommonButton.No) { EnablePortCustomization.IsChecked = false; } }
void playAndRetry(string videoId, int streamIndex = -1) { if (play(videoId, streamIndex)) { _fluentAverageCalculator = new FluentAverageCalculator(); } else { if (videoId == VideoId) { TimerCallback callback = x => { WindowUtil.BeginInvoke(() => playAndRetry(videoId, streamIndex)); }; if (_tryTimes++ >= 10) { string msg = "============已尝试很多次,仍无法播放视频:{0} ========"; Console.WriteLine(msg, videoId); Common.Log.Logger.Default.Error(msg, videoId); } else { _timer = new Timer(callback, null, 500, Timeout.Infinite); } } } }
private void onLocalSourceInfoReceived(LocalVideosInfoPacket obj) { WindowUtil.BeginInvoke(() => { UpdateTimePeriod(obj.TimePeriod.BeginTime, obj.TimePeriod.EndTime); }); }
public void ExportAsCsvFile() { using (var rDialog = new CommonSaveFileDialog()) { rDialog.FileTypes.Add(new CommonFileDialogFileType(StringResources.Instance.Main.Export_CSV_FileType, "csv")); rDialog.DefaultExtension = "csv"; if (rDialog.Show(WindowUtil.GetTopWindow()) != CommonFileDialogResult.OK) { return; } var rFilename = rDialog.Filename; using (var rWriter = new StreamWriter(File.Open(rFilename, FileMode.Create), Encoding.Default)) ExportAsCsvFileCore(rWriter); var rButton = new TaskDialogButton(StringResources.Instance.Main.Export_CSV_Message_OpenFile); var rResult = new TaskDialog() { Caption = StringResources.Instance.Main.Product_Name, Icon = TaskDialogIcon.Information, Instruction = StringResources.Instance.Main.Export_CSV_Message, CommonButtons = TaskDialogCommonButtons.OK, Buttons = { rButton }, OwnerWindow = WindowUtil.GetTopWindow(), ShowAtTheCenterOfOwner = true, }.ShowAndDispose(); if (rResult.SelectedButton == rButton) { Process.Start(rFilename); } } }
public MidiGameBoiApp() { LogManager.ThrowConfigExceptions = true; LogManager.ThrowExceptions = true; Logger logger = LogManager.GetLogger("LogFile"); //logger.Info("hi"); _appIcon = new NotifyIcon(); _noteViewer = new NoteViewer(); _mainForm = new Form1(this); _mainForm.FormClosing += _mainForm_FormClosing; _mainForm.OnSetMidi += _mainForm_OnSetMidi; _mainForm.Show(); this.MainForm = _mainForm; _appIcon.Icon = SystemIcons.Question; _appIcon.Visible = true; _appIcon.DoubleClick += _appIcon_DoubleClick; _appIcon.ContextMenu = new ContextMenu(); var quitItem = new MenuItem("Exit"); quitItem.Click += delegate { _canQuit = true; _mainForm.Close(); }; _appIcon.ContextMenu.MenuItems.Add(quitItem); _gameWindow = WindowUtil.FindWindowByTitle("Minecraft"); }
protected override void doStatusCycleOverrides() { try { if (su.TimeElapsed < TwoSeconds) // give it some time to start up, otherwise MainWindowHandle remains null { return; } if (ptr == IntPtr.Zero) { ptr = proc.MainWindowHandle; } string text = WindowUtil.GetText(ptr); Match m = DGPercent.Match(text); if (m.Success) { su.PercentageDoneExact = int.Parse(m.Groups["num"].Value); } } catch (Exception) { } }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 10f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("CHG_REPLACE_DST"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.UpperCenter); DoSilo(); if (GlobalVars.Instance.MyButton(crdOk, StringMgr.Instance.Get("OK"), "BtnAction")) { if (replaceToolDlg.Prev.seq == currentBrick.seq) { SystemMsgManager.Instance.ShowMessage(StringMgr.Instance.Get("CAN_NOT_REPLACE_SAME_BRICK")); } else { replaceToolDlg.Next = currentBrick; result = true; } } Rect rc = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public FenceWindow(FenceInfo fenceInfo) { InitializeComponent(); DropShadow.ApplyShadows(this); BlurUtil.EnableBlur(Handle); WindowUtil.HideFromAltTab(Handle); DesktopUtil.GlueToDesktop(Handle); var family = new FontFamily("Segoe UI"); titleFont = new Font(family, 17); iconFont = new Font(family, 9); AllowDrop = true; this.fenceInfo = fenceInfo; Text = fenceInfo.Name; Location = new Point(fenceInfo.PosX, fenceInfo.PosY); Width = fenceInfo.Width; Height = fenceInfo.Height; prevHeight = Height; lockedToolStripMenuItem.Checked = fenceInfo.Locked; minifyToolStripMenuItem.Checked = fenceInfo.CanMinify; Minify(); }
protected override async void OnInitialized(EventArgs e) { base.OnInitialized(e); if (WindowUtil.IsDesingMode()) { return; } await System.Threading.Tasks.Task.Yield(); await _mapNotification.InitCompletion; _locator = LocatorAndBorder.Instance; _radars = new RadarsCanvas(_locator); this.AddChild(_radars); _locator.OnMapRefreshed += _locator_OnMapRefreshed; _mouseEventSource.MouseDown.Subscribe(onMouseDown); activatingStatus = ActivatingStatus.Instance; _menuBarInfo = MenuBarsBaseInfo.Instance; _menuBarInfo.PropertyChanged += _menuBarInfo_PropertyChanged; _winformWindow = (System.Windows.Interop.HwndSource.FromDependencyObject(this) as System.Windows.Interop.HwndSource); _radars.InitHwndSourse(_winformWindow); _locator_OnMapRefreshed(); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); successRotate.Draw(); successEffect.Draw(); background.BeginGroup(); imgList.Draw(); labelList.Draw(); itemName.Draw(); itemBackNomal.Draw(); itemBackRare.Draw(); itemIcon.Draw(); itemTime.Draw(); property.DoPropertyGuage(85f); itemExplain.Draw(); if (exit.Draw() || ok.Draw() || GlobalVars.Instance.IsReturnPressed()) { result = true; } background.EndGroup(); if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
private void MoniterMouseLeave() { do { Thread.Sleep(1000); bool flag = GetIsMouseLeaved(); if (flag) { SetMonitorFlag(true); Thread.Sleep(1000); flag = GetIsMouseLeaved() && GetMonitorFlag(); if (flag) { try { WindowUtil.BeginInvoke(() => { if (this.ControlState != Visibility.Hidden && WindowState == WindowState.Maximized) { this.ControlState = Visibility.Collapsed; } }); } catch (NullReferenceException) { //在应用程序(域)退出时,有可能引发此异常。 } break; } } }while (true); }
private void DrawTerrainPatchMakers(float x, ref float y, float width) { WindowUtil.PlusMinusLabel(x, ref y, width, "Patch Maker", delegate { Find.WindowStack.Add(new Dialog_Name( "Perlin Frequency", delegate(string name) { TerrainPatchMaker m = new TerrainPatchMaker() { perlinFrequency = float.Parse(name) }; base.Def.terrainPatchMakers.Add(m); this.terrainPatchMakers.Add(new TerrainPatchMakerWidget(m)); }, delegate(string name) { if (!float.TryParse(name, out float freq)) { return("Must be a number"); } foreach (var v in base.Def.terrainPatchMakers) { if (v.perlinFrequency == freq) { return("Perlin Frequency must be unique"); } } return(true); })); },
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Rect position = new Rect(16f, 12f, 774f, 38f); GUI.Box(position, string.Empty, "BoxFadeBlue"); TextureUtil.DrawTexture(new Rect(33f, 16f, (float)iconHelp.width, (float)iconHelp.height), iconHelp); LabelUtil.TextOut(new Vector2(80f, 30f), mainHeads[GlobalVars.Instance.opened], "MissionTitleLabel", clrMain, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); float num = calcBoxHeight(articleID); Rect position2 = new Rect(16f, 63f, 764f, num); GUI.Box(position2, string.Empty, "LineBoxBlue"); TextureUtil.DrawTexture(new Rect(35f, 79f, (float)iconPoint.width, (float)iconPoint.height), iconPoint); LabelUtil.TextOut(new Vector2(55f, 81f), subHeads[articleID], "MissionTitleLabel", clrMain, GlobalVars.txtEmptyColor, TextAnchor.MiddleLeft); GUI.Label(new Rect(position2.x + 20f, position2.y + articley, 720f, 60f), strArticle, "ArticleLabel"); TextureUtil.DrawTexture(new Rect(45f, position2.y + num + 10f, (float)tutos[articleID].width, (float)tutos[articleID].height), tutos[articleID]); if (endsPerPage[GlobalVars.Instance.opened] > 0 && subPage < endsPerPage[GlobalVars.Instance.opened] - 1) { Rect rc = new Rect(size.x - 160f, size.y - 50f, 140f, 34f); if (GlobalVars.Instance.MyButton(rc, StringMgr.Instance.Get("BTN_NEXT"), "BtnAction")) { subPage++; articleID++; } } else { Rect rc2 = new Rect(size.x - 160f, size.y - 50f, 140f, 34f); if (GlobalVars.Instance.MyButton(rc2, StringMgr.Instance.Get("OK"), "BtnAction") || GlobalVars.Instance.IsEscapePressed() || GlobalVars.Instance.IsReturnPressed()) { GlobalVars.Instance.SetForceClosed(set: true); result = true; } } if (endsPerPage[GlobalVars.Instance.opened] > 0 && subPage > 0) { Rect rc3 = new Rect(20f, size.y - 50f, 140f, 34f); if (GlobalVars.Instance.MyButton(rc3, StringMgr.Instance.Get("BTN_PREVIOUS"), "BtnAction")) { subPage--; articleID--; } } Rect rc4 = new Rect(size.x - 44f, 5f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc4, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { GlobalVars.Instance.resetMenuEx(); result = true; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(result); }
void updateImageSource(ImageSource imgSrc) { WindowUtil.BeginInvoke(() => { this.ImageSrc = imgSrc; }); }
private static AutomationEventHandler GetOpenWindowHandler(int processId) { return((sender, e) => { AutomationElement element = sender as AutomationElement; string processName = Process.GetProcessById(element.Current.ProcessId).ProcessName; if (element.Current.ProcessId != processId && processName != Constants.pptProcess) { return; } IntPtr handle = new IntPtr(element.Current.NativeWindowHandle); string windowName = WindowUtil.GetWindowTitle(handle); if (windowName == "") { Logger.Log("Titleless window in windowwatcher: " + $"pID: {element.Current.ProcessId}\n" + $"process name: {processName}\n" + $"HWND: {handle}"); return; } lastOpenWindowName = windowName; WindowOpenTrigger resultTrigger = GetWindowTrigger(windowName); if (resultTrigger == null) { WindowUtil.CloseWindow(handle); //MessageBox.Show(windowName); return; } resultTrigger.resultingWindow = handle; resultTrigger.Set(); }); }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); reloadText.Draw(); mouseText.Draw(); toggle.Draw(); ok.Draw(); if (BuildOption.Instance.Props.useDefaultDash) { speedUpText.Draw(); } if (ok.isClick()) { if (DontShowThisMessageAgain) { MyInfoManager.Instance.SaveDonotCommonMask(MyInfoManager.COMMON_OPT.DONOT_BATTLE_GUIDE); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
/// <summary> /// handles the encoder process existing /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void proc_Exited(object sender, EventArgs e) { mre.Set(); // Make sure nothing is waiting for pause to stop stdoutDone.WaitOne(); // wait for stdout to finish processing stderrDone.WaitOne(); // wait for stderr to finish processing // check the exitcode if (checkExitCode && proc.ExitCode != 0) { getErrorLine(); string strError = WindowUtil.GetErrorText(proc.ExitCode); if (!su.WasAborted) { su.HasError = true; // log.LogEvent("Process exits with error: " + strError, ImageType.Error); } else { // log.LogEvent("Process exits with error: " + strError); } } if (bRunSecondTime) { bRunSecondTime = false; start(); } else { su.IsComplete = true; StatusUpdate(su); } bWaitForExit = false; }
/// <summary> /// Returns a new argument if one was created, false otherwise. /// </summary> /// <returns></returns> private IArgument CreateArgument() { var metadata = new ArgumentMetadata() { Id = Guid.NewGuid(), }; //Create the view model var viewModel = new ArgumentDialogViewModel(metadata, _context.Types); //Create the dialog var view = new ArgumentDialogView() { DataContext = viewModel, Owner = WindowUtil.GetActiveWindow() }; //Show the dialog if (view.ShowDialog() == true) { //Create the argument return(new Argument(this, viewModel.ToMetadata())); } return(null); }
public override bool DoDialog() { CalcSize(); bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); LabelUtil.TextOut(new Vector2(size.x / 2f, crdLeftTop.y / 2f), StringMgr.Instance.Get("KICKOFF"), "Label", Color.white, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); Vector2 vector = crdLeftTop; BrickManDesc[] array = BrickManManager.Instance.ToDescriptorArrayWhoTookTooLongToWait(); if (array.Length <= 0) { result = true; } for (int i = 0; i < array.Length; i++) { if (GlobalVars.Instance.MyButton(new Rect(vector.x + crdXLT.x, vector.y + crdXLT.y, crdX.x, crdX.y), string.Empty, "X")) { CSNetManager.Instance.Sock.SendCS_KICK_REQ(array[i].Seq); } LabelUtil.TextOut(new Vector2(vector.x + crdNickname.x, vector.y + crdNickname.y), array[i].Nickname, "MiniLabel", Color.white, GlobalVars.txtEmptyColor, TextAnchor.UpperLeft); vector.y += offset; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public override bool DoDialog() { bool flag = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); Vector2 pos = new Vector2(size.x / 2f, 15f); LabelUtil.TextOut(pos, StringMgr.Instance.Get("LANGUAGE_SELECT"), "BigLabel", GlobalVars.Instance.txtMainColor, GlobalVars.txtEmptyColor, TextAnchor.MiddleCenter); Vector2 vector = crdLeftTop; int num = 0; while (!flag && num < langTex.Length) { if (GUI.Button(new Rect(vector.x, vector.y, crdButtonSize.x, crdButtonSize.y), langTex[num], "BtnBlue")) { flag = true; if (LangOptManager.Instance.LangOpt != (int)languages[num]) { LangOptManager.Instance.LangOpt = (int)languages[num]; GUISkinFinder.Instance.LanguageChanged(); GlobalVars.Instance.LoadAbg(); GlobalVars.Instance.ChangeVoiceByLang(LangOptManager.Instance.LangOpt); } } vector.y += crdButtonSize.y + offset; num++; } GUI.skin = skin; if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } return(flag); }
public void Draw(float x, ref float y, float width) { WindowUtil.DrawLabel(x, y, width, this.DisplayLabel, true); y += 30; x += 20; foreach (var v in this.inputWidgets) { v.Draw(x, ref y, width); } WindowUtil.PlusMinusLabel(x, ref y, width, "Skill Gains", this.skillGainsArgs); foreach (var v in this.skillGains) { v.Draw(x + 20, ref y, width); } WindowUtil.PlusMinusLabel(x, ref y, width, "Stat Offsets", this.statOffsetsArgs); foreach (var v in this.statOffsets) { v.Draw(x + 20, ref y, width); } WindowUtil.PlusMinusLabel(x, ref y, width, "Stat Factors", this.statFactorsArgs); foreach (var v in this.statFactors) { v.Draw(x + 20, ref y, width); } }
public override bool DoDialog() { bool result = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); imgList.Draw(); labelList.Draw(); toggle.Draw(); ok.Draw(); string text = string.Format(StringMgr.Instance.Get("GUIDE_EXPLOSION_ATTACK04"), custom_inputs.Instance.GetKeyCodeName("K_MODE"), custom_inputs.Instance.GetKeyCodeName("K_ACTION")); GUI.Label(crdMsg, text, "UpperLeftLabel"); if (ok.isClick()) { if (DontShowThisMessageAgain) { MyInfoManager.Instance.SaveDonotCommonMask(MyInfoManager.COMMON_OPT.DONOT_EXPLOSION_ATTACK_GUIDE); } result = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(result); }
public static Guid?SelectVplType(this IEnumerable <IVplType> types, Guid?selectedVplType = null) { if (types == null) { throw new ArgumentNullException(nameof(types)); } //Create the view model var viewModel = new SelectTypeDialogViewModel(types) { SelectedTypeId = selectedVplType }; //Create the view var view = new SelectTypeDialogView() { Owner = WindowUtil.GetActiveWindow(), DataContext = viewModel }; //Show the dialog if (view.ShowDialog() == true) { return(viewModel.SelectedTypeId); } return(null); }
public override bool DoDialog() { premiumAccount = (MyInfoManager.Instance.HaveFunction("premium_account") >= 0); bool flag = false; GUISkin skin = GUI.skin; GUI.skin = GUISkinFinder.Instance.GetGUISkin(); DoTitle(); DoWeaponSlots(); Rect rc = new Rect(size.x - 44f, 10f, 34f, 34f); if (GlobalVars.Instance.MyButton(rc, string.Empty, "BtnClose") || GlobalVars.Instance.IsEscapePressed()) { flag = true; GlobalVars.Instance.SetForceClosed(set: true); } if (ZombieVsHumanManager.Instance.IsZombie(MyInfoManager.Instance.Seq)) { flag = true; } if (!ContextMenuManager.Instance.IsPopup) { WindowUtil.EatEvent(); } GUI.skin = skin; return(flag || done); }
private void videosCleared(object sender, EventArgs e) { WindowUtil.Invoke(() => { gridVideo.Children.Clear(); }); }