Beispiel #1
0
        /// <summary>
        /// 对话框添加按钮
        /// </summary>
        /// <param name="whichDialog">对话框</param>
        /// <param name="buttonText">按钮文本</param>
        /// <param name="hotkey">快捷键</param>
        /// <returns>返回添加的按钮</returns>
        public static button DialogAddButton(dialog whichDialog, @string buttonText, integer hotkey)
        {
            button btn = new button {
                text = buttonText, hotkey = hotkey
            };

            whichDialog.items.Add(btn);
            return(btn);
        }
        public static @event TriggerRegisterDialogButtonEvent(trigger whichTrigger, button whichButton)
        {
            @event triEvent = new @event()
            {
                sourceDialogButton = whichButton
            };

            whichTrigger.events.Add(triEvent);
            return(triEvent);
        }
Beispiel #3
0
 public static boolean SaveButtonHandle(hashtable table, integer parentKey, integer childKey, button whichButton)
 {
     table.Add(parentKey.ToString("x8") + childKey.ToString("x8"), whichButton);
     return(true);
 }