示例#1
0
        public static EventArray operator+(EventArray left, EventArray right)
        {
            EventArray ea = new EventArray();

            ea.eventArray = new List <EventMsg>();
            ea.eventArray.AddRange(left.eventArray);
            ea.eventArray.AddRange(right.eventArray);
            return(ea);
        }
示例#2
0
            public Dialog(int _dialogID, Dialog refDialog, params string[] cmdList)
            {
                dialogID = _dialogID;
                if (refDialog != null)
                {
                    dialogName       = refDialog.dialogName;
                    dialogPanel      = refDialog.dialogPanel;
                    uiDefaultLockers = refDialog.uiDefaultLockers;
                    textLabelEvent   = refDialog.textLabelEvent;
                    textID           = refDialog.textID;
                    eventNameYes     = refDialog.eventNameYes;
                    eventNameNo      = refDialog.eventNameNo;
                    eventWhenYes     = refDialog.eventWhenYes;
                    eventWhenNo      = refDialog.eventWhenNo;
                    bPause           = refDialog.bPause;
                    blockUI          = refDialog.blockUI;

                    cmd = cmdList;
                }
            }
示例#3
0
文件: Dialog.cs 项目: Farl/SSCore2017
        public Dialog(int _dialogID, Dialog refDialog, params string[] cmdList)
        {
            dialogID = _dialogID;

            cmd = cmdList;

            if (refDialog != null)
            {
                uiName         = refDialog.uiName;
                dialogName     = refDialog.dialogName;
                textLabelEvent = refDialog.textLabelEvent;
                textID         = refDialog.textID;
                eventNameYes   = refDialog.eventNameYes;
                eventNameNo    = refDialog.eventNameNo;
                eventWhenYes   = refDialog.eventWhenYes;
                eventWhenNo    = refDialog.eventWhenNo;
                eventNext      = refDialog.eventNext;
                eventOnLoad    = refDialog.eventOnLoad;
                isPause        = refDialog.isPause;
                dialogSys      = refDialog.dialogSys;
            }
        }
示例#4
0
        public int RequestDialog(string dialogType, string dialogTextID, string extraEventYes, string extraEventNo, string eventNext, EventArray onLoadEvent, params string[] cmdArray)
        {
            Dialog refDialog = null;

            int currDialogID = nextDialog;

            // Find dialog define in DialogSettings
            foreach (Dialog d in DialogSettings.Instance.dialogDefine)
            {
                if (d.dialogName == dialogType)
                {
                    refDialog = d;
                    break;
                }
            }

            Dialog newDialog = new Dialog(currDialogID, refDialog, cmdArray);

            // Override
            newDialog.dialogSys = this;

            if (onLoadEvent != null)
            {
                newDialog.eventOnLoad += onLoadEvent;
            }
            if (!string.IsNullOrEmpty(dialogTextID))
            {
                newDialog.textID = dialogTextID;
            }
            if (!string.IsNullOrEmpty(extraEventYes))
            {
                newDialog.extraEventYes = extraEventYes;
            }
            if (!string.IsNullOrEmpty(extraEventNo))
            {
                newDialog.extraEventNo = extraEventNo;
            }
            if (!string.IsNullOrEmpty(eventNext))
            {
                newDialog.eventNext = eventNext;
            }
            // Override

            dialogList.Add(newDialog);

            nextDialog++;

            return(currDialogID);
        }