protected virtual void OnLostFocus() { result = WindowResult.LostFocus; if (owner != null) owner.ModalClosed(this); }
protected virtual void Cancel() { result = WindowResult.Cancel; if (owner != null) owner.ModalClosed(this); Close(); }
protected virtual void Ok() { result = WindowResult.Ok; if (owner != null) owner.ModalClosed(this); Close(); }
public void Close(WindowResult windowResult = WindowResult.None) { UIManager.Instance.Close(this.Type); if (this.Onclose != null) { Onclose.Invoke(this, windowResult); } Onclose = null; }
public void Close(WindowResult result = WindowResult.None) { UIManager.Instance.Close(this.Type); if (this.OnClose != null) { this.OnClose(this, result); } this.OnClose = null; }
protected virtual void OnLostFocus() { result = WindowResult.LostFocus; if (owner != null) { owner.ModalClosed(this); } }
protected virtual void OnLostFocus() { _result = WindowResult.LostFocus; if (Del != null) { Del(this); } }
public void Close(WindowResult result = WindowResult.None) { SoundManager.Instance.PlaySound(SoundDefine.SFX_UI_Win_Close); UIManager.Instance.Close(this.Type); if (this.OnClose != null) { this.OnClose(this, result); } this.OnClose = null; }
protected virtual void Ok() { _result = WindowResult.Ok; if (Del != null) { Del(this); } Close(); }
protected virtual void Cancel() { _result = WindowResult.Cancel; if (Del != null) { Del(this); } Close(); }
protected virtual void Ok() { result = WindowResult.Ok; if (owner != null) { owner.ModalClosed(this); } Close(); }
protected virtual void Cancel() { result = WindowResult.Cancel; if (owner != null) { owner.ModalClosed(this); } Close(); }
protected void Close(WindowResult result = WindowResult.None) { Managers.UiManager.Instance.Close(Type); if (OnClose != null) { OnClose(this, result); } this.OnClose = null; compontCache?.Clear(); }
protected virtual void _Ok() { _result = WindowResult.Ok; if (_owner != null) { _owner._ModalClosed(this); } Close(); }
private void PopNoGuild_OnClose(UIWindow sender, WindowResult windowResult) { //如果点击了创建公会 if (windowResult == WindowResult.Yes) { UIManager.Instance.Show <UIGuildPopCreate>(); } else if (windowResult == WindowResult.No) { UIManager.Instance.Show <UIGuildList>(); } }
/// <summary> /// Creates the menu item. /// </summary> /// <param name="windowResult">The window result.</param> /// <param name="createTagData">The create tag data.</param> /// <param name="addTagAction">The add tag action.</param> public void CreateTagItem(WindowResult windowResult, CreateTagData createTagData, Action <string> addTagAction) { if (createTagData == null || string.IsNullOrEmpty(createTagData.Tags) || windowResult == WindowResult.Cancel || windowResult == WindowResult.Invalid) { Logger.Debug("Aborting tag creation"); return; } foreach (string tag in createTagData.Tags.Split(' ', ',', ';')) { addTagAction(tag); } }
public WindowResult ReceiveUserInput() { base.ShowDialog(); var result = new WindowResult() { Type = this.IsCanceled ? WindowResultType.Canceled : WindowResultType.CommonFinished }; if (result.Type == WindowResultType.CommonFinished) { result.Result = this.InputContent; } return result; }
/// <summary> /// Called when pressing Enter or Ok. /// </summary> protected virtual void Ok() { result = WindowResult.Ok; Event.current.Use(); if (owner != null) { owner.ModalClosed(this); } Close(); Remove(); }
private void OnQuestDialogClose(UIWindow sender, WindowResult result) { UIQuestDialog dlg = (UIQuestDialog)sender; if (result == WindowResult.Yes) //接受任务 或提交 { if (dlg.quest.Info == null) //提交 { QuestService.Instance.SendQuestAccpet(dlg.quest); } else//接受 { QuestService.Instance.SendQuestSubmit(dlg.quest); } } else if (result == WindowResult.No)//拒绝任务 { MessageBox.Show(dlg.quest.Define.DialogDeny); } }
private void OnOkClicked() { WindowResult.Invoke(true); Release(); }
internal WindowResult ReceiveUserSelect() { base.ShowDialog(); var result = new WindowResult() { Type = this.IsCanceled ? WindowResultType.Canceled : WindowResultType.CommonFinished }; if (result.Type == WindowResultType.CommonFinished) { result.Result = this.SelectItem; } return result; }
public void ShouldSetViewTypeToWindow() { var result = new WindowResult("MyWindow", null, new ViewEngineCollection()); Assert.AreEqual("Window", result.Options["ViewType"]); }
/// <summary> /// Occurs when the window is about to close. /// </summary> protected virtual void OnClosed(WindowResult Result) { Closed?.Invoke(this, new EventArgs <WindowResult>(Result)); }
private void OnUITestClose(UIWindow sender, WindowResult windowResult) { MessageBox.Show(string.Format("你点击了{0}", windowResult.ToString()), "确定"); }
private void OnCancelClicked() { WindowResult.Invoke(false); Release(); }
/// <summary> /// Occurs when the window is about to close (async). /// </summary> protected virtual async Task OnBeginClosed(WindowResult Result) { await Task.Run(() => Closed?.Invoke(this, new EventArgs <WindowResult>(Result))); }