Пример #1
0
        protected override void InitControl()
        {
            base.InitControl();

            this.Bounds = new Rectangle(0, 0, 240, 26);

            lblPrimary = new FluidLabel("", 20, 0, 220, 20);
            lblPrimary.LineAlignment = StringAlignment.Near;
            lblPrimary.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            lblPrimary.Font = Theme.Current.ListPrimaryFont;
            Controls.Add(lblPrimary);

            lblSecondary = new FluidLabel("", 20, 14, 220, 14);
            lblSecondary.LineAlignment = StringAlignment.Near;
            lblSecondary.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
            lblSecondary.Font = Theme.Current.ListSecondaryFont;
            lblSecondary.ForeColor = Theme.Current.ListSecondaryForeColor;
            Controls.Add(lblSecondary);

            image = new FluidButton("", 2, 3, 16, 16);
            image.Anchor = AnchorStyles.None;
            image.BackColor = Color.Transparent;
            image.Shape = ButtonShape.Flat;
            //image.Image = Resources.Folder;
            image.Enabled = false;
            Controls.Add(image);
        }
Пример #2
0
        protected override void InitControl()
        {
            base.InitControl();
            BackColor = Color.White;
            Anchor = System.Windows.Forms.AnchorStyles.None;

            lblFolder = new FluidLabel();
            lblFolder.Bounds = new Rectangle(10, 10, 240, 35);
            lblFolder.Font = new Font(FontFamily.GenericSerif, 9, FontStyle.Regular);
            Controls.Add(lblFolder);

            lblFile = new FluidLabel();
            lblFile.Bounds = new Rectangle(10, 40, 240, 20);
            lblFile.Font = new Font(FontFamily.GenericSerif, 9, FontStyle.Bold);
            Controls.Add(lblFile);

            lblSent = new FluidLabel();
            lblSent.Bounds = new Rectangle(10, 65, 180, 20);
            lblSent.Font = new Font(FontFamily.GenericSerif, 9, FontStyle.Regular);
            Controls.Add(lblSent);

            lblRecieved = new FluidLabel();
            lblRecieved.Bounds = new Rectangle(10, 80, 180, 20);
            lblRecieved.Font = new Font(FontFamily.GenericSerif, 9, FontStyle.Regular);
            Controls.Add(lblRecieved);

            UpdateStatus += new EventHandler(OnStatusUpdate);

            OnStatusUpdate(this, null);
        }
Пример #3
0
 private void EnsureAnimLabel()
 {
     if (animLabel == null)
     {
         FluidLabel l = new FluidLabel("", Width, 0, Width, Height);
         animLabel       = l;
         l.ShadowColor   = Color.Black;
         l.LineAlignment = StringAlignment.Center;
         l.Alignment     = StringAlignment.Center;
         l.Visible       = false;
         controls.Insert(0, l);
     }
 }
Пример #4
0
        public TextInputPanel(string labelText, int x, int y, int w, int h)
            : base(x, y, w, h)
        {
            Bounds = new System.Drawing.Rectangle(x, y, w, h);

            lblTitle = new FluidLabel(labelText, 10, 5, w - 20, 30);
            lblTitle.ForeColor = Color.White;
            lblTitle.Anchor = AnchorBL;
            lblTitle.Font = Theme.Current.ModalFont;
            Controls.Add(lblTitle);

            txtData = new FluidTextBox("", 10, 25, w - 20, 30);
            txtData.ForeColor = Color.Black;
            txtData.Anchor = AnchorBL;
            txtData.Font = Theme.Current.ModalFont;
            Controls.Add(txtData);

            btnOK = new FluidButton("OK", 10, 65, 80, 32);
            btnOK.BackColor = Color.Green;
            btnOK.GradientFill = Theme.Current.ButtonsGradianted;
            btnOK.Font = Theme.Current.ButtonFont;
            btnOK.Anchor = AnchorBL;
            btnOK.Click += new EventHandler(btnOK_click);
            Controls.Add(btnOK);

            btnKeyboard = new FluidButton("", 100, 65, 40, 32);
            btnKeyboard.Image = Resources.keyboard;
            btnKeyboard.BackColor = Color.White;
            btnKeyboard.Click += new EventHandler(btnKeyboard_Click);
            btnKeyboard.Anchor = AnchorBL;
            Controls.Add(btnKeyboard);

            btnCancel = new FluidButton("Cancel", 150, 65, 80, 32);
            btnCancel.BackColor = Color.Red;
            btnCancel.GradientFill = Theme.Current.ButtonsGradianted;
            btnCancel.Anchor = AnchorBL;
            btnCancel.Click += new EventHandler(btnCancel_click);
            Controls.Add(btnCancel);

            modalBackground = new ModalBackground();
            modalBackground.ShowMaximized();
            Anchor = AnchorAll;

            Show();
        }
