protected override void AssertControlDockedInForm(IControlHabanero control, IControlHabanero form)
        {
            Assert.AreEqual(1, form.Controls.Count, "No container control found in form");
            IControlHabanero splitCntrl = form.Controls[0];

            Assert.IsInstanceOf(typeof(ISplitContainer), splitCntrl);
            Gizmox.WebGUI.Forms.SplitContainer splitContainerVWG = (Gizmox.WebGUI.Forms.SplitContainer)splitCntrl;

            Gizmox.WebGUI.Forms.SplitterPanel panel2 = splitContainerVWG.Panel2;
            Assert.AreEqual(1, panel2.Controls.Count);
            IControlHabanero editorControl = (IControlHabanero)panel2.Controls[0];

            Assert.IsInstanceOf(typeof(IMainEditorPanel), editorControl);
            IMainEditorPanel mainEditorPanel = (IMainEditorPanel)editorControl;
            IControlHabanero contentControl  = mainEditorPanel.EditorPanel;

            Assert.AreEqual(1, contentControl.Controls.Count);
            Assert.AreSame(control, contentControl.Controls[0]);
            Assert.AreEqual(Habanero.Faces.Base.DockStyle.Fill, control.Dock);
        }
        public virtual void Test_DockMenuInForm_ShouldSetUpSplitterPanels()
        {
            //---------------Set up test pack-------------------
            HabaneroMenu habaneroMenu = CreateHabaneroMenuFullySetup();
            HabaneroMenu submenu      = habaneroMenu.AddSubMenu(TestUtil.GetRandomString());

            submenu.AddMenuItem(TestUtil.GetRandomString());
            IMenuBuilder      menuBuilder = CreateMenuBuilder();
            IControlHabanero  form        = habaneroMenu.Form;
            IMainMenuHabanero menu        = menuBuilder.BuildMainMenu(habaneroMenu);

            form.Size = new Size(460, 900);
            //-------------Assert Preconditions -------------
            Assert.IsFalse(IsMenuDocked(menu, form));
            //---------------Execute Test ----------------------
            menu.DockInForm(form);
            //---------------Test Result -----------------------
            IControlHabanero control = form.Controls[0];

            Assert.IsInstanceOf(typeof(ISplitContainer), control);
            Gizmox.WebGUI.Forms.SplitContainer splitContainerVWG = (Gizmox.WebGUI.Forms.SplitContainer)control;
            Gizmox.WebGUI.Forms.SplitterPanel  panel1            = splitContainerVWG.Panel1;
            Assert.AreEqual(250, panel1.Width);
            Assert.AreEqual(1, panel1.Controls.Count);
            IControlHabanero menuControl = (IControlHabanero)panel1.Controls[0];

            Assert.IsInstanceOf(typeof(ICollapsiblePanelGroupControl), menuControl);
            panel1.Size = new Size(121, 333);
            Assert.AreEqual(panel1.Width, menuControl.Width);

            Gizmox.WebGUI.Forms.SplitterPanel panel2 = splitContainerVWG.Panel2;
            Assert.AreEqual(1, panel2.Controls.Count);
            IControlHabanero editorControl = (IControlHabanero)panel2.Controls[0];

            Assert.IsInstanceOf(typeof(MainEditorPanelVWG), editorControl);
            panel2.Size = new Size(321, 514);
            Assert.AreEqual(panel2.Width, editorControl.Width);
            Assert.AreEqual(panel2.Height, editorControl.Height);
        }
