public PanelIcon(IconPanel parent, int index, EventHandler onClickEvent,String name)
        {
            this.index = index;
            this.iconPanel = parent;
            this.Image = Image.FromFile("images/normal/" + name+".png");

            Visible = true;
            Location = new Point(iconPanel.outlookBar.Size.Width / 2 - Image.Size.Width / 2,
                            iconPanel.Margin + index * iconPanel.IconSpacing);
            this.name = name;
            Size = Image.Size;
            Click += onClickEvent;
            Tag = this;

            MouseEnter += new EventHandler(OnMouseEnter);
            MouseLeave += new EventHandler(OnMouseLeave);
            MouseMove += new MouseEventHandler(OnMouseMove);

            bckgColor = iconPanel.BackColor;
            mouseEnter = false;
        }
Пример #2
0
        public Form1()
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            //
            // TODO: Add any constructor code after InitializeComponent call
            //
            outlookBar.Location=new Point(0, 0);
            outlookBar.Size=new Size(150, this.ClientSize.Height);
            outlookBar.BorderStyle=BorderStyle.FixedSingle;

            outlookBar.Initialize();

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

            outlookBar.AddBand("Stammdaten", iconPanel1);
            outlookBar.AddBand("Stundeneingabe", iconPanel2);
            outlookBar.AddBand("Berichte", iconPanel3);

            iconPanel1.setColor(Color.LightBlue);
            iconPanel1.AddIcon("Mitarbeiterdaten",  new EventHandler(PanelEvent));
            iconPanel1.AddIcon("Projektdaten",  new EventHandler(PanelEvent));
            iconPanel1.AddIcon("Arbeitszeitmodelle",  new EventHandler(PanelEvent));

            iconPanel2.setColor(Color.LightBlue);
            iconPanel2.AddIcon("Produktive Stunden",  new EventHandler(PanelEvent));
            iconPanel2.AddIcon("Unproduktive Stunden",  new EventHandler(PanelEvent));
            iconPanel2.AddIcon("Fremdleistungen",  new EventHandler(PanelEvent));

            iconPanel3.setColor(Color.LightBlue);
            iconPanel3.AddIcon("Mitarbeiterübersicht",  new EventHandler(PanelEvent));
            //iconPanel2.AddIcon("Produktivstundenübersicht", new EventHandler(PanelEvent));
            //iconPanel2.AddIcon("Unproduktivstundenübersicht",  new EventHandler(PanelEvent));
            iconPanel3.AddIcon("Projektübersicht",  new EventHandler(PanelEvent));
            iconPanel3.AddIcon("Projektdetails",  new EventHandler(PanelEvent));
            iconPanel3.AddIcon("Abteilungsübersicht",  new EventHandler(PanelEvent));
            iconPanel3.AddIcon("Fremdleistungsübersicht",  new EventHandler(PanelEvent));

            outlookBar.SelectBand(0);
        }