iSpyApplication.Controls.FloorPlanControl.GetButtonByIndex C# (CSharp) Method

GetButtonByIndex() private method

private GetButtonByIndex ( int buttonIndex, Rectangle &destRect ) : Rectangle
buttonIndex int
destRect System.Drawing.Rectangle
return System.Drawing.Rectangle
        private Rectangle GetButtonByIndex(int buttonIndex, out Rectangle destRect)
        {
            Rectangle rSrc = Rectangle.Empty;
            switch (buttonIndex)
            {
                case 0://edit
                    rSrc = MainForm.REdit;
                    break;
                case 1://web
                    rSrc = Helper.HasFeature(Enums.Features.Access_Media) ? MainForm.RWeb : MainForm.RWebOff;
                    break;
            }

            if (MainForm.Conf.BigButtons)
            {
                rSrc.X -= 2;
                rSrc.Width += 8;
                rSrc.Height += 8;
            }

            destRect = new Rectangle(ButtonPanel.X + buttonIndex * (rSrc.Width + 5) + 5, Height - 25 - rSrc.Height - 6, rSrc.Width, rSrc.Height);
            return rSrc;
        }