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); }
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; } }
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; } }
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); }