Exemplo n.º 1
0
        // Function from file: html_interface.dm
        public void hide(dynamic hclient = null)
        {
            hclient = this.getClient(hclient);

            if (hclient is HtmlInterfaceClient)
            {
                if (this.clients != null)
                {
                    this.clients.Remove(hclient.client);

                    if (!(this.clients.len != 0))
                    {
                        this.clients = null;
                    }
                }
                hclient.client.hi_last_pos = Interface13.WindowGet(hclient.client, new Txt("browser_").Ref(this).ToString(), "pos");
                Interface13.WindowShow(hclient.client, new Txt("browser_").Ref(this).ToString(), GlobalVars.FALSE);
                Interface13.WindowSet(hclient.client, new Txt("browser_").Ref(this).ToString(), "parent=none");

                if (Lang13.HasCall(this.v_ref, "hiOnHide"))
                {
                    Lang13.Call(Lang13.BindFunc(this.v_ref, "hiOnHide"), hclient);
                }
            }
            return;
        }
Exemplo n.º 2
0
        // Function from file: browser.dm
        public override dynamic open(bool?use_onclose = null)
        {
            dynamic _default = null;

            string focusedwindow = null;
            double i             = 0;

            this.opentime = Game13.time;

            if (this.stealfocus == true)
            {
                _default = base.open(true);
            }
            else
            {
                focusedwindow = Interface13.WindowGet(this.user, null, "focus");
                _default      = base.open(true);

                foreach (dynamic _a in Lang13.IterateRange(1, 10))
                {
                    i = _a;


                    if (Lang13.Bool(this.user) && Interface13.WindowExists(this.user, this.window_id))
                    {
                        if (Lang13.Bool(focusedwindow))
                        {
                            Interface13.WindowSet(this.user, focusedwindow, "focus=true");
                        }
                        else
                        {
                            Interface13.WindowSet(this.user, "mapwindow", "focus=true");
                        }
                        break;
                    }
                }
            }

            if (Lang13.Bool(this.timeout))
            {
                Task13.Schedule(this.timeout ?? 0, (Task13.Closure)(() => {
                    this.close();
                    return;
                }));
            }
            return(_default);
        }