예제 #1
0
파일: Form1.cs 프로젝트: lineCode/QUILib
        public Form1()
        {
            InitializeComponent();

            {
                Form form = this;
                mManager = new PaintManagerUI();

                mManager.init(ref form);

                DialogBuilder builder = new DialogBuilder(true);

                ControlUI rootNode = builder.createFromFile("login.xml", null, mManager);
                mManager.attachDialog(ref rootNode);

                mManager.addNotifier(this);
                this.ClientSize = mManager.getInitSize();
                mRectClient     = new Rectangle(0, 0, mManager.getInitSize().Width, mManager.getInitSize().Height);

                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                rootNode.setPos(new Rectangle(0, 0, this.Size.Width, this.Size.Height));

                this.StartPosition = FormStartPosition.CenterScreen;

                this.MaximumSize = this.ClientSize;

                init();
            }
        }
예제 #2
0
파일: Form1.cs 프로젝트: lineCode/QUILib
        public Form1()
        {
            InitializeComponent();

            {
                Form form = this;
                mManager = new PaintManagerUI();

                mManager.init(ref form);

                DialogBuilder builder = new DialogBuilder(true);

                mRootNode = builder.createFromFile("skin.xml", null, mManager);
                mManager.attachDialog(ref mRootNode);

                mManager.addNotifier(this);
                this.ClientSize = mManager.getInitSize();
                mRectClient     = new Rectangle(0, 0, mManager.getInitSize().Width, mManager.getInitSize().Height);

                {
                    /***  创建显示缓存对象 ***/
                    mRectClient = new Rectangle(0, 0, mManager.getInitSize().Width, mManager.getInitSize().Height);
                    mManager.getBufferManager().tryAllocateBuffer(mRectClient);
                }

                this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                mRootNode.setPos(new Rectangle(0, 0, this.Size.Width, this.Size.Height));

                this.StartPosition = FormStartPosition.CenterScreen;

                init();
            }
        }
예제 #3
0
        public ComputerExamineUI(PaintManagerUI manager = null)
        {
            DialogBuilder builder          = new DialogBuilder();
            ContainerUI   pComputerExamine = (ContainerUI)builder.createFromFile("ComputerExamine.xml", null, manager);

            builder = null;
            if (pComputerExamine != null)
            {
                this.add(pComputerExamine);
            }
            else
            {
                this.removeAll();
                return;
            }
        }
예제 #4
0
        public Safe360Window()
        {
            ControlUI rootNode;
            Form      form = this;
            {
                {
                    /*** 1. 创建资源管理器并绑定宿主窗体 ***/
                    mManager = new PaintManagerUI();
                    mManager.init(ref form);
                }

                {
                    /*** 2. 创建360安全卫士控件树 ***/
                    DialogBuilder builder = new DialogBuilder(true);
                    C360SafeDialogBuilderCallbackEx builderCallback = new C360SafeDialogBuilderCallbackEx();
                    rootNode = builder.createFromFile("skin.xml", builderCallback, mManager);
                }
                {
                    /*** 3. 绑定控件树、资源管理器、宿主窗体事件侦听器 ***/
                    mManager.attachDialog(ref rootNode);
                    mManager.addNotifier(this);
                    this.ClientSize = mManager.getInitSize();
                }

                {
                    /*** 4. 创建显示缓存对象 ***/
                    mRectClient = new Rectangle(0, 0, mManager.getInitSize().Width, mManager.getInitSize().Height);
                    mManager.getBufferManager().tryAllocateBuffer(mRectClient);
                }


                {
                    /*** 5. 初始化控件变量 ***/
                    init();
                }

                {
                    /*** 6. 初始化窗体显示参数并显示窗体 ***/
                    //this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
                    rootNode.setPos(new Rectangle(0, 0, this.Size.Width, this.Size.Height));
                    this.StartPosition   = FormStartPosition.CenterScreen;
                    this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;

                    this.Show();
                }
            }
        }