コード例 #1
0
ファイル: Form1.cs プロジェクト: jash-git/CS_OutlookBar
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //

            OutlookBar outlookBar = new OutlookBar();

            outlookBar.Location    = new Point(0, 0);
            outlookBar.Size        = new Size(150, this.ClientSize.Height);
            outlookBar.BorderStyle = BorderStyle.FixedSingle;
            Controls.Add(outlookBar);
            outlookBar.Initialize();

            IconPanel iconPanel1 = new IconPanel();
            IconPanel iconPanel2 = new IconPanel();
            IconPanel iconPanel3 = new IconPanel();

            outlookBar.AddBand("Outlook Shortcuts", iconPanel1);
            outlookBar.AddBand("My Shortcuts", iconPanel2);
            outlookBar.AddBand("Other Shortcuts", iconPanel3);

            iconPanel1.AddIcon("Outlook Today", Image.FromFile("img1.ico"), new EventHandler(PanelEvent));
            iconPanel1.AddIcon("Calendar", Image.FromFile("img2.ico"), new EventHandler(PanelEvent));
            iconPanel1.AddIcon("Contacts", Image.FromFile("img3.ico"), new EventHandler(PanelEvent));
            iconPanel1.AddIcon("Tasks", Image.FromFile("img4.ico"), new EventHandler(PanelEvent));
            outlookBar.SelectBand(0);
        }
コード例 #2
0
ファイル: Form1.cs プロジェクト: jash-git/CS_OutlookBar
 /// <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.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
     this.outlookBar1 = new OutlookBar();
     this.imageList1  = new System.Windows.Forms.ImageList(this.components);
     this.SuspendLayout();
     //
     // outlookBar1
     //
     this.outlookBar1.AutoScroll   = true;
     this.outlookBar1.BorderStyle  = System.Windows.Forms.BorderStyle.FixedSingle;
     this.outlookBar1.ButtonHeight = 25;
     this.outlookBar1.Dock         = System.Windows.Forms.DockStyle.Fill;
     this.outlookBar1.Location     = new System.Drawing.Point(0, 0);
     this.outlookBar1.Name         = "outlookBar1";
     this.outlookBar1.SelectedBand = 0;
     this.outlookBar1.Size         = new System.Drawing.Size(304, 259);
     this.outlookBar1.TabIndex     = 0;
     //
     // imageList1
     //
     this.imageList1.ImageStream      = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList1.ImageStream")));
     this.imageList1.TransparentColor = System.Drawing.Color.Transparent;
     this.imageList1.Images.SetKeyName(0, "home.png");
     this.imageList1.Images.SetKeyName(1, "envelope.png");
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(8, 23);
     this.ClientSize        = new System.Drawing.Size(304, 259);
     this.Controls.Add(this.outlookBar1);
     this.Font    = new System.Drawing.Font("мšÃ÷ów", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(136)));
     this.Name    = "Form1";
     this.Text    = "Form1";
     this.Load   += new System.EventHandler(this.Form1_Load);
     this.Resize += new System.EventHandler(this.Form1_Resize);
     this.ResumeLayout(false);
 }
コード例 #3
0
ファイル: OutlookBar.cs プロジェクト: jash-git/CS_OutlookBar
 public BandTagInfo(OutlookBar ob, int index)
 {
     outlookBar = ob;
     this.index = index;
 }