/// <summary> /// 获取设计器的预览框 /// </summary> //public WebBrowser WebBrowser //{ // get { return previewBrowser; } //} #endregion #region 构造函数与Form的初始化 /// <summary> /// 页面片设计器 /// </summary> public MdiSnipDesignerForm(string tmpltID, string snipID) { ///赋初值 /// _snipId = snipID; _tmpltID = tmpltID; InitializeComponent(); ///从所属的模板窗体里获取当前页面片的XmlElement。 _ownerTmpltForm = Service.Workbench.GetWorkDocumentById(tmpltID, WorkDocumentType.TmpltDesigner) as MdiTmpltDesignForm; if (_ownerTmpltForm == null) { Debug.Fail("此页面片对应的模板窗口不存在。"); return; } ///通过所属的模板窗口和传入的SnipID,获得SnipXmlElement SnipElement = _ownerTmpltForm.TmpltDoc.GetSnipElementById(_snipId); ///通过SnipXmlElement创建DesignerPanel(DesignerPanel构造函数将创建SnipPageDesigner) this._designerPanel = new DesignerPanel(_ownerTmpltForm.TmpltDoc.HasAutoKeyWordsSequenceType); this._designerPanel.BackColor = SoftwareOption.SnipDesigner.FormBackColor;// System.Drawing.Color.DarkGray; this._designerPanel.Dock = System.Windows.Forms.DockStyle.Fill; this._designerPanel.Location = new System.Drawing.Point(0, 0); this._designerPanel.Name = "workPanel"; this._designerPanel.Size = new System.Drawing.Size(747, 528); this._designerPanel.TabIndex = 0; this._designerPanel.Text = "designerPanel1"; this.SnipPageDesigner.MouseDoubleClick += new MouseEventHandler(SnipPageDesigner_MouseDoubleClick); this.SnipPageDesigner.SelectedPartsChanged += new EventHandler(SnipPageDesigner_SelectedPartsChanged); this.Controls.Add(this._designerPanel); ///导航栏的初始化 this.BottomNavigation = new NavigationStrip(); this.BottomNavigation.Dock = DockStyle.Bottom; this.BottomNavigation.NavigateTarget = this.SnipPageDesigner; this.Controls.Add(this.BottomNavigation); this.ShowIcon = true; this.Icon = Icon.FromHandle(ResourceService.GetResourceImage("tree.img.SnipPage2").GetHicon()); _timer.Interval = 100; _timer.Tick += new EventHandler(_timer_Tick); SnipPageDesigner.Load(SnipElement); Text = SnipPageDesigner.Text; SnipPageDesigner.DesignerReseted += new EventHandler(SnipPageDesigner_DesignerReseted); SnipPageDesigner.PartsLayouted += new EventHandler(SnipPageDesigner_PartsLayouted); this.SizeChanged += new EventHandler(MdiSnipDesignerForm_SizeChanged); // add by fenggy 2006-06-13 增加处理PART定位的函数 SdsiteXmlDocument.OrientationPart += new EventHandler <EventArgs <string[]> >(SdsiteXmlDocument_OrientationPart); // add by fenggy 2006-06-17 更改FORM的TEXT SdsiteXmlDocument.SnipDesignerFormTextChange += new EventHandler <EventArgs <string[]> >(SdsiteXmlDocument_SnipDesignerFormTextChange); }
public iosForm() { InitializeComponent(); //this.Dock = DockStyle.Fill; this.NavigationPanel.Width = this.Width; this.NavigationPanel.Top = 0; this.NavigationPanel.Left = 0; this.MainPanel.Top = this.NavigationPanel.Height; this.MainPanel.Height = this.Height - this.NavigationPanel.Height - this.ButtonPanel.Height; this.ButtonPanel.Top = this.NavigationPanel.Height + this.MainPanel.Height; //te gjithe user-controls qe trashegojne nga TranslatePanel shtohen tek ScreenManager a = new ScreenManager(new TranslatePanel[] { log, menuPanel, kurs, sb, imp, ark, mgj, tgj }); //keto user-controls shtohen tek nderfaqja this.MainPanel.Controls.Add(log); this.MainPanel.Controls.Add(menuPanel); this.MainPanel.Controls.Add(kurs); this.MainPanel.Controls.Add(sb); this.MainPanel.Controls.Add(imp); this.MainPanel.Controls.Add(ark); this.MainPanel.Controls.Add(mgj); this.MainPanel.Controls.Add(tgj); //te gjithe nderfaqet behen invisible, pervec asaj te log-in for (int i = 0; i < MainPanel.Controls.Count; i++) { MainPanel.Controls[i].Visible = false; } log.Visible = true; nav = new NavigationStrip() { Dock = DockStyle.Fill, RightButtonVisibility = false, LeftButtonVisibility = false, Text = "" }; //naviation strip ne pjesen e siperme this.NavigationPanel.Controls.Add(nav); this.nav.LeftButtonClick += new EventHandler(nav_LeftButtonClick); this.nav.RightButtonClick += new EventHandler(nav_RightButtonClick); //fillimisht kalojme tek forma e login a.ShiftTo(log); this.nav.Text = "MyExchange"; this.postBtn.Visible = true; this.postBtn.Text = "Hyrje"; this.nav.LeftButtonVisibility = false; this.nav.RightButtonVisibility = false; programState = 1; }
private void PreInitializeComponent() { this.mobjNavigation = new NavigationStrip(); }