Exemplo n.º 1
0
        public override bool EditData(System.Collections.Hashtable table)
        {
            BindDelegate();

            Trace.Assert(table != null);
            Trace.Assert(table.ContainsKey("data"));
            Trace.Assert(table.ContainsKey("event_data"));
            Trace.Assert(table.ContainsKey("prev_data"));
            Trace.Assert(table.ContainsKey("flowchart_name"));
            Trace.Assert(table.ContainsKey("map_name"));

            LuaManager.GetLuaManager().InitOther("flowchart_name", table["flowchart_name"].ToString());
            LuaManager.GetLuaManager().InitOther("map_name", table["map_name"].ToString());
            LuaManager.GetLuaManager().InitOther("client_dir", table["client_dir"].ToString());

            //初始化历史表
            CacheManager.GetCacheManager().Global_Args_Table = table["globe_args"] as Hashtable;
           
            EventListForm eventForm = new EventListForm();
            eventForm.selectedEvent = table["data"] as GameEvent;
            eventForm.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (eventForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (eventForm.selectedEvent == null) return false;
                this.data = eventForm.selectedEvent;
                this.text = eventForm.ToString();
                ScanConst(table);
                return true;
            }
            else
            {
                return false;
            }
        }
Exemplo n.º 2
0
        public override bool EditData(System.Collections.Hashtable table)
        {
            BindDelegate();

            Trace.Assert(table != null);
            Trace.Assert(table.ContainsKey("data"));
            Trace.Assert(table.ContainsKey("event_data"));
            Trace.Assert(table.ContainsKey("prev_data"));
            Trace.Assert(table.ContainsKey("flowchart_name"));
            Trace.Assert(table.ContainsKey("map_name"));

            LuaManager.GetLuaManager().InitOther("flowchart_name", table["flowchart_name"].ToString());
            LuaManager.GetLuaManager().InitOther("map_name", table["map_name"].ToString());
            LuaManager.GetLuaManager().InitOther("client_dir", table["client_dir"].ToString());

            //初始化历史表
            CacheManager.GetCacheManager().Global_Args_Table = table["globe_args"] as Hashtable;

            EventListForm eventForm = new EventListForm();

            eventForm.selectedEvent = table["data"] as GameEvent;
            eventForm.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            if (eventForm.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                if (eventForm.selectedEvent == null)
                {
                    return(false);
                }
                this.data = eventForm.selectedEvent;
                this.text = eventForm.ToString();
                ScanConst(table);
                return(true);
            }
            else
            {
                return(false);
            }
        }