Beispiel #1
0
        /// <summary>
        /// Définit si l'animation de chargement soit s'afficher ou non
        /// </summary>
        /// <param name="panel">Panel dans lequel insérer l'animation de chargement, null si pas de chargement</param>
        public void SetLoading(Panel panel)
        {
            // débute le chargement
            if (panel != null && _pageLoaded == false)             // si on active le chargement
            {
                if (_waiting == null)
                {
                    _waiting = new Waiting();              // crée le control si pas encore fait
                }
                _waiting.Name     = "waiting";             // nom permettant de le supprimer plus facilement
                _waiting.Location = new Point(
                    (panel.Width - _waiting.Width) / 2,
                    (panel.Height - _waiting.Height) / 2
                    );

                panel.Controls.Add(_waiting);                             // ajout l'animation de chargement au panel

                _page.FlatDataGridView.DataSourceChanged(DataAddedToDgv); // méthode de callback à appeler lorsque les données sont chargées (fin du chargement)
                _page.FlatDataGridView.Visible = false;                   // désactive la dgv durant le chargement
            }
            // fin du chargement et présence de donnée
            else if (_page.FlatDataGridView.Rows.Count != 0 && _pageLoaded)
            {
                _waiting.Dispose();                    // retire l'animation de chargement

                _page.FlatDataGridView.Visible = true; // affiche les données
            }
            // fin du chargement et absence de donnée
            else if (_page.FlatDataGridView.Rows.Count == 0 && _pageLoaded)
            {
                Control parent;

                if (!_waiting.IsDisposed)
                {
                    parent = _waiting.Parent;
                    _waiting.Dispose();

                    _labelNoItem = new FlatLabel()
                    {
                        ForeColor = Theme.BackLight,
                        AutoSize  = true,
                        Font      = new Font(Theme.Font.FontFamily, 24, FontStyle.Bold),
                        Text      = @"Aucune tâche à afficher"
                    };

                    parent.Controls.Add(_labelNoItem);
                }
                else
                {
                    parent = _labelNoItem.Parent;
                }

                _labelNoItem.Left = (parent.Width - _labelNoItem.Width) / 2;
                _labelNoItem.Top  = (parent.Height - _labelNoItem.Height) / 2;
            }
        }
 /// <summary>
 ///
 /// </summary>
 private void InitializeComponent()
 {
     filterLayout       = new Panel();
     formPanel          = new TableLayoutPanel();
     filterTitleLabel   = new FlatLabel();
     filterTitle        = new ComboBox();
     filterDateFrom     = new FlatLabel();
     filterDateUntil    = new FlatLabel();
     dateFromPicker     = new DateTimePicker();
     dateUntilPicker    = new DateTimePicker();
     filterPanel        = new Panel();
     filterLabel        = new FlatHeader();
     transactionsLayout = new Panel();
     listView           = new ListView();
     columnDate         = new ColumnHeader();
     columnIdentifier   = new ColumnHeader();
     columnTitle        = new ColumnHeader();
     columnQuantity     = new ColumnHeader();
     columnTotal        = new ColumnHeader();
     transactionsPanel  = new Panel();
     transactionsLabel  = new FlatHeader();
     buttonPanel        = new Panel();
     buttonRefresh      = new FlatButton();
     buttonLogout       = new FlatButton();
     buttonSatisfy      = new FlatButton();
     filterLayout.SuspendLayout();
     formPanel.SuspendLayout();
     filterPanel.SuspendLayout();
     transactionsLayout.SuspendLayout();
     transactionsPanel.SuspendLayout();
     buttonPanel.SuspendLayout();
     SuspendLayout();
     //
     // filterLayout
     //
     filterLayout.BackColor = SystemColors.ControlDark;
     filterLayout.Controls.Add(formPanel);
     filterLayout.Controls.Add(filterPanel);
     filterLayout.Dock     = DockStyle.Top;
     filterLayout.Location = new Point(0, 0);
     filterLayout.Name     = "filterLayout";
     filterLayout.Padding  = new Padding(4, 4, 4, 0);
     filterLayout.Size     = new Size(704, 96);
     //
     // formPanel
     //
     formPanel.BackColor       = Color.Silver;
     formPanel.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
     formPanel.ColumnCount     = 4;
     formPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
     formPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
     formPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 50F));
     formPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 320F));
     formPanel.Controls.Add(filterTitleLabel, 0, 0);
     formPanel.Controls.Add(filterTitle, 1, 0);
     formPanel.Controls.Add(filterDateFrom, 2, 0);
     formPanel.Controls.Add(filterDateUntil, 2, 1);
     formPanel.Controls.Add(dateFromPicker, 3, 0);
     formPanel.Controls.Add(dateUntilPicker, 3, 1);
     formPanel.Dock     = DockStyle.Fill;
     formPanel.Location = new Point(4, 28);
     formPanel.Name     = "formPanel";
     formPanel.RowCount = 2;
     formPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
     formPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
     formPanel.Size = new Size(696, 68);
     //
     // filterTitleLabel
     //
     filterTitleLabel.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     filterTitleLabel.ForeColor = SystemColors.ControlLightLight;
     filterTitleLabel.Location  = new Point(1, 1);
     filterTitleLabel.Name      = "filterTitleLabel";
     filterTitleLabel.Size      = new Size(50, 32);
     filterTitleLabel.Text      = "Title";
     //
     // filterTitle
     //
     filterTitle.Dock                  = DockStyle.Fill;
     filterTitle.DropDownStyle         = ComboBoxStyle.DropDownList;
     filterTitle.Location              = new Point(58, 7);
     filterTitle.Margin                = new Padding(6);
     filterTitle.Name                  = "filterTitle";
     filterTitle.Size                  = new Size(259, 21);
     filterTitle.TabIndex              = 3;
     filterTitle.SelectedIndexChanged += new EventHandler(ComboCustomer_SelectedIndexChanged);
     //
     // filterDateFrom
     //
     filterDateFrom.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     filterDateFrom.ForeColor = SystemColors.ControlLightLight;
     filterDateFrom.Location  = new Point(324, 1);
     filterDateFrom.Name      = "filterDateFrom";
     filterDateFrom.Size      = new Size(50, 32);
     filterDateFrom.Text      = "From";
     //
     // filterDateUntil
     //
     filterDateUntil.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     filterDateUntil.ForeColor = SystemColors.ControlLightLight;
     filterDateUntil.Location  = new Point(324, 34);
     filterDateUntil.Name      = "filterDateUntil";
     filterDateUntil.Size      = new Size(50, 33);
     filterDateUntil.Text      = "Until";
     //
     // dateFromPicker
     //
     dateFromPicker.Dock          = DockStyle.Fill;
     dateFromPicker.Location      = new Point(381, 7);
     dateFromPicker.Margin        = new Padding(6);
     dateFromPicker.Name          = "dateFromPicker";
     dateFromPicker.ShowCheckBox  = true;
     dateFromPicker.Size          = new Size(308, 20);
     dateFromPicker.TabIndex      = 5;
     dateFromPicker.ValueChanged += new EventHandler(DateFromPicker_ValueChanged);
     //
     // dateUntilPicker
     //
     dateUntilPicker.Dock          = DockStyle.Fill;
     dateUntilPicker.Location      = new Point(381, 40);
     dateUntilPicker.Margin        = new Padding(6);
     dateUntilPicker.Name          = "dateUntilPicker";
     dateUntilPicker.ShowCheckBox  = true;
     dateUntilPicker.Size          = new Size(308, 20);
     dateUntilPicker.TabIndex      = 6;
     dateUntilPicker.ValueChanged += new EventHandler(DateToPicker_ValueChanged);
     //
     // filterPanel
     //
     filterPanel.BackColor = SystemColors.ControlDarkDark;
     filterPanel.Controls.Add(filterLabel);
     filterPanel.Dock     = DockStyle.Top;
     filterPanel.Location = new Point(4, 4);
     filterPanel.Name     = "filterPanel";
     filterPanel.Size     = new Size(696, 24);
     //
     // filterLabel
     //
     filterLabel.Dock     = DockStyle.None;
     filterLabel.Location = new Point(4, 5);
     filterLabel.Name     = "filterLabel";
     filterLabel.Size     = new Size(35, 13);
     filterLabel.Text     = "Filter";
     //
     // transactionsLayout
     //
     transactionsLayout.BackColor = SystemColors.ControlDark;
     transactionsLayout.Controls.Add(listView);
     transactionsLayout.Controls.Add(transactionsPanel);
     transactionsLayout.Dock     = DockStyle.Fill;
     transactionsLayout.Location = new Point(0, 96);
     transactionsLayout.Name     = "transactionsLayout";
     transactionsLayout.Padding  = new Padding(4);
     transactionsLayout.Size     = new Size(704, 427);
     //
     // listView
     //
     listView.BackColor = SystemColors.ControlLight;
     listView.Columns.AddRange(new ColumnHeader[] { columnDate, columnIdentifier, columnTitle, columnQuantity, columnTotal });
     listView.Dock                  = DockStyle.Fill;
     listView.FullRowSelect         = true;
     listView.GridLines             = true;
     listView.Location              = new Point(4, 28);
     listView.MultiSelect           = false;
     listView.Name                  = "listView";
     listView.Size                  = new Size(696, 395);
     listView.TabIndex              = 4;
     listView.View                  = View.Details;
     listView.SelectedIndexChanged += new EventHandler(ListView_SelectedIndexChanged);
     listView.MouseDoubleClick     += new MouseEventHandler(ListView_DoubleClicked);
     //
     // columnDate
     //
     columnDate.Text          = "Date Issued";
     columnDate.TextAlign     = HorizontalAlignment.Center;
     columnDate.Width         = 100;
     columnIdentifier.Text    = "Identifier";
     columnIdentifier.Width   = 240;
     columnTitle.Text         = "Title";
     columnTitle.Width        = 168;
     columnQuantity.Text      = "Quantity";
     columnQuantity.TextAlign = HorizontalAlignment.Center;
     columnQuantity.Width     = 64;
     columnTotal.Text         = "Total";
     columnTotal.TextAlign    = HorizontalAlignment.Center;
     columnTotal.Width        = 80;
     //
     // transactionsPanel
     //
     transactionsPanel.BackColor = SystemColors.ControlDarkDark;
     transactionsPanel.Controls.Add(transactionsLabel);
     transactionsPanel.Dock     = DockStyle.Top;
     transactionsPanel.Location = new Point(4, 4);
     transactionsPanel.Name     = "transactionsPanel";
     transactionsPanel.Size     = new Size(696, 24);
     //
     // transactionsLabel
     //
     transactionsLabel.Dock     = DockStyle.None;
     transactionsLabel.Location = new Point(4, 5);
     transactionsLabel.Name     = "transactionsLabel";
     transactionsLabel.Size     = new Size(44, 13);
     transactionsLabel.Text     = "Orders";
     //
     // buttonPanel
     //
     buttonPanel.BackColor = Color.DarkGray;
     buttonPanel.Controls.Add(buttonRefresh);
     buttonPanel.Controls.Add(buttonLogout);
     buttonPanel.Controls.Add(buttonSatisfy);
     buttonPanel.Dock     = DockStyle.Bottom;
     buttonPanel.Location = new Point(0, 523);
     buttonPanel.Name     = "buttonPanel";
     buttonPanel.Padding  = new Padding(4, 0, 4, 4);
     buttonPanel.Size     = new Size(704, 36);
     //
     // buttonRefresh
     //
     buttonRefresh.Location = new Point(144, 0);
     buttonRefresh.Margin   = new Padding(2, 3, 2, 3);
     buttonRefresh.Name     = "buttonRefresh";
     buttonRefresh.Size     = new Size(416, 32);
     buttonRefresh.TabIndex = 2;
     buttonRefresh.Text     = "Refresh";
     buttonRefresh.Click   += new EventHandler(ButtonRefresh_Click);
     //
     // buttonLogout
     //
     buttonLogout.DialogResult = DialogResult.Cancel;
     buttonLogout.Font         = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     buttonLogout.Location     = new Point(560, 0);
     buttonLogout.Margin       = new Padding(2, 3, 0, 3);
     buttonLogout.Name         = "buttonLogout";
     buttonLogout.Size         = new Size(140, 32);
     buttonLogout.TabIndex     = 3;
     buttonLogout.Text         = "Exit";
     buttonLogout.Click       += new EventHandler(ButtonLogout_Click);
     //
     // buttonSatisfy
     //
     buttonSatisfy.Font     = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     buttonSatisfy.Location = new Point(4, 0);
     buttonSatisfy.Margin   = new Padding(0, 3, 2, 3);
     buttonSatisfy.Name     = "buttonSatisfy";
     buttonSatisfy.Size     = new Size(140, 32);
     buttonSatisfy.TabIndex = 1;
     buttonSatisfy.Text     = "Satisfy Order";
     buttonSatisfy.Click   += new EventHandler(ButtonSatisfy_Click);
     //
     // WarehouseClient
     //
     AcceptButton = buttonSatisfy;
     CancelButton = buttonLogout;
     ClientSize   = new Size(704, 559);
     Controls.Add(transactionsLayout);
     Controls.Add(filterLayout);
     Controls.Add(buttonPanel);
     FormBorderStyle = FormBorderStyle.FixedSingle;
     Icon            = Resources.librettoIcon;
     MaximizeBox     = false;
     Name            = "WarehouseClient";
     StartPosition   = FormStartPosition.CenterScreen;
     Text            = "Libretto Warehouse";
     FormClosing    += new FormClosingEventHandler(WarehouseForm_FormClosing);
     Load           += new EventHandler(WarehouseClient_Load);
     filterLayout.ResumeLayout(false);
     formPanel.ResumeLayout(false);
     formPanel.PerformLayout();
     filterPanel.ResumeLayout(false);
     filterPanel.PerformLayout();
     transactionsLayout.ResumeLayout(false);
     transactionsPanel.ResumeLayout(false);
     transactionsPanel.PerformLayout();
     buttonPanel.ResumeLayout(false);
     buttonPanel.PerformLayout();
     ResumeLayout(false);
 }