Пример #5
0
        protected override void InitControl()
        {
            base.InitControl();
            Bounds             = new Rectangle(0, 0, 240, 100);
            BackColor          = Color.Black;
            ForeColor          = Color.White;
            GradientFill       = true;
            GradientFillOffset = 24;
            EnableDoubleBuffer = true;
            FluidButton okBtn = new FluidButton("OK", 8, 68, 100, 24);

            okBtn.ForeColor = Color.White;
            okBtn.Anchor    = AnchorBL;
            this.okBtn      = okBtn;
            okBtn.BackColor = Color.Green;
            okBtn.Click    += new EventHandler(okBtn_Click);

            FluidButton cancelBtn = new FluidButton("Cancel", 240 - 100 - 8, 68, 100, 24);

            this.cancelBtn      = cancelBtn;
            cancelBtn.ForeColor = Color.White;
            cancelBtn.Anchor    = AnchorBR;
            cancelBtn.BackColor = Color.Red;
            cancelBtn.Click    += new EventHandler(cancelBtn_Click);
            Visible             = false;

            FluidLabel textLabel = new FluidLabel("", 4, 12, Width - 8, 68 - 12 - 4);

            textLabel.Format.FormatFlags = 0;
            textLabel.Anchor             = AnchorAll;
            textLabel.LineAlignment      = StringAlignment.Center;
            textLabel.Alignment          = StringAlignment.Center;
            this.textLabel = textLabel;

            Controls.Add(textLabel);
            Controls.Add(okBtn);
            Controls.Add(cancelBtn);
        }
Пример #6
0
        protected override void InitControl()
        {
            base.InitControl();
            Bounds = new Rectangle(0, 0, 240, 100);
            BackColor = Color.Black;
            ForeColor = Color.White;
            GradientFill = true;
            GradientFillOffset = 24;
            EnableDoubleBuffer = true;
            FluidButton okBtn = new FluidButton("OK", 8, 68, 100, 24);
            okBtn.ForeColor = Color.White;
            okBtn.Anchor = AnchorBL;
            this.okBtn = okBtn;
            okBtn.BackColor = Color.Green;
            okBtn.Click += new EventHandler(okBtn_Click);

            FluidButton cancelBtn = new FluidButton("Cancel", 240 - 100 - 8, 68, 100, 24);
            this.cancelBtn = cancelBtn;
            cancelBtn.ForeColor = Color.White;
            cancelBtn.Anchor = AnchorBR;
            cancelBtn.BackColor = Color.Red;
            cancelBtn.Click += new EventHandler(cancelBtn_Click);
            Visible = false;

            FluidLabel textLabel = new FluidLabel("", 4, 12, Width - 8, 68 - 12 - 4);
            textLabel.Format.FormatFlags = 0;
            textLabel.Anchor = AnchorAll;
            textLabel.LineAlignment = StringAlignment.Center;
            textLabel.Alignment = StringAlignment.Center;
            this.textLabel = textLabel;

            Controls.Add(textLabel);
            Controls.Add(okBtn);
            Controls.Add(cancelBtn);
        }
