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

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

            if (IsSyncing)
            {
                BackColor = Color.LightGray;
            }

            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.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
        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);
        }
Пример #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()
        {
            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);
        }
Пример #6
0
        protected override void InitControl()
        {
            Theme theme = Theme.Current;

            base.InitControl();
            Bounds       = new System.Drawing.Rectangle(0, 0, 240, ButtonHeight + 12);
            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);

            //Download/Save
            btn1.Image = Resources.disk;
            //Send
            btn2.Image = Resources.email_attach;
            //Copy
            btn3.Image = Resources.page_copy;
            //Delete
            btn4.Image = Resources.bin;
            //Close
            btn5.Image = Resources.cross;

            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("Save", Space, ButtonHeight - 2, ButtonWidth, LabelHeight);
            label1.Font = labelFont;

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

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

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

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

            Controls.Add(label1);
            Controls.Add(label2);
            Controls.Add(label3);
            Controls.Add(label4);
            Controls.Add(label5);
        }
Пример #7
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);
            }
        }
Пример #8
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);
        }
Пример #9
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;
                }
            }
        }