示例#1
0
    // 设置激活的窗口
    public void             setActiveWindow(dbwin.WindowBase window)
    {
        do
        {
            if (window == null)
            {
                this.active_window = null;
                break;
            }

            WindowResist resist = this.windows.Find(x => x.window == window);

            if (resist == null)
            {
                break;
            }

            if (this.active_window != null)
            {
                this.active_window.window.is_active = false;
                this.active_window = null;
            }

            this.active_window = resist;
        } while(false);
    }
示例#2
0
    // 获取窗口
    public dbwin.WindowBase getWindow(string title)
    {
        dbwin.WindowBase window = null;

        var resist = this.windows.Find(x => x.window.title == title);

        if (resist != null)
        {
            window = resist.window;
        }

        return(window);
    }
示例#3
0
    // 注册窗口
    public void             resisterWindow(dbwin.WindowBase window)
    {
        if (this.windows.Count > 0)
        {
            dbwin.WindowBase last_win = this.windows[this.windows.Count - 1].window;

            window.setPosition(last_win.win_rect.x, 20);
        }

        float x, y;

        x = 10.0f + 100.0f * this.windows.Count;
        y = Screen.height - 20.0f;

        WindowResist resist = new WindowResist();

        resist.window          = window;
        resist.hot_button_rect = new Rect(x, y, 100.0f, 20.0f);

        this.windows.Add(resist);
    }