private void InitializeComponent()
        {
            // Auto generated by the designer
            notNowButton = new MaterialRaisedButton();
            this.updateButton = new MaterialRaisedButton();
            this.changeLogText = new MaterialLabel();
            this.SuspendLayout();
            // 
            // notNowButton
            // 
            this.notNowButton.Depth = 0;
            this.notNowButton.Location = new Point(12, 257);
            this.notNowButton.MouseState = MouseState.HOVER;
            this.notNowButton.Name = "notNowButton";
            this.notNowButton.Primary = true;
            this.notNowButton.Size = new Size(120, 31);
            this.notNowButton.TabIndex = 0;
            this.notNowButton.Text = "Not Now";
            this.notNowButton.UseVisualStyleBackColor = true;
            // 
            // updateButton
            // 
            this.updateButton.Depth = 0;
            this.updateButton.Location = new Point(368, 257);
            this.updateButton.MouseState = MouseState.HOVER;
            this.updateButton.Name = "updateButton";
            this.updateButton.Primary = true;
            this.updateButton.Size = new Size(120, 31);
            this.updateButton.TabIndex = 1;
            this.updateButton.Text = "Update";
            this.updateButton.UseVisualStyleBackColor = true;
            // 
            // changeLogText
            // 
            this.changeLogText.Depth = 0;
            this.changeLogText.Font = new Font("Roboto", 11F);
            this.changeLogText.ForeColor = Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            this.changeLogText.Location = new Point(12, 75);
            this.changeLogText.MouseState = MouseState.HOVER;
            this.changeLogText.Name = "changeLogText";
            this.changeLogText.Size = new Size(476, 160);
            this.changeLogText.TabIndex = 2;
            this.changeLogText.Text = "changeLogText";
            // 
            // UpdateDialog
            // 
            // Default ClientSize
            this.ClientSize = new Size(500, 300);
            this.Controls.Add(this.changeLogText);
            this.Controls.Add(this.updateButton);
            this.Controls.Add(this.notNowButton);
            this.Name = "UpdateDialog";
            this.Text = "An Update is Available";
            this.Icon = Properties.Resources.MainIcon;
            this.ResumeLayout(false);

        }
        public MaterialLabel loadLableWithMessage(String message)
        {
            MaterialLabel materialLabel1 = new MaterialSkin.Controls.MaterialLabel();

            materialLabel1.AutoSize   = true;
            materialLabel1.Depth      = 0;
            materialLabel1.Font       = new System.Drawing.Font("Roboto", 14F);
            materialLabel1.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
            materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
            materialLabel1.Name       = "messageLable";
            materialLabel1.TabIndex   = 0;
            materialLabel1.Text       = message;
            return(materialLabel1);
        }
