Exemple #1
0
 private static void ExecuteOnCreateAlert(bool isCreate, CMD_Alert alert)
 {
     if (AlertManager.onCreateAlert != null)
     {
         AlertManager.onCreateAlert(isCreate, alert);
         AlertManager.onCreateAlert = null;
     }
 }
Exemple #2
0
    private void ShowDaialogOverTheLength()
    {
        CMD_Alert cmd_Alert = GUIMain.ShowCommonDialog(null, "CMD_Alert", null) as CMD_Alert;

        if (cmd_Alert == null)
        {
            return;
        }
        cmd_Alert.Title = StringMaster.GetString("MyProfile-15");
        cmd_Alert.Info  = StringMaster.GetString("RecruitRule-10");
        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.CLOSE);
    }
Exemple #3
0
    private void ShowDaialogForbiddenChar()
    {
        CMD_Alert cmd_Alert = GUIMain.ShowCommonDialog(null, "CMD_Alert", null) as CMD_Alert;

        if (cmd_Alert == null)
        {
            return;
        }
        cmd_Alert.Title = StringMaster.GetString("MyProfile-13");
        cmd_Alert.Info  = StringMaster.GetString("MyProfile-14");
        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.CLOSE);
        this.recruitMessageInput.value = string.Empty;
    }
Exemple #4
0
    private void ShowDaialogOverTheLength()
    {
        CMD_Alert cmd_Alert = GUIMain.ShowCommonDialog(null, "CMD_Alert", null) as CMD_Alert;

        if (cmd_Alert == null)
        {
            return;
        }
        cmd_Alert.Title = StringMaster.GetString("MyProfile-15");
        cmd_Alert.Info  = StringMaster.GetString("ChatGroupCreateFailed");
        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.CLOSE);
        this.SetGraySubmitButton(true);
    }
Exemple #5
0
    private void ShowDaialogForbiddenChar()
    {
        CMD_Alert cmd_Alert = GUIMain.ShowCommonDialog(null, "CMD_Alert", null) as CMD_Alert;

        if (cmd_Alert == null)
        {
            return;
        }
        cmd_Alert.Title = StringMaster.GetString("MyProfile-13");
        cmd_Alert.Info  = StringMaster.GetString("MyProfile-14");
        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.CLOSE);
        this.groupNameInput.value = string.Empty;
        this.commentInput.value   = string.Empty;
        this.SetGraySubmitButton(true);
    }
 private void OnApplicationPause(bool isPause)
 {
     if (!isPause && !this.isCancelMatching)
     {
         CMD_Alert cmd_Alert = UnityEngine.Object.FindObjectOfType <CMD_Alert>();
         if (null != cmd_Alert)
         {
             cmd_Alert.SetLastCallBack(new Action(this.matchingEventListener.OnResumeApplication));
         }
         else
         {
             this.matchingEventListener.OnResumeApplication();
         }
     }
 }
Exemple #7
0
 private void ExecuteTouch(bool forceChange)
 {
     if (0 >= this.totalSeconds && !this.worldStageData.isViewRanking)
     {
         CMD_Alert cmd_Alert = GUIMain.ShowCommonDialog(delegate(int i)
         {
             GUIManager.CloseAllCommonDialog(null);
         }, "CMD_Alert", null) as CMD_Alert;
         cmd_Alert.Title = StringMaster.GetString("QuestEventTitle");
         cmd_Alert.Info  = StringMaster.GetString("QuestEventInfo");
         cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.CLOSE);
     }
     else
     {
         CMD_QuestTOP.ChangeSelectA_StageL_S(base.IDX, forceChange);
     }
 }
    private void CreatePopup(string title, string message)
    {
        CMD_Alert cmd_Alert = GUIMain.ShowCommonDialog(delegate(int i)
        {
            if (this.resultTimeOutMode == GUIScreenResult.ResultTimeOutMode.HOME)
            {
                RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
                ScreenController.ChangeHomeScreen(CMD_Tips.DISPLAY_PLACE.TitleToFarm);
            }
            else
            {
                GUIMain.BackToTOP("UIStartupCaution", 0.8f, 0.8f);
            }
        }, "CMD_Alert", null) as CMD_Alert;

        cmd_Alert.Title = title;
        cmd_Alert.Info  = message;
        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.CLOSE);
    }
Exemple #9
0
    private static bool ShowDialog <CMD_Type>(Action <int> action, string title, string message, string dialogName = "", AlertManager.ButtonActionType actionType = AlertManager.ButtonActionType.Close, bool isWarningIcon = true, bool useErrorCode = false) where CMD_Type : CMD
    {
        Action <int> action2 = delegate(int i)
        {
            if (action != null)
            {
                action(i);
            }
        };

        if (AlertManager.alertOpenedAction != null)
        {
            AlertManager.alertOpenedAction();
        }
        if (!useErrorCode)
        {
            AlertManager.lastErrorCode = "unknown:" + AlertManager.lastErrorCode;
        }
        PlayerPrefs.SetString("LastErrorInfo", ServerDateTime.Now + ":" + AlertManager.lastErrorCode);
        CMD_Type cmd_Type = GUIMain.ShowCommonDialog(action2, dialogName, null) as CMD_Type;

        if (cmd_Type != null)
        {
            string text = typeof(CMD_Type).ToString();
            if (text != null)
            {
                if (!(text == "CMD_Alert"))
                {
                    if (!(text == "CMD_maintenance"))
                    {
                        if (text == "CMD_ModalMessage")
                        {
                            CMD_ModalMessage cmd_ModalMessage = cmd_Type as CMD_ModalMessage;
                            cmd_ModalMessage.Title = title;
                            cmd_ModalMessage.Info  = message;
                            AlertManager.ExecuteOnCreateAlert(true, null);
                        }
                    }
                    else
                    {
                        CMD_maintenance cmd_maintenance = cmd_Type as CMD_maintenance;
                        cmd_maintenance.Info = message;
                    }
                }
                else
                {
                    CMD_Alert cmd_Alert = cmd_Type as CMD_Alert;
                    cmd_Alert.Title     = title;
                    cmd_Alert.Info      = message;
                    cmd_Alert.IsWarning = isWarningIcon;
                    switch (actionType)
                    {
                    case AlertManager.ButtonActionType.Close:
                        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.CLOSE);
                        break;

                    case AlertManager.ButtonActionType.Retry:
                        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.RETRY);
                        break;

                    case AlertManager.ButtonActionType.TitleAndRetry:
                        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.TITLE_AND_RETRY);
                        break;

                    case AlertManager.ButtonActionType.Title:
                        cmd_Alert.SetDisplayButton(CMD_Alert.DisplayButton.TITLE);
                        break;
                    }
                    AlertManager.ExecuteOnCreateAlert(true, cmd_Alert);
                }
            }
            return(true);
        }
        if (action != null)
        {
            action(0);
        }
        UnityEngine.Debug.Log("Create Failed CMD : " + title + ", " + message);
        return(false);
    }