Exemple #1
0
        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);
        }
Exemple #2
0
 private void Form1_Load(object sender, EventArgs e)
 {
     outlookBar1.Initialize();
     CreateMenu();
     outlookBar1.SelectBand(2);
 }