Beispiel #3
0
        private new void InitializeComponent()
        {
            panel.Controls.Add(panelChild);

            panel.Dock    = DockStyle.Right;
            panel.Padding = new Padding(40, 0, 0, 20);

            // Avoid textbox auto focus
            AddElement(new FlatTextBoxAutoFocus("_"));

            // Main controls

            AirlineDAO    airlineDAO   = new AirlineDAO(Enums.Server.MariaDB);
            List <string> airlaneNames = airlineDAO.GetAllAirlinesNames();

            ComboBox comboBox = new ComboBox
            {
                Name   = "comboAirline",
                Width  = 222,
                Height = 600
            };

            comboBox.Items.Add(Enums.FlightType.Comercial);
            comboBox.Items.Add(Enums.FlightType.Cargo);
            comboBox.SelectedIndex = 0;

            //ComboBox comboBox2 = new ComboBox
            //{
            //    Name = "comboFlichtClass",
            //    Width = 222,
            //    Height = 600
            //};

            //comboBox2.Items.Add(Enums.FlightClass.Economi);
            //comboBox2.Items.Add(Enums.FlightClass.EconomiPlus);
            //comboBox2.Items.Add(Enums.FlightClass.Executive);
            //comboBox2.Items.Add(Enums.FlightClass.FirstClass);
            //comboBox2.Items.Add(Enums.FlightClass.Turist);
            //comboBox2.SelectedIndex = 0;

            ComboBox comboPist = new ComboBox
            {
                Name   = "comboPist",
                Width  = 222,
                Height = 600
            };

            List <int> pistIDList = new PistDAO(Server.MariaDB).GetAllID();

            foreach (int item in pistIDList)
            {
                comboPist.Items.Add(item);
            }
            comboPist.SelectedIndex = 0;

            AddElement(new FlatLabel("Flight", 0, 0));
            AddElement(comboBox);
            AddElement(new FlatPanelTextBox("Origin IATA"));
            AddElement(new FlatPanelTextBox("Destiny IATA"));

            DateTimePicker dateTimeDeparture = new DateTimePicker()
            {
                Name  = "dateDeparture",
                Width = 222,
            };
            DateTimePicker dateTimeArrival = new DateTimePicker()
            {
                Name  = "dateArrival",
                Width = 222,
            };


            AddElement(new FlatLabel("Departure Date", 0, 0));
            AddElement(dateTimeDeparture); // validation
            AddElement(new FlatPanelTextBox("Deperture 00:00:00"));
            AddElement(new FlatLabel("Arrival Date", 0, 0));
            AddElement(dateTimeArrival); // validation
            AddElement(new FlatPanelTextBox("Arrival 00:00:00"));
            AddElement(new FlatLabel("Pist", 0, 0));
            AddElement(comboPist);

            ComboBox comboStatus = new ComboBox
            {
                Name   = "comboStatus",
                Width  = 222,
                Height = 600
            };

            List <string> flightStatusNames = new FlightStatusDAO(Server.MariaDB).GetAllFlightStatusNames();

            foreach (string item in flightStatusNames)
            {
                comboStatus.Items.Add(item);
            }
            comboStatus.SelectedIndex = 0;
            AddElement(comboStatus);
            AddElement(new FlatButton("Save"));

            panelChild.Controls[panelChild.Controls.IndexOfKey("btnSave")].Click += new EventHandler(Save);
            panelChild.Controls[panelChild.Controls.IndexOfKey("btnSave")].Width  = panelChild.Controls[panelChild.Controls.IndexOfKey("btnSave") - 5].Width;


            // Second Column

            int secondColumntX = panelChild.Controls[2].Width + panelChild.Controls[2].Left + 100;
            int secondColumntY = panelChild.Controls[1].Top;

            FlatLabel AirlineLabel = new FlatLabel("Airline", secondColumntX, secondColumntY);

            secondColumntY += AirlineLabel.Height + 16;
            panelChild.Controls.Add(AirlineLabel);


            ComboBox comboAirline = new ComboBox
            {
                Name   = "comboAirline",
                Width  = 222,
                Height = 600,
                Top    = secondColumntY,
                Left   = panelChild.Controls[2].Width + panelChild.Controls[2].Left + 100,
            };


            List <string> airlineNames = new AirlineDAO(Server.MariaDB).GetAllAirlinesNames();

            foreach (string item in airlineNames)
            {
                comboAirline.Items.Add(item);
            }
            comboAirline.SelectedIndex = 0;

            panelChild.Controls.Add(comboAirline);
            secondColumntY += comboAirline.Height + 20;

            // Airplane
            FlatLabel AirplaneLabel = new FlatLabel("Airplane", secondColumntX, secondColumntY);

            secondColumntY += AirplaneLabel.Height + 16;
            panelChild.Controls.Add(AirplaneLabel);

            ComboBox comboAircraft = new ComboBox
            {
                Name   = "comboAircraft",
                Width  = 222,
                Height = 600,
                Top    = secondColumntY,
                Left   = panelChild.Controls[2].Width + panelChild.Controls[2].Left + 100,
            };

            UpdateAirlineFromAirline(comboAirline.SelectedItem.ToString(), ref comboAircraft);

            comboAircraft.SelectedIndex = 0;

            panelChild.Controls.Add(comboAircraft);
            secondColumntY += comboAircraft.Height + 20;


            // Pilot

            FlatLabel PilotLabel = new FlatLabel("Pilot", secondColumntX, secondColumntY);

            secondColumntY += PilotLabel.Height + 16;
            panelChild.Controls.Add(PilotLabel);

            ComboBox comboPilot = new ComboBox
            {
                Name   = "comboPilot",
                Width  = 222,
                Height = 600,
                Top    = secondColumntY,
                Left   = panelChild.Controls[2].Width + panelChild.Controls[2].Left + 100,
            };

            UpdatePilotFromAirline(comboAirline.SelectedItem.ToString(), ref comboPilot);

            if (comboPilot.Items.Count > 0)
            {
                comboPilot.SelectedIndex = 0;
            }

            panelChild.Controls.Add(comboPilot);
            secondColumntY += comboAircraft.Height + 20;

            comboAirline.SelectedIndexChanged += new EventHandler(UpdateAirplaneCombo);
            comboAirline.SelectedIndexChanged += new EventHandler(UpdatePilotCombo);
        }
 /// <summary>
 ///
 /// </summary>
 private void InitializeComponent()
 {
     formPanel1             = new TableLayoutPanel();
     invoiceTitle           = new Label();
     invoiceCustomer        = new Label();
     invoiceTitleLabel      = new FlatLabel();
     invoiceCustomerLabel   = new FlatLabel();
     invoiceIdentifierLabel = new FlatLabel();
     invoiceLabel           = new Label();
     invoiceIdentifier      = new Label();
     formPanel2             = new TableLayoutPanel();
     purchaseDate           = new Label();
     purchaseDateLabel      = new Label();
     purchaseTotal          = new Label();
     purchaseQuantity       = new Label();
     purchaseQuantityLabel  = new FlatLabel();
     purchaseTitleLabel     = new FlatLabel();
     purchaseTotalLabel     = new FlatLabel();
     purchaseLabel          = new Label();
     purchaseTitle          = new Label();
     mainPanel      = new TableLayoutPanel();
     headerPanel    = new TableLayoutPanel();
     headerPostal   = new Label();
     headerCompany  = new Label();
     headerLocation = new Label();
     pictureBox     = new PictureBox();
     formPanel1.SuspendLayout();
     formPanel2.SuspendLayout();
     mainPanel.SuspendLayout();
     headerPanel.SuspendLayout();
     ((ISupportInitialize)(pictureBox)).BeginInit();
     SuspendLayout();
     //
     // formPanel1
     //
     formPanel1.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
     formPanel1.ColumnCount     = 2;
     formPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 25F));
     formPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 75F));
     formPanel1.Controls.Add(invoiceTitle, 1, 3);
     formPanel1.Controls.Add(invoiceCustomer, 1, 2);
     formPanel1.Controls.Add(invoiceTitleLabel, 0, 3);
     formPanel1.Controls.Add(invoiceCustomerLabel, 0, 2);
     formPanel1.Controls.Add(invoiceIdentifierLabel, 0, 1);
     formPanel1.Controls.Add(invoiceLabel, 0, 0);
     formPanel1.Controls.Add(invoiceIdentifier, 1, 1);
     formPanel1.Dock     = DockStyle.Top;
     formPanel1.Location = new Point(7, 103);
     formPanel1.Name     = "formPanel1";
     formPanel1.RowCount = 4;
     formPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F));
     formPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33333F));
     formPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33333F));
     formPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33333F));
     formPanel1.Size = new Size(420, 122);
     //
     // invoiceTitle
     //
     invoiceTitle.Anchor    = AnchorStyles.Left | AnchorStyles.Right;
     invoiceTitle.AutoSize  = true;
     invoiceTitle.Location  = new Point(109, 99);
     invoiceTitle.Name      = "invoiceTitle";
     invoiceTitle.Size      = new Size(307, 13);
     invoiceTitle.TextAlign = ContentAlignment.MiddleLeft;
     //
     // invoiceCustomer
     //
     invoiceCustomer.Anchor    = AnchorStyles.Left | AnchorStyles.Right;
     invoiceCustomer.AutoSize  = true;
     invoiceCustomer.Location  = new Point(109, 67);
     invoiceCustomer.Name      = "invoiceCustomer";
     invoiceCustomer.Size      = new Size(307, 13);
     invoiceCustomer.TextAlign = ContentAlignment.MiddleLeft;
     //
     // invoiceTitleLabel
     //
     invoiceTitleLabel.Location = new Point(1, 90);
     invoiceTitleLabel.Name     = "invoiceTitleLabel";
     invoiceTitleLabel.Size     = new Size(104, 31);
     invoiceTitleLabel.Text     = "Book";
     //
     // invoiceCustomerLabel
     //
     invoiceCustomerLabel.Location = new Point(1, 58);
     invoiceCustomerLabel.Name     = "invoiceCustomerLabel";
     invoiceCustomerLabel.Size     = new Size(104, 31);
     invoiceCustomerLabel.Text     = "Customer";
     //
     // invoiceIdentifierLabel
     //
     invoiceIdentifierLabel.Location = new Point(1, 26);
     invoiceIdentifierLabel.Name     = "invoiceIdentifierLabel";
     invoiceIdentifierLabel.Size     = new Size(104, 31);
     invoiceIdentifierLabel.Text     = "Identifier";
     //
     // invoiceLabel
     //
     invoiceLabel.AutoSize    = true;
     invoiceLabel.BackColor   = SystemColors.ControlDark;
     invoiceLabel.BorderStyle = BorderStyle.FixedSingle;
     formPanel1.SetColumnSpan(invoiceLabel, 2);
     invoiceLabel.Dock      = DockStyle.Fill;
     invoiceLabel.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     invoiceLabel.ForeColor = Color.Gainsboro;
     invoiceLabel.Location  = new Point(1, 1);
     invoiceLabel.Margin    = new Padding(0);
     invoiceLabel.Name      = "invoiceLabel";
     invoiceLabel.Size      = new Size(418, 24);
     invoiceLabel.Text      = "Invoice";
     invoiceLabel.TextAlign = ContentAlignment.MiddleCenter;
     //
     // invoiceIdentifier
     //
     invoiceIdentifier.Anchor    = AnchorStyles.Left | AnchorStyles.Right;
     invoiceIdentifier.AutoSize  = true;
     invoiceIdentifier.Location  = new Point(108, 35);
     invoiceIdentifier.Name      = "invoiceIdentifier";
     invoiceIdentifier.Size      = new Size(309, 13);
     invoiceIdentifier.TextAlign = ContentAlignment.MiddleLeft;
     //
     // formPanel2
     //
     formPanel2.CellBorderStyle = TableLayoutPanelCellBorderStyle.Single;
     formPanel2.ColumnCount     = 3;
     formPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 30F));
     formPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 40F));
     formPanel2.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 30F));
     formPanel2.Controls.Add(purchaseDate, 0, 4);
     formPanel2.Controls.Add(purchaseDateLabel, 0, 3);
     formPanel2.Controls.Add(purchaseTotal, 2, 2);
     formPanel2.Controls.Add(purchaseQuantity, 0, 2);
     formPanel2.Controls.Add(purchaseQuantityLabel, 0, 1);
     formPanel2.Controls.Add(purchaseTitleLabel, 1, 1);
     formPanel2.Controls.Add(purchaseTotalLabel, 2, 1);
     formPanel2.Controls.Add(purchaseLabel, 0, 0);
     formPanel2.Controls.Add(purchaseTitle, 1, 2);
     formPanel2.Dock     = DockStyle.Top;
     formPanel2.Location = new Point(7, 231);
     formPanel2.Name     = "formPanel2";
     formPanel2.RowCount = 5;
     formPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F));
     formPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F));
     formPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
     formPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 24F));
     formPanel2.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
     formPanel2.Size = new Size(420, 130);
     //
     // purchaseDate
     //
     purchaseDate.AutoSize = true;
     formPanel2.SetColumnSpan(purchaseDate, 3);
     purchaseDate.Dock      = DockStyle.Fill;
     purchaseDate.Location  = new Point(4, 103);
     purchaseDate.Name      = "purchaseDate";
     purchaseDate.Size      = new Size(412, 26);
     purchaseDate.TextAlign = ContentAlignment.MiddleCenter;
     //
     // purchaseDateLabel
     //
     purchaseDateLabel.AutoSize    = true;
     purchaseDateLabel.BackColor   = SystemColors.ControlDark;
     purchaseDateLabel.BorderStyle = BorderStyle.FixedSingle;
     formPanel2.SetColumnSpan(purchaseDateLabel, 3);
     purchaseDateLabel.Dock      = DockStyle.Fill;
     purchaseDateLabel.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     purchaseDateLabel.ForeColor = Color.Gainsboro;
     purchaseDateLabel.Location  = new Point(1, 78);
     purchaseDateLabel.Margin    = new Padding(0);
     purchaseDateLabel.Name      = "purchaseDateLabel";
     purchaseDateLabel.Size      = new Size(418, 24);
     purchaseDateLabel.Text      = "Date";
     purchaseDateLabel.TextAlign = ContentAlignment.MiddleCenter;
     //
     // purchaseTotal
     //
     purchaseTotal.Anchor    = AnchorStyles.Left | AnchorStyles.Right;
     purchaseTotal.AutoSize  = true;
     purchaseTotal.Location  = new Point(296, 57);
     purchaseTotal.Name      = "purchaseTotal";
     purchaseTotal.Size      = new Size(120, 13);
     purchaseTotal.TextAlign = ContentAlignment.MiddleCenter;
     //
     // purchaseQuantity
     //
     purchaseQuantity.Anchor    = AnchorStyles.Left | AnchorStyles.Right;
     purchaseQuantity.AutoSize  = true;
     purchaseQuantity.Location  = new Point(4, 57);
     purchaseQuantity.Name      = "purchaseQuantity";
     purchaseQuantity.Size      = new Size(118, 13);
     purchaseQuantity.TextAlign = ContentAlignment.MiddleCenter;
     //
     // purchaseQuantityLabel
     //
     purchaseQuantityLabel.Location = new Point(1, 26);
     purchaseQuantityLabel.Name     = "purchaseQuantityLabel";
     purchaseQuantityLabel.Size     = new Size(124, 24);
     purchaseQuantityLabel.Text     = "Quantity";
     //
     // purchaseTitleLabel
     //
     purchaseTitleLabel.Location = new Point(126, 26);
     purchaseTitleLabel.Name     = "purchaseTitleLabel";
     purchaseTitleLabel.Size     = new Size(166, 24);
     purchaseTitleLabel.Text     = "Status";
     //
     // purchaseTotalLabel
     //
     purchaseTotalLabel.Location = new Point(293, 26);
     purchaseTotalLabel.Name     = "purchaseTotalLabel";
     purchaseTotalLabel.Size     = new Size(126, 24);
     purchaseTotalLabel.Text     = "Total";
     //
     // purchaseLabel
     //
     purchaseLabel.AutoSize    = true;
     purchaseLabel.BackColor   = SystemColors.ControlDark;
     purchaseLabel.BorderStyle = BorderStyle.FixedSingle;
     formPanel2.SetColumnSpan(purchaseLabel, 3);
     purchaseLabel.Dock      = DockStyle.Fill;
     purchaseLabel.Font      = new Font("Microsoft Sans Serif", 8.25F, FontStyle.Bold, GraphicsUnit.Point, 0);
     purchaseLabel.ForeColor = Color.Gainsboro;
     purchaseLabel.Location  = new Point(1, 1);
     purchaseLabel.Margin    = new Padding(0);
     purchaseLabel.Name      = "purchaseLabel";
     purchaseLabel.Size      = new Size(418, 24);
     purchaseLabel.Text      = "Transaction";
     purchaseLabel.TextAlign = ContentAlignment.MiddleCenter;
     //
     // purchaseTitle
     //
     purchaseTitle.Anchor    = AnchorStyles.Left | AnchorStyles.Right;
     purchaseTitle.AutoSize  = true;
     purchaseTitle.Location  = new Point(129, 57);
     purchaseTitle.Name      = "purchaseTitle";
     purchaseTitle.Size      = new Size(160, 13);
     purchaseTitle.Text      = "Purchased";
     purchaseTitle.TextAlign = ContentAlignment.MiddleCenter;
     //
     // mainPanel
     //
     mainPanel.ColumnCount = 1;
     mainPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
     mainPanel.Controls.Add(headerPanel, 0, 0);
     mainPanel.Controls.Add(formPanel2, 0, 2);
     mainPanel.Controls.Add(formPanel1, 0, 1);
     mainPanel.Dock     = DockStyle.Fill;
     mainPanel.Location = new Point(0, 0);
     mainPanel.Name     = "mainPanel";
     mainPanel.Padding  = new Padding(4);
     mainPanel.RowCount = 3;
     mainPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 96F));
     mainPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 128F));
     mainPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 100F));
     mainPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 20F));
     mainPanel.Size = new Size(434, 368);
     //
     // headerPanel
     //
     headerPanel.ColumnCount = 2;
     headerPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 100F));
     headerPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Absolute, 96F));
     headerPanel.Controls.Add(headerPostal, 0, 2);
     headerPanel.Controls.Add(headerCompany, 0, 0);
     headerPanel.Controls.Add(headerLocation, 0, 1);
     headerPanel.Controls.Add(pictureBox, 1, 0);
     headerPanel.Dock     = DockStyle.Fill;
     headerPanel.Location = new Point(7, 7);
     headerPanel.Name     = "headerPanel";
     headerPanel.RowCount = 3;
     headerPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33333F));
     headerPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33333F));
     headerPanel.RowStyles.Add(new RowStyle(SizeType.Percent, 33.33333F));
     headerPanel.Size = new Size(420, 90);
     //
     // headerPostal
     //
     headerPostal.AutoSize = true;
     headerPostal.Dock     = DockStyle.Fill;
     headerPostal.Font     = new Font("Calibri", 12F, FontStyle.Regular, GraphicsUnit.Point, 0);
     headerPostal.Location = new Point(3, 60);
     headerPostal.Name     = "headerPostal";
     headerPostal.Size     = new Size(318, 30);
     headerPostal.Text     = "4200-391 Porto";
     //
     // headerCompany
     //
     headerCompany.AutoSize  = true;
     headerCompany.Dock      = DockStyle.Fill;
     headerCompany.Font      = new Font("Calibri", 15.75F, FontStyle.Bold, GraphicsUnit.Point, 0);
     headerCompany.Location  = new Point(3, 0);
     headerCompany.Name      = "headerCompany";
     headerCompany.Size      = new Size(318, 30);
     headerCompany.Text      = "Libretto";
     headerCompany.TextAlign = ContentAlignment.MiddleLeft;
     //
     // headerLocation
     //
     headerLocation.AutoSize  = true;
     headerLocation.Dock      = DockStyle.Fill;
     headerLocation.Font      = new Font("Calibri", 12F, FontStyle.Regular, GraphicsUnit.Point, 0);
     headerLocation.Location  = new Point(3, 30);
     headerLocation.Name      = "headerLocation";
     headerLocation.Size      = new Size(318, 30);
     headerLocation.Text      = "Rua Dr. Roberto Frias, s/n";
     headerLocation.TextAlign = ContentAlignment.MiddleLeft;
     //
     // pictureBox
     //
     pictureBox.Dock     = DockStyle.Fill;
     pictureBox.Image    = Resources.librettoPadding;
     pictureBox.Location = new Point(327, 3);
     pictureBox.Name     = "pictureBox";
     headerPanel.SetRowSpan(pictureBox, 3);
     pictureBox.Size     = new Size(90, 84);
     pictureBox.SizeMode = PictureBoxSizeMode.Zoom;
     //
     // InvoiceForm
     //
     ClientSize = new Size(434, 368);
     Controls.Add(mainPanel);
     Name = "InvoiceForm";
     Text = "View Invoice";
     formPanel1.ResumeLayout(false);
     formPanel1.PerformLayout();
     formPanel2.ResumeLayout(false);
     formPanel2.PerformLayout();
     mainPanel.ResumeLayout(false);
     headerPanel.ResumeLayout(false);
     headerPanel.PerformLayout();
     ((ISupportInitialize)(pictureBox)).EndInit();
     ResumeLayout(false);
 }
