home *** CD-ROM | disk | FTP | other *** search
- using System;
- using System.Drawing;
- using System.Collections;
- using System.ComponentModel;
- using System.Windows.Forms;
- using NETXP.Controls.Bars;
-
- namespace Bars
- {
- /// <summary>
- /// Summary description for TestPopup.
- /// </summary>
- public class TestPopup : NETXP.Library.PopupForm
- {
- private NETXP.Controls.Bars.CommandBar commandBar1;
- private NETXP.Controls.Bars.CommandBarButtonItem commandBarButtonItem1;
- private NETXP.Controls.Bars.CommandBarSeparatorItem commandBarSeparatorItem1;
- private NETXP.Controls.Bars.CommandBarButtonItem commandBarButtonItem2;
- private NETXP.Controls.Bars.CommandBarButtonItem commandBarButtonItem3;
- private NETXP.Controls.Bars.CommandBarButtonItem commandBarButtonItem4;
- private System.Windows.Forms.ToolTip toolTip1;
- private System.ComponentModel.IContainer components;
-
- public TestPopup()
- {
- //
- // Required for Windows Form Designer support
- //
- InitializeComponent();
-
- this.commandBarButtonItem1.Click += new EventHandler(commandBarButtonItem1_Click);
- }
-
- public void SetManager(CommandBarManager bm)
- {
- this.commandBar1.Renderer = bm.Renderer;
- }
-
- /// <summary>
- /// Clean up any resources being used.
- /// </summary>
- protected override void Dispose( bool disposing )
- {
- if( disposing )
- {
- if(components != null)
- {
- components.Dispose();
- }
- }
- base.Dispose( disposing );
- }
-
- #region Windows Form Designer generated code
- /// <summary>
- /// Required method for Designer support - do not modify
- /// the contents of this method with the code editor.
- /// </summary>
- private void InitializeComponent()
- {
- this.components = new System.ComponentModel.Container();
- System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(TestPopup));
- this.commandBar1 = new NETXP.Controls.Bars.CommandBar();
- this.commandBarButtonItem1 = new NETXP.Controls.Bars.CommandBarButtonItem();
- this.commandBarSeparatorItem1 = new NETXP.Controls.Bars.CommandBarSeparatorItem();
- this.commandBarButtonItem2 = new NETXP.Controls.Bars.CommandBarButtonItem();
- this.commandBarButtonItem3 = new NETXP.Controls.Bars.CommandBarButtonItem();
- this.commandBarButtonItem4 = new NETXP.Controls.Bars.CommandBarButtonItem();
- this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
- ((System.ComponentModel.ISupportInitialize)(this.commandBar1)).BeginInit();
- this.SuspendLayout();
- //
- // commandBar1
- //
- this.commandBar1.AutoFocus = false;
- this.commandBar1.BackColor = System.Drawing.Color.Transparent;
- this.commandBar1.Cursor = System.Windows.Forms.Cursors.Default;
- this.commandBar1.CustomBackground = true;
- this.commandBar1.CustomizeText = "&Customize Toolbar...";
- this.commandBar1.Dock = System.Windows.Forms.DockStyle.Top;
- this.commandBar1.ID = 548;
- this.commandBar1.Items.AddRange(new NETXP.Controls.Bars.CommandBarItem[] {
- this.commandBarButtonItem1,
- this.commandBarSeparatorItem1,
- this.commandBarButtonItem2});
- this.commandBar1.Location = new System.Drawing.Point(0, 0);
- this.commandBar1.Margins.Bottom = 1;
- this.commandBar1.Margins.Left = 1;
- this.commandBar1.Margins.Right = 1;
- this.commandBar1.Margins.Top = 1;
- this.commandBar1.Name = "commandBar1";
- this.commandBar1.Size = new System.Drawing.Size(168, 41);
- this.commandBar1.TabIndex = 0;
- this.commandBar1.TabStop = false;
- this.commandBar1.Text = "commandBar1";
- //
- // commandBarButtonItem1
- //
- this.commandBarButtonItem1.Image = ((System.Drawing.Image)(resources.GetObject("commandBarButtonItem1.Image")));
- this.commandBarButtonItem1.ShowText = true;
- this.commandBarButtonItem1.Text = "Test";
- //
- // commandBarButtonItem2
- //
- this.commandBarButtonItem2.Image = ((System.Drawing.Image)(resources.GetObject("commandBarButtonItem2.Image")));
- this.commandBarButtonItem2.Items.AddRange(new NETXP.Controls.Bars.CommandBarItem[] {
- this.commandBarButtonItem3,
- this.commandBarButtonItem4});
- this.commandBarButtonItem2.Text = "Abc";
- this.commandBarButtonItem2.Click += new System.EventHandler(this.commandBarButtonItem2_Click);
- //
- // commandBarButtonItem3
- //
- this.commandBarButtonItem3.Text = "Test1";
- //
- // commandBarButtonItem4
- //
- this.commandBarButtonItem4.Text = "Test2";
- //
- // TestPopup
- //
- this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
- this.BackColor = System.Drawing.SystemColors.Window;
- this.ClientSize = new System.Drawing.Size(168, 96);
- this.Controls.Add(this.commandBar1);
- this.Name = "TestPopup";
- this.Paint += new System.Windows.Forms.PaintEventHandler(this.TestPopup_Paint);
- ((System.ComponentModel.ISupportInitialize)(this.commandBar1)).EndInit();
- this.ResumeLayout(false);
-
- }
- #endregion
-
- private void TestPopup_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
- {
- e.Graphics.DrawRectangle(SystemPens.WindowFrame, 0, 0, Width-1, Height-1);
- }
-
- private void commandBarButtonItem1_Click(object sender, EventArgs e)
- {
- Close();
- }
-
- private void commandBarButtonItem2_Click(object sender, System.EventArgs e)
- {
- }
- }
- }
-