예제 #1
0
        // Function from file: subsystem.dm
        public int update_uis(Game_Data src_object = null)
        {
            string  src_object_key = null;
            int     update_count   = 0;
            dynamic ui_key         = null;
            Tgui    ui             = null;

            src_object_key = new Txt().Ref(src_object).ToString();

            if (this.open_uis[src_object_key] == null || !(this.open_uis[src_object_key] is ByTable))
            {
                return(0);
            }
            update_count = 0;

            foreach (dynamic _b in Lang13.Enumerate(this.open_uis[src_object_key]))
            {
                ui_key = _b;


                foreach (dynamic _a in Lang13.Enumerate(this.open_uis[src_object_key][ui_key], typeof(Tgui)))
                {
                    ui = _a;


                    if (ui != null && ui.src_object != null && Lang13.Bool(ui.user) && ui.src_object.ui_host() != null)
                    {
                        ui.process();
                        update_count++;
                    }
                }
            }
            return(update_count);
        }
예제 #2
0
        // Function from file: subsystem.dm
        public int update_user_uis(dynamic user = null, Wires src_object = null, string ui_key = null)
        {
            int  update_count = 0;
            Tgui ui           = null;


            if (user.open_uis == null || !(user.open_uis is ByTable) || this.open_uis.len == 0)
            {
                return(0);
            }
            update_count = 0;

            foreach (dynamic _a in Lang13.Enumerate(user.open_uis, typeof(Tgui)))
            {
                ui = _a;


                if ((src_object == null || !(src_object == null) && ui.src_object == src_object) && (ui_key == null || !(ui_key == null) && ui.ui_key == ui_key))
                {
                    ui.process();
                    update_count++;
                }
            }
            return(update_count);
        }