Пример #7
0
        protected override void InitControl()
        {
            Theme theme = Theme.Current;
            base.InitControl();
            Bounds = new System.Drawing.Rectangle(0, 0, 240, ButtonHeight + LabelHeight);
            BackColor = theme.ButtonsBackColor;
            GradientFill = false;

            buttons[0] = btn1 = new FluidButton("", Space, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[1] = btn2 = new FluidButton("", Space + (Space + ButtonWidth) * 1, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[2] = btn3 = new FluidButton("", Space + (Space + ButtonWidth) * 2, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[3] = btn4 = new FluidButton("", Space + (Space + ButtonWidth) * 3, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[4] = btn5 = new FluidButton("", Space + (Space + ButtonWidth) * 4, ButtonTop, ButtonWidth, ButtonHeight);

            //Camera
            buttons[0].Image = Resources.camera;
            //New Folder
            buttons[1].Image = Resources.folder_add;
            //Delete Folder
            buttons[2].Image = Resources.folder_delete;
            //Paste
            buttons[3].Image = Resources.page_paste;
            //Back
            buttons[4].Image = Resources.application_side_contract;

            btn1.Command = "A";
            btn2.Command = "B";
            btn3.Command = "C";
            btn4.Command = "D";
            btn5.Command = "E";

            foreach (FluidButton b in buttons)
            {
                b.Anchor = AnchorStyles.None;
                b.Shape = ButtonShape.Flat;
                b.BackColor = theme.ButtonsButtonBackColor;
                b.ForeColor = Color.White;
                b.PressedBackColor = Color.LightGray;
            }

            Controls.Add(btn1);
            Controls.Add(btn2);
            Controls.Add(btn3);
            Controls.Add(btn4);
            Controls.Add(btn5);

            //now add the labels
            var labelFont = new Font(FontFamily.GenericSerif, 7, FontStyle.Regular);

            label1 = new FluidLabel("Camera", Space, ButtonHeight - 2, ButtonWidth, LabelHeight);
            label1.Font = labelFont;

            label2 = new FluidLabel("New", Space + (Space + ButtonWidth) * 1 + 6, ButtonHeight - 2, ButtonWidth - 2, LabelHeight + 1);
            label2.Font = labelFont;

            label3 = new FluidLabel("Delete", Space + (Space + ButtonWidth) * 2 + 2, ButtonHeight - 2, ButtonWidth, LabelHeight + 1);
            label3.Font = labelFont;

            label4 = new FluidLabel("Paste", Space + (Space + ButtonWidth) * 3 + 4, ButtonHeight - 2, ButtonWidth - 3, LabelHeight + 1);
            label4.Font = labelFont;

            label5 = new FluidLabel("Back", Space + (Space + ButtonWidth) * 4 + 8, ButtonHeight - 2, ButtonWidth - 6, LabelHeight + 1);
            label5.Font = labelFont;

            Controls.Add(label1);
            Controls.Add(label2);
            Controls.Add(label3);
            Controls.Add(label4);
            Controls.Add(label5);
        }
Пример #8
0
        protected override void InitControl()
        {
            base.InitControl();
            EnableDoubleBuffer = true;
            Anchor = AnchorAll;
            Bounds = new Rectangle(0, 0, 240, 300);
            BackColor = Theme.Current.PanelBackColor;
            GradientFill = Theme.Current.PanelGradinated;

            _accountInfo = Form1.Instance.DropBox.GetAccountInfo();

            header.Title = "Info";
            header.BackColor = Theme.Current.HeaderBackColor;
            header.ForeColor = Theme.Current.HeaderForeColor;
            header.GradientFill = Theme.Current.HeaderGradianted;
            header.BackButton.Click += new EventHandler(BackButton_Click);
            header.BackButton.BackColor = Theme.Current.HeaderBackButtonBackColor;
            header.BackButton.Visible = true;
            header.BackButton.Shape = ButtonShape.Back;
            header.BackButton.TextOffset = new Point(6, 0);
            header.BackButton.Text = "Back";
            header.BackButton.GradientFill = Theme.Current.ButtonsGradianted;
            Controls.Add(header);

            //Add the controls to the panel here...
            var lblHeader = new FluidLabel();
            lblHeader.Bounds = new Rectangle(10, 30, 150, 25);
            lblHeader.Font = new Font(FontFamily.GenericSerif, 14, FontStyle.Bold);
            lblHeader.Text = "DroppedBoxx";
            Controls.Add(lblHeader);

            var lblVersion = new FluidLabel();
            lblVersion.Bounds = new Rectangle(10, 60, 150, 25);
            lblVersion.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
            lblVersion.Text = "Version: " + Form1.Version;
            Controls.Add(lblVersion);

            var lblSent = new FluidLabel();
            lblSent.Bounds = new Rectangle(10, 75, 150, 25);
            lblSent.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
            lblSent.Text = string.Format("Sent: {0:#,##0} KB", (Form1.Instance.DropBox.BytesSent / 1024));
            Controls.Add(lblSent);

            var lblRecieved = new FluidLabel();
            lblRecieved.Bounds = new Rectangle(10, 90, 150, 25);
            lblRecieved.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
            lblRecieved.Text = string.Format("Recieved: {0:#,##0} KB", (Form1.Instance.DropBox.BytesRecieved / 1024));
            Controls.Add(lblRecieved);

            var line1 = new FluidLine(0, 115, Width);
            line1.Anchor = AnchorLR;
            Controls.Add(line1);

            var lblAcHeader = new FluidLabel();
            lblAcHeader.Bounds = new Rectangle(10, 120, 150, 25);
            lblAcHeader.Font = new Font(FontFamily.GenericSerif, 14, FontStyle.Bold);
            lblAcHeader.Text = "Account";
            Controls.Add(lblAcHeader);

            if (_accountInfo != null)
            {
                var lblAcQ = new FluidLabel();
                lblAcQ.Bounds = new Rectangle(10, 145, 150, 25);
                lblAcQ.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
                lblAcQ.Text = string.Format("Quota: {0:#,##0} MB", (_accountInfo.Quota_Info.Quota / 1024 / 1024));
                Controls.Add(lblAcQ);

                var lblAcU = new FluidLabel();
                lblAcU.Bounds = new Rectangle(10, 160, 150, 25);
                lblAcU.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
                lblAcU.Text = string.Format("Used: {0:#,##0} MB", (_accountInfo.Quota_Info.Normal / 1024 / 1024));
                Controls.Add(lblAcU);

                var lblAcS = new FluidLabel();
                lblAcS.Bounds = new Rectangle(10, 175, 150, 25);
                lblAcS.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
                lblAcS.Text = string.Format("Shared: {0:#,##0} MB", (_accountInfo.Quota_Info.Shared / 1024 / 1024));
                Controls.Add(lblAcS);
            }
            else
            {
                var lblNoInfo = new FluidLabel();
                lblNoInfo.Bounds = new Rectangle(10, 145, 150, 45);
                lblNoInfo.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
                lblNoInfo.Text = string.Format("Failed to get Account Info{0}Check Data Connection", Environment.NewLine);
                Controls.Add(lblNoInfo);
            }
        }
Пример #9
0
        FluidTextBox AddTextLabel(string title, int top, ref FluidLabel label, bool visible)
        {
            label = new FluidLabel(title, 10, top + 5, Width - 20, 16);
            label.Anchor = AnchorStyles.Left | AnchorStyles.Top;
            label.Font = new Font(FontFamily.GenericSansSerif, 8f, FontStyle.Regular);
            label.ForeColor = Color.White;
            label.ShadowColor = Color.Black;
            label.Visible = visible;
            Controls.Add(label);

            FluidTextBox textbox = new FluidTextBox("", 10, top + 19, Width - 20, 24);
            textbox.Anchor = AnchorStyles.Left | AnchorStyles.Top;
            textbox.Visible = visible;
            textbox.CanShowInputPanel = false;
            Controls.Add(textbox);
            return textbox;
        }
Пример #10
0
        protected override void InitControl()
        {
            base.InitControl();
            EnableDoubleBuffer = true;
            Bounds = new Rectangle(0, 0, 240, 300);
            this.BackColor = Color.FromArgb(33, 124, 197);
            this.PaintBackground += new EventHandler<FluidPaintEventArgs>(login_Paint);

            txtEmail = AddTextLabel("Email", 35, ref lblEmail, true);
            txtPassword = AddTextLabel("Password", 90, ref lblPassword, true);
            txtPassword.PasswordChar = '*';

            txtEmail.GotFocus += new EventHandler(passwordTextBox_GotFocus);
            txtPassword.GotFocus += new EventHandler(passwordTextBox_GotFocus);

            btnRemember = new FluidButton("", 12, 150, 20, 20);
            btnRemember.BackColor = Color.White;
            btnRemember.PressedBackColor = Color.White;
            btnRemember.Image = null;
            btnRemember.Click += new EventHandler(btnRemember_Click);
            Controls.Add(btnRemember);

            lblRemember = new FluidLabel("Remember me?", 38, 150, 120, 20);
            lblRemember.Click += new EventHandler(btnRemember_Click);
            lblRemember.ForeColor = Color.Black;
            lblRemember.ShadowColor = Color.White;
            lblRemember.Font = new Font("Arial", 9, FontStyle.Bold);
            Controls.Add(lblRemember);

            btnLogin = new FluidButton("Login", 10, this.Height - 35, 80, 32);
            btnLogin.BackColor = Color.Green;
            btnLogin.Click += new EventHandler(btnLogin_Click);
            btnLogin.ForeColor = Color.Black;
            btnLogin.Anchor = AnchorBL;
            btnLogin.Font = Theme.Current.ButtonFont;
            Controls.Add(btnLogin);

            btnKeyboard = new FluidButton("", 100, this.Height - 35, 40, 32);
            btnKeyboard.Image = Resources.keyboard;
            btnKeyboard.BackColor = Color.White;
            btnKeyboard.Click += new EventHandler(btnKeyboard_Click);
            btnKeyboard.Anchor = AnchorBL;
            btnKeyboard.ShadowColor = Color.Black;
            Controls.Add(btnKeyboard);

            btnExit = new FluidButton("Exit", 150, this.Height - 35, 80, 32);
            btnExit.BackColor = Color.Red;
            btnExit.Click += new EventHandler(btnExit_Click);
            btnExit.ForeColor = Color.Black;
            btnExit.Anchor = AnchorBL;
            btnExit.Font = Theme.Current.ButtonFont;
            Controls.Add(btnExit);

            if (Settings.Instance != null)
            {
                if (Settings.Instance.RememberMe)
                {
                    ////not too sure what to do here...
                    //txtEmail.Text = Settings.Instance.UserEmail;
                    //txtPassword.Text = Settings.Instance.UserPassword;
                    rememberMe = true;
                    btnRemember.Image = Resources.accept;
                }
            }
        }
Пример #11
0
        protected override void InitControl()
        {
            base.InitControl();
            EnableDoubleBuffer = true;
            Anchor = AnchorAll;
            Bounds = new Rectangle(0, 0, 240, 300);
            BackColor = Theme.Current.PanelBackColor;
            GradientFill = Theme.Current.PanelGradinated;

            header.Title = "Settings";
            header.BackColor = Theme.Current.HeaderBackColor;
            header.ForeColor = Theme.Current.HeaderForeColor;
            header.GradientFill = Theme.Current.HeaderGradianted;
            header.BackButton.Click += new EventHandler(BackButton_Click);
            header.BackButton.BackColor = Theme.Current.HeaderBackButtonBackColor;
            header.BackButton.ForeColor = Theme.Current.HeaderBackButtonForeColor;
            header.BackButton.Visible = true;
            header.BackButton.Shape = ButtonShape.Back;
            header.BackButton.TextOffset = new Point(6, 0);
            header.BackButton.Text = "Back";
            header.BackButton.GradientFill = Theme.Current.ButtonsGradianted;
            Controls.Add(header);

            //Add the controls to the panel here...
            var lblLogin = new FluidLabel("Login", 10, 30, 60, 30);
            lblLogin.Font = new Font(FontFamily.GenericSerif, 12, FontStyle.Bold);
            Controls.Add(lblLogin);

            var lblForgetMe = new FluidLabel("Clear Login Details: ", 10, 55, 100, 25);
            lblForgetMe.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
            Controls.Add(lblForgetMe);

            var btnForgetMe = new FluidButton("Forget Me", 110, 50, 60, 25);
            btnForgetMe.BackColor = Theme.Current.SettingsButtonBackColor;
            btnForgetMe.GradientFill = Theme.Current.ButtonsGradianted;
            btnForgetMe.ForeColor = Theme.Current.SettingsButtonForeColor;
            btnForgetMe.Click += new EventHandler(btnForgetMe_Click);
            btnForgetMe.Font = Theme.Current.ButtonFont;
            Controls.Add(btnForgetMe);

            var line1 = new FluidLine(0, 80, Width);
            line1.Anchor = AnchorLR;
            Controls.Add(line1);

            var lblSync = new FluidLabel("Syncing", 10, 80, 80, 30);
            lblSync.Font = new Font(FontFamily.GenericSerif, 12, FontStyle.Bold);
            Controls.Add(lblSync);

            //File Size
            var lblFileSize = new FluidLabel("Max File Size: ", 10, 105, 80, 25);
            lblFileSize.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
            Controls.Add(lblFileSize);

            lblFileSizeVal = new FluidLabel(string.Empty, 80, 102, 60, 25);
            lblFileSizeVal.Font = new Font("Tahoma", 9, FontStyle.Bold);
            Controls.Add(lblFileSizeVal);
            ResetLabelSize();

            var btnSizeDown = new FluidButton("-", 140, 97, 24, 24);
            btnSizeDown.BackColor = Theme.Current.SettingsButtonBackColor;
            btnSizeDown.ForeColor = Theme.Current.SettingsButtonForeColor;
            btnSizeDown.GradientFill = Theme.Current.ButtonsGradianted;
            btnSizeDown.Font = new Font("Tahoma", 10, FontStyle.Bold);
            btnSizeDown.Click += new EventHandler(btnSizeDown_Click);
            Controls.Add(btnSizeDown);

            var btnSizeUp = new FluidButton("+", 170, 97, 24, 24);
            btnSizeUp.BackColor = Theme.Current.SettingsButtonBackColor;
            btnSizeUp.ForeColor = Theme.Current.SettingsButtonForeColor;
            btnSizeUp.GradientFill = Theme.Current.ButtonsGradianted;
            btnSizeUp.Font = new Font("Tahoma", 10, FontStyle.Bold);
            btnSizeUp.Click += new EventHandler(btnSizeUp_Click);
            Controls.Add(btnSizeUp);

            var line2 = new FluidLine(0, 125, Width);
            line2.Anchor = AnchorLR;
            Controls.Add(line2);

            var lblMisc = new FluidLabel("Misc", 10, 125, 80, 30);
            lblMisc.Font = new Font(FontFamily.GenericSerif, 12, FontStyle.Bold);
            Controls.Add(lblMisc);

            //Camera Res
            var lblCameraRes = new FluidLabel("Camera Res: ", 10, 145, 80, 25);
            lblCameraRes.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
            Controls.Add(lblCameraRes);

            lblCameraVal = new FluidLabel(string.Empty, 80, 142, 60, 25);
            lblCameraVal.Font = new Font("Tahoma", 9, FontStyle.Bold);
            Controls.Add(lblCameraVal);
            ResetLabelCamera();

            var btnCameraDown = new FluidButton("-", 140, 137, 24, 24);
            btnCameraDown.BackColor = Theme.Current.SettingsButtonBackColor;
            btnCameraDown.ForeColor = Theme.Current.SettingsButtonForeColor;
            btnCameraDown.GradientFill = Theme.Current.ButtonsGradianted;
            btnCameraDown.Font = new Font("Tahoma", 10, FontStyle.Bold);
            btnCameraDown.Click += new EventHandler(btnCameraDown_Click);
            Controls.Add(btnCameraDown);

            var btnCameraUp = new FluidButton("+", 170, 137, 24, 24);
            btnCameraUp.BackColor = Theme.Current.SettingsButtonBackColor;
            btnCameraUp.ForeColor = Theme.Current.SettingsButtonForeColor;
            btnCameraUp.GradientFill = Theme.Current.ButtonsGradianted;
            btnCameraUp.Font = new Font("Tahoma", 10, FontStyle.Bold);
            btnCameraUp.Click += new EventHandler(btnCameraUp_Click);
            Controls.Add(btnCameraUp);

            //Theme
            var lblTheme = new FluidLabel("Theme: ", 10, 175, 80, 25);
            lblTheme.Font = new Font(FontFamily.GenericSerif, 8, FontStyle.Regular);
            Controls.Add(lblTheme);

            lblThemeVal = new FluidLabel(string.Empty, 80, 172, 60, 25);
            lblThemeVal.Font = new Font("Tahoma", 9, FontStyle.Bold);
            Controls.Add(lblThemeVal);
            ResetLabelTheme();

            var btnThemeDown = new FluidButton("-", 140, 167, 24, 24);
            btnThemeDown.BackColor = Theme.Current.SettingsButtonBackColor;
            btnThemeDown.ForeColor = Theme.Current.SettingsButtonForeColor;
            btnThemeDown.GradientFill = Theme.Current.ButtonsGradianted;
            btnThemeDown.Font = new Font("Tahoma", 10, FontStyle.Bold);
            btnThemeDown.Click += new EventHandler(btnThemeDown_Click);
            Controls.Add(btnThemeDown);

            var btnThemeUp = new FluidButton("+", 170, 167, 24, 24);
            btnThemeUp.BackColor = Theme.Current.SettingsButtonBackColor;
            btnThemeUp.ForeColor = Theme.Current.SettingsButtonForeColor;
            btnThemeUp.GradientFill = Theme.Current.ButtonsGradianted;
            btnThemeUp.Font = new Font("Tahoma", 10, FontStyle.Bold);
            btnThemeUp.Click += new EventHandler(btnThemeUp_Click);
            Controls.Add(btnThemeUp);
        }
Пример #12
0
        protected override void InitControl()
        {
            Theme theme = Theme.Current;
            base.InitControl();
            Bounds = new System.Drawing.Rectangle(0, 0, 240, ButtonHeight + LabelHeight);
            BackColor = theme.ButtonsBackColor;
            GradientFill = false;

            buttons[0] = btn1 = new FluidButton("", Space, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[1] = btn2 = new FluidButton("", Space + (Space + ButtonWidth) * 1, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[2] = btn3 = new FluidButton("", Space + (Space + ButtonWidth) * 2, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[3] = btn4 = new FluidButton("", Space + (Space + ButtonWidth) * 3, ButtonTop, ButtonWidth, ButtonHeight);
            buttons[4] = btn5 = new FluidButton("", Space + (Space + ButtonWidth) * 4, ButtonTop, ButtonWidth, ButtonHeight);

            //Sync Button
            buttons[0].Image = Resources.arrow_refresh;
            //Browse Dropbox Button
            buttons[1].Image = Resources.brick_go;
            //Settings Button
            buttons[2].Image = Resources.cog;
            //Info Button
            buttons[3].Image = Resources.information;
            //Info Button
            buttons[4].Image = Resources.door_in;

            btn1.Command = "A";
            btn2.Command = "B";
            btn3.Command = "C";
            btn4.Command = "D";
            btn5.Command = "E";

            foreach (FluidButton b in buttons)
            {
                b.Anchor = AnchorStyles.None;
                b.Shape = ButtonShape.Flat;
                b.BackColor = theme.ButtonsButtonBackColor;
                b.ForeColor = Color.White;
                b.PressedBackColor = Color.LightGray;
            }

            Controls.Add(btn1);
            Controls.Add(btn2);
            Controls.Add(btn3);
            Controls.Add(btn4);
            Controls.Add(btn5);

            //now add the labels
            var labelFont = new Font(FontFamily.GenericSerif, 7, FontStyle.Regular);

            label1 = new FluidLabel("Sync", Space + 8, ButtonHeight - 2, ButtonWidth - 6, LabelHeight);
            label1.Font = labelFont;

            label2 = new FluidLabel("Dropbox", Space + (Space + ButtonWidth) * 1 - 1, ButtonHeight - 2, ButtonWidth + 2, LabelHeight + 1);
            label2.Font = labelFont;

            label3 = new FluidLabel("Settings", Space + (Space + ButtonWidth) * 2, ButtonHeight - 2, ButtonWidth, LabelHeight + 1);
            label3.Font = labelFont;

            label4 = new FluidLabel("Info", Space + (Space + ButtonWidth) * 3 + 8, ButtonHeight - 2, ButtonWidth - 6, LabelHeight + 1);
            label4.Font = labelFont;

            label5 = new FluidLabel("Exit", Space + (Space + ButtonWidth) * 4 + 8, ButtonHeight - 2, ButtonWidth - 6, LabelHeight + 1);
            label5.Font = labelFont;

            Controls.Add(label1);
            Controls.Add(label2);
            Controls.Add(label3);
            Controls.Add(label4);
            Controls.Add(label5);
        }
Пример #13
0
 private void EnsureAnimLabel()
 {
     if (animLabel == null)
     {
         FluidLabel l = new FluidLabel("", Width, 0, Width, Height);
         animLabel = l;
         l.ShadowColor = Color.Black;
         l.LineAlignment = StringAlignment.Center;
         l.Alignment = StringAlignment.Center;
         l.Visible = false;
         controls.Insert(0, l);
     }
 }