Beispiel #3
0
    void InitializeComponent()
    {
        this.materialLabel1      = new MaterialSkin.Controls.MaterialLabel();
        this.materialFlatButton1 = new MaterialSkin.Controls.MaterialFlatButton();

        this.SuspendLayout();

        //
        // materialLabel1
        //
        this.materialLabel1.AutoSize   = false;
        this.materialLabel1.Depth      = 0;
        this.materialLabel1.Font       = new System.Drawing.Font("Roboto", 11F);
        this.materialLabel1.ForeColor  = System.Drawing.Color.FromArgb(((int)(((byte)(222)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
        this.materialLabel1.Location   = new System.Drawing.Point(63, 21);
        this.materialLabel1.MouseState = MaterialSkin.MouseState.HOVER;
        this.materialLabel1.Name       = "materialLabel1";
        this.materialLabel1.Size       = new System.Drawing.Size(116, 19);
        this.materialLabel1.TabIndex   = 1;
        this.materialLabel1.Text       = "John Appleseed";
        //
        // materialFlatButton1
        //
        this.materialFlatButton1.AutoSizeMode            = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
        this.materialFlatButton1.Depth                   = 0;
        this.materialFlatButton1.Location                = new System.Drawing.Point(547, 0);
        this.materialFlatButton1.Margin                  = new System.Windows.Forms.Padding(4, 6, 4, 6);
        this.materialFlatButton1.MouseState              = MaterialSkin.MouseState.HOVER;
        this.materialFlatButton1.Name                    = "materialFlatButton1";
        this.materialFlatButton1.Primary                 = false;
        this.materialFlatButton1.Size                    = new System.Drawing.Size(63, 63);
        this.materialFlatButton1.TabIndex                = 0;
        this.materialFlatButton1.Text                    = "Talk";
        this.materialFlatButton1.UseVisualStyleBackColor = true;

        this.ResumeLayout();

        Controls.AddRange(new Control[] { materialFlatButton1, materialLabel1 });
    }
        public void addLineControls(string description, string timepicker, string combobox, string amount)
        {
            int xstartpos = 60;
            int ystartpos = 100;

            int nHeightSpace = 80;


            for (int i = 0; i < 5; i++)
            {
                //draw label for tax info.
                Label label = new MaterialSkin.Controls.MaterialLabel();
                label.Text     = description;//"Salary";
                label.Font     = new System.Drawing.Font("Microsoft Sans Serif", 12F);
                label.Location = new System.Drawing.Point(xstartpos, ystartpos + i * nHeightSpace);
                m_incometax.Controls.Add(label);

                //draw datetime picker.
                DateTimePicker dpicker = new DateTimePicker();
                dpicker.Font     = new System.Drawing.Font("Microsoft Sans Serif", 12F);
                dpicker.Size     = new System.Drawing.Size(270, 30);
                dpicker.Location = new System.Drawing.Point(xstartpos + 310, ystartpos + i * nHeightSpace);
                m_incometax.Controls.Add(dpicker);

                //draw combobox.
                ComboBox comboitem = new ComboBox();
                comboitem.Font     = new System.Drawing.Font("Microsoft Sans Serif", 11F);
                comboitem.Size     = new System.Drawing.Size(100, 28);
                comboitem.Location = new System.Drawing.Point(xstartpos + 700, ystartpos + i * nHeightSpace);
                m_incometax.Controls.Add(comboitem);

                //draw label for tax info.
                Label label2 = new MaterialSkin.Controls.MaterialLabel();
                label2.Text     = "Salary";
                label2.Font     = new System.Drawing.Font("Microsoft Sans Serif", 12F);
                label2.Location = new System.Drawing.Point(xstartpos + 900, ystartpos + i * nHeightSpace);
                m_incometax.Controls.Add(label2);
            }
        }
        void cargarObligacionesISN(string sCliente, int iIdCliente)
        {
            //OBTIENE UNA LISTA DE OBLIGACIONES CORRESPONDIENTES A AL REGIMEN DONDE SE ENCUENTRA EL CLIENTE
            DetalleObligacion obligacion = new DetalleObligacion();

            obligacionesAsignadas = obligacion.listaObligaciones(sCliente);

            if (obligacionesAsignadas.Count > 0)
            {
                pnlListaObligaciones.Controls.Clear();
                //CREA UNA LISTA DINAMICA DE OBLIGACIONES FISCALES
                List <DetalleObligacion> obligaciones = new DetalleObligacion().GetListObligacionesISR(16, 17);
                for (int i = 0; i < obligaciones.Count; i++)
                {
                    MaterialSkin.Controls.MaterialLabel lblObligacion = new MaterialSkin.Controls.MaterialLabel();
                    lblObligacion.Location     = new Point(2, 28 * i + 20);
                    lblObligacion.Text         = string.Format("{0}. {1}", (i + 1).ToString(), obligaciones[i].sDetalleObligacion);
                    lblObligacion.Width        = 400;
                    lblObligacion.AutoEllipsis = true;

                    DevExpress.XtraEditors.SeparatorControl separador = new DevExpress.XtraEditors.SeparatorControl();
                    separador.LineOrientation = Orientation.Horizontal;
                    separador.Size            = new Size(590, 18);                                  // 937, 18
                    separador.Location        = new Point(365, lblObligacion.Location.Y + 15);

                    pnlListaObligaciones.Controls.Add(separador);

                    pnlListaObligaciones.Controls.Add(lblObligacion);
                    lblObligacion.BringToFront();

                    int iDistancia = 480;                     // 600


                    if (obligaciones[i].iR01 != null)
                    {
                        LollipopCheckBox chkbR1 = new LollipopCheckBox();
                        chkbR1.Name       = obligaciones[i].iR01.Value.ToString();
                        chkbR1.Location   = new Point(iDistancia, lblObligacion.Location.Y);
                        chkbR1.Text       = "";
                        chkbR1.Size       = new Size(20, 20);
                        chkbR1.Cursor     = Cursors.Hand;
                        chkbR1.CheckColor = "#5d4037";

                        //VALIDA SI EL CLIENTE TIENE UNA OBLIGACIÓN ASIGNADA, SE MARCA EL CHECK
                        bool validar = false;
                        validar = new DetalleObligacion().validarObligacion(obligaciones[i].iR01.Value, iIdCliente);
                        if (validar != true)
                        {
                            chkbR1.Checked = false;
                        }
                        else
                        {
                            chkbR1.Checked = true;
                        }

                        pnlListaObligaciones.Controls.Add(chkbR1);
                        chkbR1.BringToFront();
                    }
                    iDistancia = iDistancia + 200;

                    if (obligaciones[i].iR02 != null)
                    {
                        LollipopCheckBox chkbR2 = new LollipopCheckBox();
                        chkbR2.Name       = obligaciones[i].iR02.Value.ToString();
                        chkbR2.Location   = new Point(iDistancia, lblObligacion.Location.Y);
                        chkbR2.Text       = "";
                        chkbR2.Size       = new Size(20, 20);
                        chkbR2.Cursor     = Cursors.Hand;
                        chkbR2.CheckColor = "#558b2f";

                        //VALIDA SI EL CLIENTE TIENE UNA OBLIGACIÓN ASIGNADA, SE MARCA EL CHECK
                        bool validar = false;
                        validar = new DetalleObligacion().validarObligacion(obligaciones[i].iR02.Value, iIdCliente);
                        if (validar != true)
                        {
                            chkbR2.Checked = false;
                        }
                        else
                        {
                            chkbR2.Checked = true;
                        }

                        pnlListaObligaciones.Controls.Add(chkbR2);
                        chkbR2.BringToFront();
                    }
                    iDistancia = iDistancia + 200;

                    if (obligaciones[i].iR03 != null)
                    {
                        LollipopCheckBox chkbR3 = new LollipopCheckBox();
                        chkbR3.Name       = obligaciones[i].iR03.Value.ToString();
                        chkbR3.Location   = new Point(iDistancia, lblObligacion.Location.Y);
                        chkbR3.Text       = "";
                        chkbR3.Size       = new Size(20, 20);
                        chkbR3.Cursor     = Cursors.Hand;
                        chkbR3.CheckColor = "#0277bd";

                        //VALIDA SI EL CLIENTE TIENE UNA OBLIGACIÓN ASIGNADA, SE MARCA EL CHECK
                        bool validar = false;
                        validar = new DetalleObligacion().validarObligacion(obligaciones[i].iR03.Value, iIdCliente);
                        if (validar != true)
                        {
                            chkbR3.Checked = false;
                        }
                        else
                        {
                            chkbR3.Checked = true;
                        }

                        pnlListaObligaciones.Controls.Add(chkbR3);
                        chkbR3.BringToFront();
                    }

                    separador.SendToBack();

                    pnlListaObligaciones.AutoScroll = true;
                }
            }
            else
            {
                Label lblNotifica = new Label();
                lblNotifica.Text      = string.Format("No Se Encontraron{0}Obligaciones Fiscales Asignadas.", Environment.NewLine);
                lblNotifica.Location  = new Point(380, 120);
                lblNotifica.Font      = new Font("Segoe UI", 13);
                lblNotifica.Width     = 180;
                lblNotifica.Height    = 100;
                lblNotifica.ForeColor = Color.FromArgb(200, 200, 200);  //105
                lblNotifica.TextAlign = ContentAlignment.MiddleCenter;
                pnlListaObligaciones.Controls.Add(lblNotifica);
            }
        }
Beispiel #6
0
 private void NoteLabel_Click(object sender, EventArgs e)
 {
     if (noteEditing) return;
     if (lastNoteLabelClick != null)
         lastNoteLabelClick.BackColor = NoteLabelColor(0);
     ((MaterialLabel)sender).BackColor = NoteLabelColor(NoteLabelStatus.Clicked);
     speedButton = 8;
     timer5.Start();
     lastNoteLabelClick = ((MaterialLabel)sender);
 }
Beispiel #7
0
 public void newNoteLabel(int i)
 {
     if (i == 0)
     {
         var defaultNote = (MaterialLabel)(tabPage2.Controls["NoteLabel0"]);
         defaultNote.Text = Settings.Default.Notes[0];
         defaultNote.Tag = defaultNote.Location.Y + defaultNote.Size.Height;
         defaultNote.BackColor = NoteLabelColor(0);
         defaultNote.Show();
         return;
     }
     MaterialLabel mlabel = new MaterialLabel();
     mlabel.Name = "NoteLabel" + i.ToString();
     mlabel.AutoEllipsis = true;
     mlabel.AutoSize = true;
     mlabel.Font = new Font("Roboto", 11F);
     mlabel.MaximumSize = new Size(270, 60);
     mlabel.MinimumSize = new Size(270, 40);
     mlabel.TextAlign = ContentAlignment.MiddleCenter;
     mlabel.Text = Settings.Default.Notes[i];
     mlabel.BackColor = NoteLabelColor(0);
     mlabel.Location = new Point(5,
            (int)((MaterialLabel)(tabPage2.Controls["NoteLabel" + (i - 1).ToString()])).Tag + 8);
     mlabel.Size = new System.Drawing.Size(270, 40);
     mlabel.MouseEnter += NoteLabel_MouseEnter;
     mlabel.MouseLeave += NoteLabel_MouseLeave;
     mlabel.Click += NoteLabel_Click;
     mlabel.DoubleClick += NoteLabel_DoubleClick;
     tabPage2.Controls.Add(mlabel);      
     mlabel.Tag = mlabel.Location.Y + mlabel.Size.Height;
 }
Beispiel #8
0
 private void materialFlatButton1_Click(object sender, EventArgs e)
 {
     if (Visible)
     {
         if (materialTabControl1.SelectedIndex == 1)
         {
             if (!noteEditing && lastNoteLabelClick != null)
             {
                 lastNoteLabelClick.BackColor = NoteLabelColor(0);
                 lastNoteLabelClick = null;
                 speedButton = 2;
                 timer6.Start();
             }
         }
         else
         {
             if (ReminderControl.lastReminderClick != null)
             {
                 ReminderControl.lastReminderClick.LastState = ReminderMouseState.LostFocus;
             }
         }
         materialFlatButton_Click(sender, e);
     }
     if (_login._setting.Visible == true)
         _login._setting.Hide();
     _login._setting.materialCheckBox3.Checked = false;
     _login._setting.materialCheckBox3.Enabled = false;
     _login._setting.ShowDialog();
     _login._setting.materialCheckBox3.Enabled = true;
     if (Visible)
     {
         materialFlatButton1.UseCustomBackColor = true;
         materialFlatButton1.Refresh();
         lastActive.UseCustomBackColor = false;
         lastActive.Refresh();
         animateProgress = 10;
         animateStep = (lastActive.Location.Y - materialFlatButton1.Location.Y) / 54;
         timer1.Start();
         if (remindMessageInputed || noteEditing) materialSingleLineTextField1.SelectAll();
     }
 }
Beispiel #9
0
 private void checkNote()
 {
     if (noteEditing)
     {
         answer = MetroMessageBox.Show(this, "You have not saved Note. Are you sure to discard changes?",
                                                     "", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, 140);
         if (answer == DialogResult.No)
         {
             materialSingleLineTextField1.SelectAll();
             return;
         }
         else
         {
             noteEditing = false;
             if (lastNoteLabelClick == null)
             {
                 throw new Exception("lastNoteLabelClick is null");
             }
             int.TryParse(lastNoteLabelClick.Name.Remove(0, 9), out noteLabelID);
             lastNoteLabelClick.Text = Settings.Default.Notes[noteLabelID];
             materialSingleLineTextField1.TextChanged -= materialSingleLineTextField1_TextChanged;
             materialSingleLineTextField1.Hint = " What can I do for you?";
             materialSingleLineTextField1.Clear();
             materialFlatButton2.Focus();
             //((MaterialLabel)(tabPage2.Controls["NoteLabel0"])).Focus();
         }
     }
     if (lastNoteLabelClick != null)
     {
         lastNoteLabelClick.BackColor = NoteLabelColor(0);
         lastNoteLabelClick = null;
         materialFlatButton10.Hide();
         materialFlatButton9.Hide();
     }
 }
Beispiel #10
0
 private void tabPage2_Click(object sender, EventArgs e)
 {
     if (noteEditing) return;
     if (lastNoteLabelClick != null)
     {
         object objectTemp = lastNoteLabelClick as object;
         lastNoteLabelClick = null;
         NoteLabel_MouseLeave(objectTemp, new EventArgs());
     }
     speedButton = 2;
     timer6.Start();
 }
Beispiel #11
0
 private void materialFlatButton10_Click(object sender, EventArgs e)
 {
     if (lastNoteLabelClick == null)
     {
         throw new Exception("lastNoteLabelClick is null");
     }
     int.TryParse(lastNoteLabelClick.Name.Remove(0, 9), out noteLabelID);
     if (noteEditing)
     {
         lastNoteLabelClick.Text = Settings.Default.Notes[noteLabelID];
         materialSingleLineTextField1.TextChanged -= materialSingleLineTextField1_TextChanged;
         materialSingleLineTextField1.Hint = " What can I do for you?";
         materialSingleLineTextField1.Clear();
         ((MaterialLabel)(tabPage2.Controls["NoteLabel0"])).Focus();
         lastNoteLabelClick.BackColor = NoteLabelColor(0);
         lastNoteLabelClick = null;
         noteEditing = false;
         speedButton = 2;
         timer6.Start();
     }
     else
     {
         answer = MetroMessageBox.Show(this, Settings.Default.Notes[noteLabelID],
                          string.Format("Are you sure to delete Note{0}", noteLabelID + 1),
                          MessageBoxButtons.YesNo, MessageBoxIcon.Warning, 125);
         if (answer == DialogResult.Yes)
         {
             _login.notes[noteLabelID].close = true;
             _login.notes[noteLabelID].Close();
             lastNoteLabelClick = null;
             speedButton = 2;
             timer6.Start();
         }
     }
 }
Beispiel #12
0
 private void materialFlatButton9_Click(object sender, EventArgs e)
 {
     if (!noteEditing)
     {
         noteEditing = true;
         speedButton = 2;
         timer6.Start();
         materialSingleLineTextField1.Text = lastNoteLabelClick.Text;
         materialSingleLineTextField1.SelectAll();
         materialSingleLineTextField1.TextChanged += materialSingleLineTextField1_TextChanged;
         materialSingleLineTextField1.Hint = " Enter the new note.";
     }
     else
     {
         if (lastNoteLabelClick == null)
         {
             throw new Exception("lastNoteLabelClick is null");
         }
         int.TryParse(lastNoteLabelClick.Name.Remove(0, 9), out noteLabelID);
         _login.notes[noteLabelID].materialLabel1.Text = lastNoteLabelClick.Text;
         Settings.Default.Notes[noteLabelID] = lastNoteLabelClick.Text;
         Settings.Default.Save();
         materialSingleLineTextField1.TextChanged -= materialSingleLineTextField1_TextChanged;
         materialSingleLineTextField1.Hint = " What can I do for you?";
         materialSingleLineTextField1.Clear();
         ((MaterialLabel)(tabPage2.Controls["NoteLabel0"])).Focus();
         lastNoteLabelClick.BackColor = NoteLabelColor(0);
         lastNoteLabelClick = null;
         noteEditing = false;
         speedButton = 2;
         timer6.Start();
     }
 }