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(); } }
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(); } }
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(); } } }