예제 #3
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.ReportPanel = new Gizmox.WebGUI.Forms.Panel();
     this.Edit = new Gizmox.WebGUI.Forms.Button();
     this.splitContainer1 = new Gizmox.WebGUI.Forms.SplitContainer();
     this.IMAGE = new Gizmox.WebGUI.Forms.Button();
     this.WORD = new Gizmox.WebGUI.Forms.Button();
     this.EXCEL = new Gizmox.WebGUI.Forms.Button();
     this.linkLabel2 = new Gizmox.WebGUI.Forms.LinkLabel();
     this.linkLabel1 = new Gizmox.WebGUI.Forms.LinkLabel();
     this.PDF = new Gizmox.WebGUI.Forms.Button();
     this.Upload = new Gizmox.WebGUI.Forms.Button();
     this.groupBox1 = new Gizmox.WebGUI.Forms.GroupBox();
     this.radioButton2 = new Gizmox.WebGUI.Forms.RadioButton();
     this.MSMODE = new Gizmox.WebGUI.Forms.RadioButton();
     this.RenderReport = new Gizmox.WebGUI.Forms.Button();
     this.groupBox2 = new Gizmox.WebGUI.Forms.GroupBox();
     this.groupBox1.SuspendLayout();
     this.groupBox2.SuspendLayout();
     this.SuspendLayout();
     //
     // ReportPanel
     //
     this.ReportPanel.BackColor = System.Drawing.Color.White;
     this.ReportPanel.Cursor = Gizmox.WebGUI.Forms.Cursors.Hand;
     this.ReportPanel.Dock = Gizmox.WebGUI.Forms.DockStyle.Fill;
     this.ReportPanel.Location = new System.Drawing.Point(3, 17);
     this.ReportPanel.Name = "ReportPanel";
     this.ReportPanel.Size = new System.Drawing.Size(1183, 674);
     this.ReportPanel.TabIndex = 0;
     //
     // Edit
     //
     this.Edit.Location = new System.Drawing.Point(275, 10);
     this.Edit.Name = "Edit";
     this.Edit.Size = new System.Drawing.Size(90, 28);
     this.Edit.TabIndex = 2;
     this.Edit.Text = "Edit Report";
     this.Edit.UseVisualStyleBackColor = true;
     this.Edit.Click += new System.EventHandler(this.Edit_Click);
     //
     // splitContainer1
     //
     this.splitContainer1.AutoValidate = Gizmox.WebGUI.Forms.AutoValidate.EnablePreventFocusChange;
     this.splitContainer1.Dock = Gizmox.WebGUI.Forms.DockStyle.Fill;
     this.splitContainer1.IsSplitterFixed = true;
     this.splitContainer1.Location = new System.Drawing.Point(0, 0);
     this.splitContainer1.Name = "splitContainer1";
     this.splitContainer1.Orientation = Gizmox.WebGUI.Forms.Orientation.Horizontal;
     //
     // splitContainer1.Panel1
     //
     this.splitContainer1.Panel1.BackColor = System.Drawing.Color.White;
     this.splitContainer1.Panel1.Controls.Add(this.IMAGE);
     this.splitContainer1.Panel1.Controls.Add(this.WORD);
     this.splitContainer1.Panel1.Controls.Add(this.EXCEL);
     this.splitContainer1.Panel1.Controls.Add(this.linkLabel2);
     this.splitContainer1.Panel1.Controls.Add(this.linkLabel1);
     this.splitContainer1.Panel1.Controls.Add(this.PDF);
     this.splitContainer1.Panel1.Controls.Add(this.Upload);
     this.splitContainer1.Panel1.Controls.Add(this.groupBox1);
     this.splitContainer1.Panel1.Controls.Add(this.RenderReport);
     this.splitContainer1.Panel1.Controls.Add(this.Edit);
     //
     // splitContainer1.Panel2
     //
     this.splitContainer1.Panel2.Controls.Add(this.groupBox2);
     this.splitContainer1.Size = new System.Drawing.Size(1189, 736);
     this.splitContainer1.SplitterDistance = 41;
     this.splitContainer1.SplitterWidth = 1;
     this.splitContainer1.TabIndex = 2;
     //
     // IMAGE
     //
     this.IMAGE.Location = new System.Drawing.Point(757, 10);
     this.IMAGE.Name = "IMAGE";
     this.IMAGE.Size = new System.Drawing.Size(90, 28);
     this.IMAGE.TabIndex = 7;
     this.IMAGE.Text = "TIFF Download";
     this.IMAGE.UseVisualStyleBackColor = true;
     this.IMAGE.Click += new System.EventHandler(this.IMAGE_Click);
     //
     // WORD
     //
     this.WORD.Location = new System.Drawing.Point(661, 10);
     this.WORD.Name = "WORD";
     this.WORD.Size = new System.Drawing.Size(90, 28);
     this.WORD.TabIndex = 6;
     this.WORD.Text = "DOC Download";
     this.WORD.UseVisualStyleBackColor = true;
     this.WORD.Click += new System.EventHandler(this.WORD_Click);
     //
     // EXCEL
     //
     this.EXCEL.Location = new System.Drawing.Point(564, 10);
     this.EXCEL.Name = "EXCEL";
     this.EXCEL.Size = new System.Drawing.Size(90, 28);
     this.EXCEL.TabIndex = 5;
     this.EXCEL.Text = "XLS Download";
     this.EXCEL.UseVisualStyleBackColor = true;
     this.EXCEL.Click += new System.EventHandler(this.EXCEL_Click);
     //
     // linkLabel2
     //
     this.linkLabel2.AutoSize = true;
     this.linkLabel2.ClientMode = false;
     this.linkLabel2.LinkColor = System.Drawing.Color.Black;
     this.linkLabel2.Location = new System.Drawing.Point(853, 23);
     this.linkLabel2.Name = "linkLabel2";
     this.linkLabel2.Size = new System.Drawing.Size(53, 13);
     this.linkLabel2.TabIndex = 9;
     this.linkLabel2.TabStop = true;
     this.linkLabel2.Text = "Download Acrobat Viewer";
     this.linkLabel2.Url = "http://get.adobe.com/de/reader/";
     //
     // linkLabel1
     //
     this.linkLabel1.AutoSize = true;
     this.linkLabel1.ClientMode = false;
     this.linkLabel1.LinkColor = System.Drawing.Color.Black;
     this.linkLabel1.Location = new System.Drawing.Point(853, 10);
     this.linkLabel1.Name = "linkLabel1";
     this.linkLabel1.Size = new System.Drawing.Size(53, 13);
     this.linkLabel1.TabIndex = 8;
     this.linkLabel1.TabStop = true;
     this.linkLabel1.Text = "Download Report Builder 2";
     this.linkLabel1.Url = "http://www.microsoft.com/downloads/details.aspx?familyid=9f783224-9871-4eea-b1d5-" +
     "f3140a253db6&displaylang=en";
     //
     // PDF
     //
     this.PDF.Location = new System.Drawing.Point(467, 10);
     this.PDF.Name = "PDF";
     this.PDF.Size = new System.Drawing.Size(90, 28);
     this.PDF.TabIndex = 4;
     this.PDF.Text = "PDF Download";
     this.PDF.UseVisualStyleBackColor = true;
     this.PDF.Click += new System.EventHandler(this.PDF_Click);
     //
     // Upload
     //
     this.Upload.Location = new System.Drawing.Point(371, 10);
     this.Upload.Name = "Upload";
     this.Upload.Size = new System.Drawing.Size(90, 28);
     this.Upload.TabIndex = 3;
     this.Upload.Text = "Upload Report";
     this.Upload.UseVisualStyleBackColor = true;
     this.Upload.Click += new System.EventHandler(this.Upload_Click);
     //
     // groupBox1
     //
     this.groupBox1.Controls.Add(this.radioButton2);
     this.groupBox1.Controls.Add(this.MSMODE);
     this.groupBox1.FlatStyle = Gizmox.WebGUI.Forms.FlatStyle.Flat;
     this.groupBox1.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.groupBox1.ForeColor = System.Drawing.Color.Black;
     this.groupBox1.Location = new System.Drawing.Point(3, 3);
     this.groupBox1.Name = "groupBox1";
     this.groupBox1.Size = new System.Drawing.Size(170, 35);
     this.groupBox1.TabIndex = 0;
     this.groupBox1.TabStop = false;
     this.groupBox1.Text = "Viewer Type";
     //
     // radioButton2
     //
     this.radioButton2.AutoSize = true;
     this.radioButton2.Checked = true;
     this.radioButton2.Location = new System.Drawing.Point(84, 13);
     this.radioButton2.Name = "radioButton2";
     this.radioButton2.Size = new System.Drawing.Size(80, 17);
     this.radioButton2.TabIndex = 0;
     this.radioButton2.TabStop = false;
     this.radioButton2.Text = "PDF Report";
     this.radioButton2.UseVisualStyleBackColor = true;
     //
     // MSMODE
     //
     this.MSMODE.AutoSize = true;
     this.MSMODE.Location = new System.Drawing.Point(3, 13);
     this.MSMODE.Name = "MSMODE";
     this.MSMODE.Size = new System.Drawing.Size(75, 17);
     this.MSMODE.TabIndex = 0;
     this.MSMODE.TabStop = false;
     this.MSMODE.Text = "MS Report";
     this.MSMODE.UseVisualStyleBackColor = true;
     //
     // RenderReport
     //
     this.RenderReport.Location = new System.Drawing.Point(179, 10);
     this.RenderReport.Name = "RenderReport";
     this.RenderReport.Size = new System.Drawing.Size(90, 28);
     this.RenderReport.TabIndex = 1;
     this.RenderReport.Text = "View Report";
     this.RenderReport.UseVisualStyleBackColor = true;
     this.RenderReport.Click += new System.EventHandler(this.RenderClick);
     //
     // groupBox2
     //
     this.groupBox2.BackColor = System.Drawing.Color.White;
     this.groupBox2.Controls.Add(this.ReportPanel);
     this.groupBox2.Dock = Gizmox.WebGUI.Forms.DockStyle.Fill;
     this.groupBox2.FlatStyle = Gizmox.WebGUI.Forms.FlatStyle.Flat;
     this.groupBox2.Font = new System.Drawing.Font("Tahoma", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.groupBox2.ForeColor = System.Drawing.Color.Black;
     this.groupBox2.Location = new System.Drawing.Point(0, 0);
     this.groupBox2.Name = "groupBox2";
     this.groupBox2.Size = new System.Drawing.Size(1189, 694);
     this.groupBox2.TabIndex = 1;
     this.groupBox2.TabStop = false;
     this.groupBox2.Text = "Preview";
     //
     // Form1
     //
     this.BackColor = System.Drawing.Color.WhiteSmoke;
     this.Controls.Add(this.splitContainer1);
     this.FormBorderStyle = Gizmox.WebGUI.Forms.FormBorderStyle.Sizable;
     this.Size = new System.Drawing.Size(1189, 736);
     this.Text = "Form1";
     this.groupBox1.ResumeLayout(false);
     this.groupBox2.ResumeLayout(false);
     this.ResumeLayout(false);
 }