private void OnQuestDialogClose(UIWindow sender, UIWindow.WindowResult result) { UIQuestDialog dlg = (UIQuestDialog)sender; if (result == UIWindow.WindowResult.Yes) { MessageBox.Show(dlg.quest.Define.DialogAccept); } else if (result == UIWindow.WindowResult.No) { MessageBox.Show(dlg.quest.Define.DialogDeny); } }
private bool ShowQuestDialog(Quest quest) { if (quest.Info == null || quest.Info.Status == QuestStatus.Completed) { UIQuestDialog dlg = UIManager.Instance.Show <UIQuestDialog>(); dlg.SetQuest(quest); dlg.OnClose += OnQuestDialogClose; } if (quest.Info != null && quest.Info.Status == QuestStatus.Completed) { if (!string.IsNullOrEmpty(quest.Define.DialogIncomplete)) { MessageBox.Show(quest.Define.DialogIncomplete); } } return(true); }
private bool ShowQuestDialog(Quest quest) { if (quest.Info == null || quest.Info.Status == QuestStatus.Complated) //任务没接,或者完成未提交 { UIQuestDialog dlg = UIManager.Instance.Show <UIQuestDialog>(); dlg.SetQuest(quest); dlg.Onclose += OnQuestDialogClose; return(true); } if (quest.Info != null || quest.Info.Status == QuestStatus.Complated) //任务未完成 { if (!string.IsNullOrEmpty(quest.Define.DialogIncomplete)) //判断字符串是否为“”和null { MessageBox.Show(quest.Define.DialogIncomplete); } } return(true); }
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); } }
void OnQuestDialogClose(UIWindow sender, UIWindow.WindowResult result) { UIQuestDialog dlg = (UIQuestDialog)sender; if (result == UIWindow.WindowResult.Yes) { if (dlg.quest.Info == null) { QuestService.Instance.SendQuestAccept(dlg.quest); } else if (dlg.quest.Info.Status == QuestStatus.Complated) { QuestService.Instance.SendQuestSubmit(dlg.quest); } } else if (result == UIWindow.WindowResult.No) { MessageBox.Show(dlg.quest.Define.DialogDeny); } }