Cabster/Components/FormLayout.cs
/// <summary>
///     Inicializa os componentes da janela.
/// </summary>
Inicializa os componentes da janela.
Inicializa os componentes da janela .
private void InitializeComponent2()
        {
            if (!Environment.IsDesign)
            {
                SetStyle(
                    ControlStyles.AllPaintingInWmPaint |
                    ControlStyles.UserPaint |
                    ControlStyles.DoubleBuffer,
                    true);
                TopMost = LockScreen.IsLocked;
                ShowButtonMinimize = false;
            }
            AdjustLogo();
            labelTitle.MakeAbleToMoveForm();
            buttonResize.MakeAbleToResizeForm();
            HandleCreated += (sender, args) => toolTip.TranslateToolTip();
            Load += (sender, args) =>
            {
                labelTitle.Text = Text;
                Icon = Resources.IconSapiensia;
            };
            Resize += (sender, args) =>
            {
                buttonResize.Left = Width - buttonResize.Width;
                buttonResize.Top = Height - buttonResize.Height;
                const int padding = 10;
                buttonNotification.Height = labelStatus.Height;
                buttonNotification.Top = Height - buttonNotification.Height - padding;
                buttonNotification.Left = padding;
                labelStatus.Top = buttonNotification.Top;
                labelStatus.Left = buttonNotification.Right + padding / 2;
                labelStatus.Width = Width - buttonResize.Width - labelStatus.Left;
            };
            Shown += (sender, args) => BringToFront();
        }
private void InitializeComponent2 ( ) { if ( ! Environment . IsDesign ) { SetStyle ( ControlStyles . AllPaintingInWmPaint | ControlStyles . UserPaint | ControlStyles . DoubleBuffer , true ) ; TopMost = LockScreen . IsLocked ; ShowButtonMinimize = false ; } AdjustLogo ( ) ; labelTitle . MakeAbleToMoveForm ( ) ; buttonResize . MakeAbleToResizeForm ( ) ; HandleCreated += ( sender , args ) => toolTip . TranslateToolTip ( ) ; Load += ( sender , args ) => { labelTitle . Text = Text ; Icon = Resources . IconSapiensia ; } ; Resize += ( sender , args ) => { buttonResize . Left = Width - buttonResize . Width ; buttonResize . Top = Height - buttonResize . Height ; const int padding = 10 ; buttonNotification . Height = labelStatus . Height ; buttonNotification . Top = Height - buttonNotification . Height - padding ; buttonNotification . Left = padding ; labelStatus . Top = buttonNotification . Top ; labelStatus . Left = buttonNotification . Right + padding / 2 ; labelStatus . Width = Width - buttonResize . Width - labelStatus . Left ; } ; Shown += ( sender , args ) => BringToFront ( ) ; }
Inicializa os componentes da janela.
Inicializa os componentes da janela .