Beispiel #5
0
 private void InitializeComponent()
 {
     this.formSkin1         = new FlatUI.FormSkin();
     this.linkLabel2        = new System.Windows.Forms.LinkLabel();
     this.linkLabel1        = new System.Windows.Forms.LinkLabel();
     this.flatStickyButton2 = new FlatUI.FlatStickyButton();
     this.flatStickyButton1 = new FlatUI.FlatStickyButton();
     this.notify            = new FlatUI.FlatAlertBox();
     this.btn_login         = new FlatUI.FlatStickyButton();
     this.flatLabel1        = new FlatUI.FlatLabel();
     this.txt_email         = new FlatUI.FlatTextBox();
     this.formSkin1.SuspendLayout();
     this.SuspendLayout();
     //
     // formSkin1
     //
     this.formSkin1.BackColor   = System.Drawing.Color.White;
     this.formSkin1.BaseColor   = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(70)))), ((int)(((byte)(73)))));
     this.formSkin1.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(53)))), ((int)(((byte)(58)))), ((int)(((byte)(60)))));
     this.formSkin1.Controls.Add(this.linkLabel2);
     this.formSkin1.Controls.Add(this.linkLabel1);
     this.formSkin1.Controls.Add(this.flatStickyButton2);
     this.formSkin1.Controls.Add(this.flatStickyButton1);
     this.formSkin1.Controls.Add(this.notify);
     this.formSkin1.Controls.Add(this.btn_login);
     this.formSkin1.Controls.Add(this.flatLabel1);
     this.formSkin1.Controls.Add(this.txt_email);
     this.formSkin1.Dock           = System.Windows.Forms.DockStyle.Fill;
     this.formSkin1.FlatColor      = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.formSkin1.Font           = new System.Drawing.Font("Segoe UI", 12F);
     this.formSkin1.HeaderColor    = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.formSkin1.HeaderMaximize = false;
     this.formSkin1.Location       = new System.Drawing.Point(0, 0);
     this.formSkin1.Name           = "formSkin1";
     this.formSkin1.Size           = new System.Drawing.Size(335, 245);
     this.formSkin1.TabIndex       = 0;
     this.formSkin1.Text           = "Đăng nhập tài khoản";
     //
     // linkLabel2
     //
     this.linkLabel2.AutoSize     = true;
     this.linkLabel2.BackColor    = System.Drawing.Color.Transparent;
     this.linkLabel2.LinkColor    = System.Drawing.Color.GreenYellow;
     this.linkLabel2.Location     = new System.Drawing.Point(14, 179);
     this.linkLabel2.Name         = "linkLabel2";
     this.linkLabel2.Size         = new System.Drawing.Size(148, 21);
     this.linkLabel2.TabIndex     = 22;
     this.linkLabel2.TabStop      = true;
     this.linkLabel2.Text         = "Hướng dẫn sử dụng";
     this.linkLabel2.Visible      = false;
     this.linkLabel2.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel2_LinkClicked);
     //
     // linkLabel1
     //
     this.linkLabel1.AutoSize     = true;
     this.linkLabel1.BackColor    = System.Drawing.Color.Transparent;
     this.linkLabel1.LinkColor    = System.Drawing.Color.GreenYellow;
     this.linkLabel1.Location     = new System.Drawing.Point(204, 178);
     this.linkLabel1.Name         = "linkLabel1";
     this.linkLabel1.Size         = new System.Drawing.Size(125, 21);
     this.linkLabel1.TabIndex     = 20;
     this.linkLabel1.TabStop      = true;
     this.linkLabel1.Text         = "Lấy access token";
     this.linkLabel1.Visible      = false;
     this.linkLabel1.LinkClicked += new System.Windows.Forms.LinkLabelLinkClickedEventHandler(this.linkLabel1_LinkClicked);
     //
     // flatStickyButton2
     //
     this.flatStickyButton2.BackColor = System.Drawing.Color.Transparent;
     this.flatStickyButton2.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.flatStickyButton2.Cursor    = System.Windows.Forms.Cursors.Hand;
     this.flatStickyButton2.Font      = new System.Drawing.Font("Segoe UI", 12F);
     this.flatStickyButton2.Location  = new System.Drawing.Point(94, 140);
     this.flatStickyButton2.Name      = "flatStickyButton2";
     this.flatStickyButton2.Rounded   = false;
     this.flatStickyButton2.Size      = new System.Drawing.Size(68, 31);
     this.flatStickyButton2.TabIndex  = 19;
     this.flatStickyButton2.Text      = "Thoát";
     this.flatStickyButton2.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(243)))), ((int)(((byte)(243)))));
     this.flatStickyButton2.Click    += new System.EventHandler(this.flatStickyButton2_Click);
     //
     // flatStickyButton1
     //
     this.flatStickyButton1.BackColor = System.Drawing.Color.Transparent;
     this.flatStickyButton1.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.flatStickyButton1.Cursor    = System.Windows.Forms.Cursors.Hand;
     this.flatStickyButton1.Font      = new System.Drawing.Font("Segoe UI", 12F);
     this.flatStickyButton1.Location  = new System.Drawing.Point(290, 12);
     this.flatStickyButton1.Name      = "flatStickyButton1";
     this.flatStickyButton1.Rounded   = false;
     this.flatStickyButton1.Size      = new System.Drawing.Size(22, 18);
     this.flatStickyButton1.TabIndex  = 18;
     this.flatStickyButton1.Text      = "x";
     this.flatStickyButton1.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(243)))), ((int)(((byte)(243)))));
     this.flatStickyButton1.Click    += new System.EventHandler(this.flatStickyButton1_Click);
     //
     // notify
     //
     this.notify.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(60)))), ((int)(((byte)(70)))), ((int)(((byte)(73)))));
     this.notify.Cursor    = System.Windows.Forms.Cursors.Hand;
     this.notify.Dock      = System.Windows.Forms.DockStyle.Bottom;
     this.notify.Font      = new System.Drawing.Font("Segoe UI", 10F);
     this.notify.kind      = FlatUI.FlatAlertBox._Kind.Success;
     this.notify.Location  = new System.Drawing.Point(0, 203);
     this.notify.Name      = "notify";
     this.notify.Size      = new System.Drawing.Size(335, 42);
     this.notify.TabIndex  = 17;
     this.notify.Text      = "ATP TOKEN dòng 2";
     this.notify.Visible   = false;
     //
     // btn_login
     //
     this.btn_login.BackColor = System.Drawing.Color.Transparent;
     this.btn_login.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.btn_login.Cursor    = System.Windows.Forms.Cursors.Hand;
     this.btn_login.Font      = new System.Drawing.Font("Segoe UI", 12F);
     this.btn_login.Location  = new System.Drawing.Point(168, 140);
     this.btn_login.Name      = "btn_login";
     this.btn_login.Rounded   = false;
     this.btn_login.Size      = new System.Drawing.Size(155, 31);
     this.btn_login.TabIndex  = 16;
     this.btn_login.Text      = "Đăng nhập";
     this.btn_login.TextColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(243)))), ((int)(((byte)(243)))));
     this.btn_login.Click    += new System.EventHandler(this.btn_login_Click);
     //
     // flatLabel1
     //
     this.flatLabel1.AutoSize  = true;
     this.flatLabel1.BackColor = System.Drawing.Color.Transparent;
     this.flatLabel1.Font      = new System.Drawing.Font("Segoe UI", 8F);
     this.flatLabel1.ForeColor = System.Drawing.Color.White;
     this.flatLabel1.Location  = new System.Drawing.Point(12, 79);
     this.flatLabel1.Name      = "flatLabel1";
     this.flatLabel1.Size      = new System.Drawing.Size(63, 13);
     this.flatLabel1.TabIndex  = 13;
     this.flatLabel1.Text      = "ATP TOKEN:";
     //
     // txt_email
     //
     this.txt_email.BackColor             = System.Drawing.Color.Transparent;
     this.txt_email.FocusOnHover          = false;
     this.txt_email.Location              = new System.Drawing.Point(94, 60);
     this.txt_email.MaxLength             = 32767;
     this.txt_email.Multiline             = true;
     this.txt_email.Name                  = "txt_email";
     this.txt_email.ReadOnly              = false;
     this.txt_email.Size                  = new System.Drawing.Size(229, 74);
     this.txt_email.TabIndex              = 12;
     this.txt_email.TextAlign             = System.Windows.Forms.HorizontalAlignment.Left;
     this.txt_email.TextColor             = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(192)))));
     this.txt_email.UseSystemPasswordChar = false;
     //
     // frm_Login
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(335, 245);
     this.Controls.Add(this.formSkin1);
     this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
     this.Name            = "frm_Login";
     this.StartPosition   = System.Windows.Forms.FormStartPosition.CenterScreen;
     this.Text            = "frm_Login";
     this.TransparencyKey = System.Drawing.Color.Fuchsia;
     this.formSkin1.ResumeLayout(false);
     this.formSkin1.PerformLayout();
     this.ResumeLayout(false);
 }