Esempio n. 1
0
        private void MainTabPages_SelectedIndexChanged(object sender, EventArgs e)
        {
            List <BlockchainLibrary.Block> blocks = _chain.BlockChain.ToList();
            var widthAddPanel = false;

            if (MainTabPages.SelectedIndex == 0)
            {
                curGrid = GridPanel;
            }
            else if (MainTabPages.SelectedIndex == 1)
            {
                curGrid       = MyOutcomePanel;
                blocks        = blocks.Where(x => x.UserFrom.UserId == sessionUser.UserId).ToList();
                widthAddPanel = true;
            }
            else if (MainTabPages.SelectedIndex == 2)
            {
                curGrid = MyIncomePanel;
                blocks  = blocks.Where(x => x.UserTo.UserId == sessionUser.UserId).ToList();
            }

            ClearPanels(curGrid);

            FillGrid(blocks, widthAddPanel);
        }
Esempio n. 2
0
        private void metroButton1_Click(object sender, EventArgs e)
        {
            if (BtnCalc.Visible == false)
            {
                BtnAttack.Text = "Вернуть исходное состояние";
                MessageBox.Show("Измените содержание любого блока. Хэш блока изменится - вы сможете наблюдать процесс нарушения всей цепочки блоков начиная от корректируемого");
                BtnCalc.Visible = true;

                foreach (Control control in GridPanel.Controls)
                {
                    if (control is MetroFramework.Controls.MetroPanel)
                    {
                        var panel      = control as MetroFramework.Controls.MetroPanel;
                        var txtContext = panel.Controls[1] as MetroFramework.Controls.MetroTextBox;
                        txtContext.ReadOnly = false;
                    }
                }
            }
            else
            {
                BtnAttack.Text  = "Применить атаку с внедрением";
                BtnCalc.Visible = false;
                curGrid         = GridPanel;
                _chain          = new Chain();
                ClearPanels(curGrid);
                FillGrid(_chain.BlockChain.ToList(), false);
            }
        }
Esempio n. 3
0
        public Bloc_Department(int position_x, int position_y, MetroFramework.Controls.MetroTabPage fenetre, List <Department> list_dep)
        {
            this.fenetre      = fenetre;
            panel_departement = new MetroFramework.Controls.MetroPanel();
            label_titre       = new MetroFramework.Controls.MetroLabel();
            button_inverser   = new MetroFramework.Controls.MetroButton();

            panel_departement.BorderStyle       = BorderStyle.FixedSingle;
            panel_departement.VerticalScrollbar = true;
            panel_departement.Location          = new Point(position_x, position_y);
            panel_departement.Size       = new Size(150, 230);
            panel_departement.AutoScroll = true;
            fenetre.Controls.Add(panel_departement);

            label_titre.Text     = "Quartier";
            label_titre.Location = new Point(10, 10);
            label_titre.Size     = new Size(60, 20);
            panel_departement.Controls.Add(label_titre);

            button_inverser.Text     = "Inverser";
            button_inverser.Location = new Point(75, 10);
            button_inverser.Size     = new Size(60, 20);
            panel_departement.Controls.Add(button_inverser);

            button_inverser.Click += Bouton_inverser_Click;


            for (int i = 0; i < list_dep.Count; i++)
            {
                Department_Element ajout = new Department_Element(list_dep[i], 10, 40 + 20 * i, panel_departement);
                list_department.Add(ajout);
            }
        }
Esempio n. 4
0
 //Открытие панели
 public static void Timer_panel_menu(Timer timer, MetroFramework.Controls.MetroPanel panel, int width)
 {
     panel.Size = new Size(width, panel.Size.Height);
     if (panel.Size.Width == width)
     {
         timer.Stop();
     }
 }
Esempio n. 5
0
 //Закрытие панели
 public static void Back_menu(Timer timer, MetroFramework.Controls.MetroPanel panel, int width)
 {
     if (back)
     {
         timer.Start();
         back = false;
     }
     else
     {
         panel.Size = new Size(width, panel.Size.Height);
         back       = true;
     }
 }
Esempio n. 6
0
        public void SideMenuButton_SetActivePage(string buttonName)
        {
            MetroFramework.Controls.MetroPanel metroPanelServerStatus = this.Controls.Find("panelSideMenuServerStatus", true).FirstOrDefault() as MetroFramework.Controls.MetroPanel;
            metroPanelServerStatus.BackColor = Color.FromArgb(142, 198, 189);
            MetroFramework.Controls.MetroPanel metroPanelHistory = this.Controls.Find("panelSideMenuReleaseHistory", true).FirstOrDefault() as MetroFramework.Controls.MetroPanel;
            metroPanelHistory.BackColor = Color.FromArgb(142, 198, 189);
            MetroFramework.Controls.MetroPanel metroPanelAcceptanceTests = this.Controls.Find("panelSideMenuAcceptanceTests", true).FirstOrDefault() as MetroFramework.Controls.MetroPanel;
            metroPanelAcceptanceTests.BackColor = Color.FromArgb(142, 198, 189);

            string panelName = "panel" + buttonName.Substring(3);

            MetroFramework.Controls.MetroPanel metroPanel = this.Controls.Find(panelName, true).FirstOrDefault() as MetroFramework.Controls.MetroPanel;
            metroPanel.BackColor = Color.FromArgb(92, 162, 150);
        }
 private void catchTheControlsOfServices()
 {
     panelOfCommLine = mainWindow.Controls.Find("mPanelComm", true).First();
     mgrid           = (MetroFramework.Controls.MetroGrid)mainWindow.Controls.Find("mGridMain", true).First();
     introPicture    = (MetroFramework.Controls.MetroPanel)mainWindow.Controls.Find("mPnlIntroPicture", true).First();
     infoLabel       = mainWindow.Controls.Find("mLabelModeShow", true).First();
     alternatLabel   = mainWindow.Controls.Find("mLblAlternativeCommline", true).First();
     logoArea        = (MetroFramework.Controls.MetroPanel)mainWindow.Controls.Find("mPnlLogoArea", true).First();
     btn1            = mainWindow.Controls.Find("metroTile1", true).First();
     btn2            = mainWindow.Controls.Find("metroTile2", true).First();
     btn3            = mainWindow.Controls.Find("metroTile3", true).First();
     btn4            = mainWindow.Controls.Find("metroTile4", true).First();
     btn5            = mainWindow.Controls.Find("metroTile5", true).First();
     btn6            = mainWindow.Controls.Find("metroTile6", true).First();
 }
Esempio n. 8
0
        //Método Animação:
        public void AtivaAnimacao(//Parametros
            MaterialSkin.Controls.MaterialFlatButton btnSalvar,
            MaterialSkin.Controls.MaterialFlatButton btnCancelar,
            MaterialSkin.Controls.MaterialFlatButton btnPadrao,
            MaterialSkin.Controls.MaterialRadioButton rdbPadrao,
            MaterialSkin.Controls.MaterialRadioButton rdbEscuro,
            MaterialSkin.Controls.MaterialRadioButton rdbClaro,
            MetroFramework.Controls.MetroPanel metroPanelSalvar,
            System.Windows.Forms.Timer timer1)
        {
            try
            {
                //Desativa enquanto salva:
                btnSalvar.Enabled   = false;
                btnCancelar.Enabled = false;
                btnPadrao.Enabled   = false;

                rdbPadrao.Enabled = false;
                rdbEscuro.Enabled = false;
                rdbClaro.Enabled  = false;

                //Incrementa:
                timerCounter++;
                metroPanelSalvar.Visible = true;
                if (timerCounter >= 100)
                {
                    timer1.Stop();

                    //Seta os padrões novamente:
                    metroPanelSalvar.Visible = false;
                    timer1.Enabled           = false;
                    timerCounter             = 0;

                    //Ativa após salvar:
                    btnSalvar.Enabled   = true;
                    btnCancelar.Enabled = true;
                    btnPadrao.Enabled   = true;

                    rdbPadrao.Enabled = true;
                    rdbEscuro.Enabled = true;
                    rdbClaro.Enabled  = true;
                }
            }
            catch (Exception)
            {
                return;
            }
        }
Esempio n. 9
0
        private void ClearPanels(MetroFramework.Controls.MetroPanel panel)
        {
            curGrid.HorizontalScroll.Value = 0;

            bool ok = true;

            do
            {
                ok = true;
                for (int i = 0; i < curGrid.Controls.Count; i++)
                {
                    if (curGrid.Controls[i] is MetroFramework.Controls.MetroPanel)
                    {
                        curGrid.Controls.RemoveAt(i);
                        ok = false;
                        break;
                    }
                }
            } while (ok == false);
        }
Esempio n. 10
0
        /// <summary>
        /// Load list of task to its panel
        /// </summary>
        /// <param name="taskList">List of task</param>
        /// <param name="panel">Panel to load</param>
        private void LoadPanel(List <Task> taskList, MetroFramework.Controls.MetroPanel panel)
        {
            panel.Controls.Clear();

            for (int i = 0; i < taskList.Count; i++)
            {
                allTask.Add(taskList[i]);
                var title        = taskList[i].Title;
                var details      = taskList[i].Details;
                var priority     = taskList[i].Priority;
                var status       = taskList[i].Status;
                var categoryName = taskList[i].CategoryName;
                try
                {
                    CreateTaskCard(i, title, details, priority, status, categoryName, panel);
                }
                catch (MySql.Data.MySqlClient.MySqlException e)
                {
                    ErrorLog.Write(e);
                }
                catch (ArgumentOutOfRangeException e)
                {
                    ErrorLog.Write(e);
                }
                catch (IndexOutOfRangeException e)
                {
                    ErrorLog.Write(e);
                    var dialog = MetroMessageBox.Show(this, e.Message, "Error !", MessageBoxButtons.RetryCancel, MessageBoxIcon.Error);
                    if (dialog == DialogResult.Retry)
                    {
                        LoadData();
                    }
                    else
                    {
                        this.Close();
                    }
                }
            }
        }
Esempio n. 11
0
        // Side Line And Tab Animation Function
        private void ShowSideLine(object sender, EventArgs e)
        {
            // Convert Sender Object To Button of Bunifi Framework
            Bunifu.Framework.UI.BunifuFlatButton btn = (Bunifu.Framework.UI.BunifuFlatButton)sender;

            #region Side Line Animation
            // If The Button That Run The Function Is Not The Current Active One
            if (SideLine.Location.Y != btn.Location.Y)
            {
                // SideLine.Location = new System.Drawing.Point(SideLine.Location.X, btn.Location.Y);
                // Make New Transition Element
                Transition HeightChange = new Transition(new TransitionType_EaseInEaseOut(300)),
                           ColorChange  = new Transition(new TransitionType_EaseInEaseOut(500));
                // Add Description Of The Transition
                HeightChange.add(SideLine, "Top", btn.Location.Y);
                ColorChange.add(btn, "BackColor", Color.Black);


                // Run Transition
                HeightChange.run();
                ColorChange.run();
            }
            #endregion

            #region Switch Tabs
            if (!btn.Active)
            {
                MetroFramework.Controls.MetroPanel panel = this.Controls.Find($"{btn.Text.Trim()}Tab", true).FirstOrDefault() as MetroFramework.Controls.MetroPanel;
                if (panel != null)
                {
                    panel.BringToFront();
                }
            }

            #endregion
        }
Esempio n. 12
0
        private void AddNewPanel()
        {
            var panel = new MetroFramework.Controls.MetroPanel()
            {
                Anchor      = (AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top),
                Size        = GetSizePanel,
                Location    = new System.Drawing.Point(curLocation.X, curLocation.Y),
                BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            };

            panel.Controls.Clear();

            var txtHash = new MetroFramework.Controls.MetroTextBox
            {
                Anchor   = (AnchorStyles.Left | AnchorStyles.Top),
                Text     = "Рассчитываемый хеш блока будет здесь",
                Enabled  = false,
                ReadOnly = true,
                Size     = new System.Drawing.Size()
                {
                    Width = GetSizeTxtHash.Width, Height = GetSizeTxtHash.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtHash.X, GetLocationTxtHash.Y)
            };

            panel.Controls.Add(txtHash);

            var txtContent = new MetroFramework.Controls.MetroTextBox
            {
                Anchor    = (AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top),
                Multiline = true,
                Size      = new System.Drawing.Size()
                {
                    Width = GetSizeTxtContent.Width, Height = GetSizeTxtContent.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtContent.X, GetLocationTxtContent.Y)
            };

            txtContent.TextChanged += SaveText;
            panel.Controls.Add(txtContent);

            var users   = _dataProvider.GetUsers().Where(x => x.UserId != sessionUser.UserId).ToList();
            var cmbUser = new MetroFramework.Controls.MetroComboBox
            {
                Anchor = (AnchorStyles.Left | AnchorStyles.Bottom),
                Name   = "cmbUser",
                Size   = new System.Drawing.Size()
                {
                    Width = GetSizeTxtUser.Width + GetSizeTxtDateTime.Width + 2, Height = GetSizeTxtDateTime.Height
                },
                Location      = new System.Drawing.Point(GetLocationTxtUser.X, GetLocationTxtUser.Y),
                DataSource    = users,
                DisplayMember = "Login",
                ValueMember   = "UserID"
            };

            cmbUser.SelectedItem          = null;
            cmbUser.SelectedIndexChanged += SaveUser;
            panel.Controls.Add(cmbUser);

            var txtMoney = new MetroFramework.Controls.MetroTextBox
            {
                Anchor    = (AnchorStyles.Left | AnchorStyles.Bottom),
                WaterMark = "Сумма",
                Name      = "txtMoney",
                Size      = new System.Drawing.Size()
                {
                    Width = GetSizeTxtMoney.Width, Height = GetSizeTxtMoney.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtMoney.X + GetSizeTxtDateTime.Width + 2, GetLocationTxtMoney.Y)
            };

            txtMoney.TextChanged += SaveMoney;
            panel.Controls.Add(txtMoney);

            var button = new MetroFramework.Controls.MetroButton()
            {
                Anchor = (AnchorStyles.Left | AnchorStyles.Bottom),
                Name   = "button",
                Text   = "Создать новый блок",
                Size   = new System.Drawing.Size()
                {
                    Width = GetSizeTxtHash.Width, Height = GetSizeTxtHash.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtPrevHash.X, GetLocationTxtPrevHash.Y),
            };

            button.Click += CreateNewBlock;
            panel.Controls.Add(button);

            curGrid.Controls.Add(panel);
            curLocation = new Point(panel.Location.X + panel.Width + OFFSET, panel.Location.Y);
            curPanel    = panel;
        }
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.txtBx         = new System.Windows.Forms.TextBox();
     this.lab1          = new System.Windows.Forms.Label();
     this.lab2          = new System.Windows.Forms.Label();
     this.lab3          = new System.Windows.Forms.Label();
     this.lab4          = new System.Windows.Forms.Label();
     this.lab5          = new System.Windows.Forms.Label();
     this.lab6          = new System.Windows.Forms.Label();
     this.lab7          = new System.Windows.Forms.Label();
     this.lab8          = new System.Windows.Forms.Label();
     this.lab9          = new System.Windows.Forms.Label();
     this.mtrPan1       = new MetroFramework.Controls.MetroPanel();
     this.picture_R     = new System.Windows.Forms.PictureBox();
     this.picture_G     = new System.Windows.Forms.PictureBox();
     this.picture_B     = new System.Windows.Forms.PictureBox();
     this.mtrPan2       = new MetroFramework.Controls.MetroPanel();
     this.picture_egn_R = new System.Windows.Forms.PictureBox();
     this.picture_egn_G = new System.Windows.Forms.PictureBox();
     this.picture_egn_B = new System.Windows.Forms.PictureBox();
     this.mtrTl1        = new MetroFramework.Controls.MetroTile();
     this.mtrTl2        = new MetroFramework.Controls.MetroTile();
     this.picture       = new System.Windows.Forms.PictureBox();
     this.mtrPan1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.picture_R)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_G)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_B)).BeginInit();
     this.mtrPan2.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.picture_egn_R)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_egn_G)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_egn_B)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture)).BeginInit();
     this.SuspendLayout();
     //
     // txtBx
     //
     this.txtBx.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.txtBx.Location    = new System.Drawing.Point(821, 188);
     this.txtBx.Name        = "txtBx";
     this.txtBx.Size        = new System.Drawing.Size(287, 20);
     this.txtBx.TabIndex    = 0;
     //
     // lab1
     //
     this.lab1.AutoSize = true;
     this.lab1.Location = new System.Drawing.Point(1036, 221);
     this.lab1.Name     = "lab1";
     this.lab1.Size     = new System.Drawing.Size(72, 13);
     this.lab1.TabIndex = 10;
     this.lab1.Text     = "الصوره الاصليه";
     //
     // lab2
     //
     this.lab2.AutoSize = true;
     this.lab2.Location = new System.Drawing.Point(575, 22);
     this.lab2.Name     = "lab2";
     this.lab2.Size     = new System.Drawing.Size(29, 13);
     this.lab2.TabIndex = 11;
     this.lab2.Text     = "احمر";
     //
     // lab3
     //
     this.lab3.AutoSize = true;
     this.lab3.Location = new System.Drawing.Point(365, 22);
     this.lab3.Name     = "lab3";
     this.lab3.Size     = new System.Drawing.Size(31, 13);
     this.lab3.TabIndex = 12;
     this.lab3.Text     = "اخضر";
     //
     // lab4
     //
     this.lab4.AutoSize = true;
     this.lab4.Location = new System.Drawing.Point(164, 22);
     this.lab4.Name     = "lab4";
     this.lab4.Size     = new System.Drawing.Size(28, 13);
     this.lab4.TabIndex = 13;
     this.lab4.Text     = "ازرق";
     //
     // lab5
     //
     this.lab5.AutoSize = true;
     this.lab5.Location = new System.Drawing.Point(536, 25);
     this.lab5.Name     = "lab5";
     this.lab5.Size     = new System.Drawing.Size(68, 13);
     this.lab5.TabIndex = 14;
     this.lab5.Text     = "الصوره الاولي";
     //
     // lab6
     //
     this.lab6.AutoSize = true;
     this.lab6.Location = new System.Drawing.Point(331, 25);
     this.lab6.Name     = "lab6";
     this.lab6.Size     = new System.Drawing.Size(65, 13);
     this.lab6.TabIndex = 15;
     this.lab6.Text     = "الصوره الثانيه";
     //
     // lab7
     //
     this.lab7.AutoSize = true;
     this.lab7.Location = new System.Drawing.Point(127, 25);
     this.lab7.Name     = "lab7";
     this.lab7.Size     = new System.Drawing.Size(65, 13);
     this.lab7.TabIndex = 16;
     this.lab7.Text     = "الصوره الثالثه";
     //
     // lab8
     //
     this.lab8.AutoSize = true;
     this.lab8.Location = new System.Drawing.Point(630, 98);
     this.lab8.Name     = "lab8";
     this.lab8.Size     = new System.Drawing.Size(118, 13);
     this.lab8.TabIndex = 19;
     this.lab8.Text     = "Egin Value قبل اضافه ال";
     this.lab8.Click   += new System.EventHandler(this.lab8_Click);
     //
     // lab9
     //
     this.lab9.AutoSize = true;
     this.lab9.Location = new System.Drawing.Point(632, 380);
     this.lab9.Name     = "lab9";
     this.lab9.Size     = new System.Drawing.Size(116, 13);
     this.lab9.TabIndex = 21;
     this.lab9.Text     = "Egin Value بعد اضافه ال";
     //
     // mtrPan1
     //
     this.mtrPan1.BackColor   = System.Drawing.Color.White;
     this.mtrPan1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.mtrPan1.Controls.Add(this.picture_R);
     this.mtrPan1.Controls.Add(this.picture_G);
     this.mtrPan1.Controls.Add(this.picture_B);
     this.mtrPan1.Controls.Add(this.lab4);
     this.mtrPan1.Controls.Add(this.lab2);
     this.mtrPan1.Controls.Add(this.lab3);
     this.mtrPan1.HorizontalScrollbarBarColor         = true;
     this.mtrPan1.HorizontalScrollbarHighlightOnWheel = false;
     this.mtrPan1.HorizontalScrollbarSize             = 10;
     this.mtrPan1.Location                          = new System.Drawing.Point(120, 104);
     this.mtrPan1.Name                              = "mtrPan1";
     this.mtrPan1.Size                              = new System.Drawing.Size(632, 256);
     this.mtrPan1.Style                             = MetroFramework.MetroColorStyle.Silver;
     this.mtrPan1.TabIndex                          = 18;
     this.mtrPan1.UseStyleColors                    = true;
     this.mtrPan1.VerticalScrollbarBarColor         = true;
     this.mtrPan1.VerticalScrollbarHighlightOnWheel = false;
     this.mtrPan1.VerticalScrollbarSize             = 10;
     //
     // picture_R
     //
     this.picture_R.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.picture_R.Location    = new System.Drawing.Point(436, 51);
     this.picture_R.Name        = "picture_R";
     this.picture_R.Size        = new System.Drawing.Size(168, 180);
     this.picture_R.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.picture_R.TabIndex    = 2;
     this.picture_R.TabStop     = false;
     //
     // picture_G
     //
     this.picture_G.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.picture_G.Location    = new System.Drawing.Point(228, 51);
     this.picture_G.Name        = "picture_G";
     this.picture_G.Size        = new System.Drawing.Size(168, 180);
     this.picture_G.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.picture_G.TabIndex    = 3;
     this.picture_G.TabStop     = false;
     //
     // picture_B
     //
     this.picture_B.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.picture_B.Location    = new System.Drawing.Point(21, 51);
     this.picture_B.Name        = "picture_B";
     this.picture_B.Size        = new System.Drawing.Size(168, 180);
     this.picture_B.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.picture_B.TabIndex    = 5;
     this.picture_B.TabStop     = false;
     //
     // mtrPan2
     //
     this.mtrPan2.BackColor   = System.Drawing.Color.White;
     this.mtrPan2.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
     this.mtrPan2.Controls.Add(this.lab5);
     this.mtrPan2.Controls.Add(this.lab6);
     this.mtrPan2.Controls.Add(this.lab7);
     this.mtrPan2.Controls.Add(this.picture_egn_R);
     this.mtrPan2.Controls.Add(this.picture_egn_G);
     this.mtrPan2.Controls.Add(this.picture_egn_B);
     this.mtrPan2.HorizontalScrollbarBarColor         = true;
     this.mtrPan2.HorizontalScrollbarHighlightOnWheel = false;
     this.mtrPan2.HorizontalScrollbarSize             = 10;
     this.mtrPan2.Location = new System.Drawing.Point(120, 386);
     this.mtrPan2.Name     = "mtrPan2";
     this.mtrPan2.Size     = new System.Drawing.Size(632, 253);
     this.mtrPan2.TabIndex = 20;
     this.mtrPan2.VerticalScrollbarBarColor         = true;
     this.mtrPan2.VerticalScrollbarHighlightOnWheel = false;
     this.mtrPan2.VerticalScrollbarSize             = 10;
     this.mtrPan2.Paint += new System.Windows.Forms.PaintEventHandler(this.mtrPan2_Paint);
     //
     // picture_egn_R
     //
     this.picture_egn_R.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.picture_egn_R.Location    = new System.Drawing.Point(436, 51);
     this.picture_egn_R.Name        = "picture_egn_R";
     this.picture_egn_R.Size        = new System.Drawing.Size(168, 180);
     this.picture_egn_R.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.picture_egn_R.TabIndex    = 6;
     this.picture_egn_R.TabStop     = false;
     //
     // picture_egn_G
     //
     this.picture_egn_G.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.picture_egn_G.Location    = new System.Drawing.Point(225, 51);
     this.picture_egn_G.Name        = "picture_egn_G";
     this.picture_egn_G.Size        = new System.Drawing.Size(168, 180);
     this.picture_egn_G.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.picture_egn_G.TabIndex    = 7;
     this.picture_egn_G.TabStop     = false;
     //
     // picture_egn_B
     //
     this.picture_egn_B.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.picture_egn_B.Location    = new System.Drawing.Point(21, 51);
     this.picture_egn_B.Name        = "picture_egn_B";
     this.picture_egn_B.Size        = new System.Drawing.Size(168, 180);
     this.picture_egn_B.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.picture_egn_B.TabIndex    = 8;
     this.picture_egn_B.TabStop     = false;
     //
     // mtrTl1
     //
     this.mtrTl1.ActiveControl      = null;
     this.mtrTl1.BackColor          = System.Drawing.Color.LimeGreen;
     this.mtrTl1.Location           = new System.Drawing.Point(821, 104);
     this.mtrTl1.Name               = "mtrTl1";
     this.mtrTl1.Size               = new System.Drawing.Size(138, 78);
     this.mtrTl1.Style              = MetroFramework.MetroColorStyle.Green;
     this.mtrTl1.TabIndex           = 22;
     this.mtrTl1.Text               = "تحرير";
     this.mtrTl1.TextAlign          = System.Drawing.ContentAlignment.MiddleCenter;
     this.mtrTl1.Theme              = MetroFramework.MetroThemeStyle.Light;
     this.mtrTl1.TileTextFontWeight = MetroFramework.MetroTileTextWeight.Regular;
     this.mtrTl1.UseSelectable      = true;
     this.mtrTl1.Click             += new System.EventHandler(this.button1_Click);
     //
     // mtrTl2
     //
     this.mtrTl2.ActiveControl = null;
     this.mtrTl2.Location      = new System.Drawing.Point(970, 104);
     this.mtrTl2.Name          = "mtrTl2";
     this.mtrTl2.Size          = new System.Drawing.Size(138, 78);
     this.mtrTl2.Style         = MetroFramework.MetroColorStyle.Green;
     this.mtrTl2.TabIndex      = 23;
     this.mtrTl2.Text          = "صوره جديده";
     this.mtrTl2.TextAlign     = System.Drawing.ContentAlignment.MiddleCenter;
     this.mtrTl2.Theme         = MetroFramework.MetroThemeStyle.Dark;
     this.mtrTl2.UseSelectable = true;
     this.mtrTl2.UseTileImage  = true;
     this.mtrTl2.Click        += new System.EventHandler(this.button2_Click);
     //
     // picture
     //
     this.picture.BackColor   = System.Drawing.Color.White;
     this.picture.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.picture.Location    = new System.Drawing.Point(821, 246);
     this.picture.Name        = "picture";
     this.picture.Size        = new System.Drawing.Size(284, 243);
     this.picture.SizeMode    = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.picture.TabIndex    = 9;
     this.picture.TabStop     = false;
     //
     // Form1
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(1174, 671);
     this.Controls.Add(this.txtBx);
     this.Controls.Add(this.lab1);
     this.Controls.Add(this.lab8);
     this.Controls.Add(this.lab9);
     this.Controls.Add(this.mtrPan1);
     this.Controls.Add(this.mtrPan2);
     this.Controls.Add(this.mtrTl1);
     this.Controls.Add(this.mtrTl2);
     this.Controls.Add(this.picture);
     this.MaximizeBox = false;
     this.Name        = "Form1";
     this.Resizable   = false;
     this.Text        = "Eigen Value Decomposition";
     this.Load       += new System.EventHandler(this.Form1_Load);
     this.mtrPan1.ResumeLayout(false);
     this.mtrPan1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.picture_R)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_G)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_B)).EndInit();
     this.mtrPan2.ResumeLayout(false);
     this.mtrPan2.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.picture_egn_R)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_egn_G)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture_egn_B)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.picture)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
 /// <summary>
 /// Требуемый метод для поддержки конструктора — не изменяйте
 /// содержимое этого метода с помощью редактора кода.
 /// </summary>
 private void InitializeComponent()
 {
     MetroFramework.Controls.MetroPanel metroPanel1;
     this.powerLabel        = new MetroFramework.Controls.MetroLabel();
     this.nameLabel         = new MetroFramework.Controls.MetroLabel();
     this.rarityColorBorder = new MetroFramework.Controls.MetroPanel();
     metroPanel1            = new MetroFramework.Controls.MetroPanel();
     metroPanel1.SuspendLayout();
     this.rarityColorBorder.SuspendLayout();
     this.SuspendLayout();
     //
     // metroPanel1
     //
     metroPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                 | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     metroPanel1.BackColor = System.Drawing.Color.White;
     metroPanel1.Controls.Add(this.powerLabel);
     metroPanel1.Controls.Add(this.nameLabel);
     metroPanel1.HorizontalScrollbarBarColor         = true;
     metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
     metroPanel1.HorizontalScrollbarSize             = 10;
     metroPanel1.Location = new System.Drawing.Point(3, 3);
     metroPanel1.Name     = "metroPanel1";
     metroPanel1.Size     = new System.Drawing.Size(224, 357);
     metroPanel1.TabIndex = 2;
     metroPanel1.VerticalScrollbarBarColor         = true;
     metroPanel1.VerticalScrollbarHighlightOnWheel = false;
     metroPanel1.VerticalScrollbarSize             = 10;
     metroPanel1.Click += new System.EventHandler(this.metroPanel1_Click_1);
     //
     // powerLabel
     //
     this.powerLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     this.powerLabel.FontSize   = MetroFramework.MetroLabelSize.Tall;
     this.powerLabel.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.powerLabel.Location   = new System.Drawing.Point(3, 51);
     this.powerLabel.Name       = "powerLabel";
     this.powerLabel.Size       = new System.Drawing.Size(218, 47);
     this.powerLabel.TabIndex   = 3;
     this.powerLabel.Text       = "metroLabel1";
     this.powerLabel.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // nameLabel
     //
     this.nameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.nameLabel.FontSize   = MetroFramework.MetroLabelSize.Tall;
     this.nameLabel.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.nameLabel.Location   = new System.Drawing.Point(3, 0);
     this.nameLabel.Name       = "nameLabel";
     this.nameLabel.Size       = new System.Drawing.Size(218, 51);
     this.nameLabel.TabIndex   = 2;
     this.nameLabel.Text       = "metroLabel1";
     this.nameLabel.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // rarityColorBorder
     //
     this.rarityColorBorder.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                            | System.Windows.Forms.AnchorStyles.Left)
                                                                           | System.Windows.Forms.AnchorStyles.Right)));
     this.rarityColorBorder.BackColor = System.Drawing.Color.Red;
     this.rarityColorBorder.Controls.Add(metroPanel1);
     this.rarityColorBorder.HorizontalScrollbarBarColor         = true;
     this.rarityColorBorder.HorizontalScrollbarHighlightOnWheel = false;
     this.rarityColorBorder.HorizontalScrollbarSize             = 10;
     this.rarityColorBorder.Location                          = new System.Drawing.Point(3, 3);
     this.rarityColorBorder.Name                              = "rarityColorBorder";
     this.rarityColorBorder.Size                              = new System.Drawing.Size(230, 363);
     this.rarityColorBorder.TabIndex                          = 1;
     this.rarityColorBorder.UseCustomBackColor                = true;
     this.rarityColorBorder.VerticalScrollbarBarColor         = true;
     this.rarityColorBorder.VerticalScrollbarHighlightOnWheel = false;
     this.rarityColorBorder.VerticalScrollbarSize             = 10;
     //
     // PlayerControl
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.rarityColorBorder);
     this.Name = "PlayerControl";
     this.Size = new System.Drawing.Size(236, 369);
     metroPanel1.ResumeLayout(false);
     this.rarityColorBorder.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Esempio n. 15
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.metroPanel1 = new MetroFramework.Controls.MetroPanel();
     this.btnPassword = new MetroFramework.Controls.MetroButton();
     this.txtPassword = new MetroFramework.Controls.MetroTextBox();
     this.lnkUser = new MetroFramework.Controls.MetroLabel();
     this.metroLabel1 = new MetroFramework.Controls.MetroLabel();
     this.pictureBox1 = new System.Windows.Forms.PictureBox();
     this.metroPanel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     this.SuspendLayout();
     //
     // metroPanel1
     //
     this.metroPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Left | System.Windows.Forms.AnchorStyles.Right)));
     this.metroPanel1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(192)))), ((int)(((byte)(128)))));
     this.metroPanel1.Controls.Add(this.btnPassword);
     this.metroPanel1.Controls.Add(this.txtPassword);
     this.metroPanel1.Controls.Add(this.lnkUser);
     this.metroPanel1.Controls.Add(this.metroLabel1);
     this.metroPanel1.Controls.Add(this.pictureBox1);
     this.metroPanel1.HorizontalScrollbarBarColor = true;
     this.metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
     this.metroPanel1.HorizontalScrollbarSize = 10;
     this.metroPanel1.Location = new System.Drawing.Point(1, 63);
     this.metroPanel1.Name = "metroPanel1";
     this.metroPanel1.Size = new System.Drawing.Size(1119, 232);
     this.metroPanel1.TabIndex = 0;
     this.metroPanel1.UseCustomBackColor = true;
     this.metroPanel1.VerticalScrollbarBarColor = true;
     this.metroPanel1.VerticalScrollbarHighlightOnWheel = false;
     this.metroPanel1.VerticalScrollbarSize = 10;
     //
     // btnPassword
     //
     this.btnPassword.Anchor = System.Windows.Forms.AnchorStyles.None;
     this.btnPassword.Location = new System.Drawing.Point(611, 196);
     this.btnPassword.Name = "btnPassword";
     this.btnPassword.Size = new System.Drawing.Size(75, 23);
     this.btnPassword.TabIndex = 6;
     this.btnPassword.Text = "&Unlock";
     this.btnPassword.UseSelectable = true;
     this.btnPassword.Click += new System.EventHandler(this.btnPassword_Click);
     //
     // txtPassword
     //
     this.txtPassword.Anchor = System.Windows.Forms.AnchorStyles.None;
     //
     //
     //
     this.txtPassword.CustomButton.Image = null;
     this.txtPassword.CustomButton.Location = new System.Drawing.Point(230, 2);
     this.txtPassword.CustomButton.Name = "";
     this.txtPassword.CustomButton.Size = new System.Drawing.Size(21, 21);
     this.txtPassword.CustomButton.Style = MetroFramework.MetroColorStyle.Blue;
     this.txtPassword.CustomButton.TabIndex = 1;
     this.txtPassword.CustomButton.Theme = MetroFramework.MetroThemeStyle.Light;
     this.txtPassword.CustomButton.UseSelectable = true;
     this.txtPassword.CustomButton.Visible = false;
     this.txtPassword.DisplayIcon = true;
     this.txtPassword.Icon = global::VotingSystem.Properties.Resources.padlock;
     this.txtPassword.Lines = new string[0];
     this.txtPassword.Location = new System.Drawing.Point(432, 164);
     this.txtPassword.MaxLength = 32767;
     this.txtPassword.Name = "txtPassword";
     this.txtPassword.PasswordChar = '●';
     this.txtPassword.PromptText = "enter password";
     this.txtPassword.ScrollBars = System.Windows.Forms.ScrollBars.None;
     this.txtPassword.SelectedText = "";
     this.txtPassword.SelectionLength = 0;
     this.txtPassword.SelectionStart = 0;
     this.txtPassword.ShortcutsEnabled = true;
     this.txtPassword.Size = new System.Drawing.Size(254, 26);
     this.txtPassword.TabIndex = 5;
     this.txtPassword.UseSelectable = true;
     this.txtPassword.UseSystemPasswordChar = true;
     this.txtPassword.WaterMark = "enter password";
     this.txtPassword.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
     this.txtPassword.WaterMarkFont = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
     //
     // lnkUser
     //
     this.lnkUser.Anchor = System.Windows.Forms.AnchorStyles.None;
     this.lnkUser.Location = new System.Drawing.Point(427, 129);
     this.lnkUser.Name = "lnkUser";
     this.lnkUser.Size = new System.Drawing.Size(264, 23);
     this.lnkUser.TabIndex = 4;
     this.lnkUser.Text = "metroLabel2";
     this.lnkUser.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     this.lnkUser.UseCustomBackColor = true;
     //
     // metroLabel1
     //
     this.metroLabel1.Anchor = System.Windows.Forms.AnchorStyles.None;
     this.metroLabel1.AutoSize = true;
     this.metroLabel1.Location = new System.Drawing.Point(427, 110);
     this.metroLabel1.Name = "metroLabel1";
     this.metroLabel1.Size = new System.Drawing.Size(264, 19);
     this.metroLabel1.TabIndex = 3;
     this.metroLabel1.Text = "This program is in use and has been locked.";
     this.metroLabel1.UseCustomBackColor = true;
     //
     // pictureBox1
     //
     this.pictureBox1.Anchor = System.Windows.Forms.AnchorStyles.Top;
     this.pictureBox1.Image = global::VotingSystem.Properties.Resources.logo_generic__2_1;
     this.pictureBox1.Location = new System.Drawing.Point(388, 3);
     this.pictureBox1.Name = "pictureBox1";
     this.pictureBox1.Size = new System.Drawing.Size(343, 96);
     this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
     this.pictureBox1.TabIndex = 2;
     this.pictureBox1.TabStop = false;
     this.pictureBox1.Click += new System.EventHandler(this.pictureBox1_Click);
     //
     // FrmUserLock
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize = new System.Drawing.Size(1120, 343);
     this.ControlBox = false;
     this.Controls.Add(this.metroPanel1);
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name = "FrmUserLock";
     this.ShowIcon = false;
     this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmUserLock_FormClosing);
     this.Load += new System.EventHandler(this.FrmUserLock_Load);
     this.metroPanel1.ResumeLayout(false);
     this.metroPanel1.PerformLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     this.ResumeLayout(false);
 }
Esempio n. 16
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.Txt_Titre3          = new System.Windows.Forms.Label();
     this.TxtBox_MotDePasse   = new MetroFramework.Controls.MetroTextBox();
     this.Btn_VerifierMDP     = new MetroFramework.Controls.MetroButton();
     this.Btn_RetourMDP       = new MetroFramework.Controls.MetroButton();
     this.Pnl_ChiffreMdp      = new MetroFramework.Controls.MetroPanel();
     this.Btn_NombreMDP0      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP9      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP8      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP7      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP6      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP5      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP4      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP3      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP2      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDP1      = new MetroFramework.Controls.MetroButton();
     this.Btn_NombreMDPRetour = new MetroFramework.Controls.MetroButton();
     this.pictureBox1         = new System.Windows.Forms.PictureBox();
     this.Pnl_ChiffreMdp.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
     this.SuspendLayout();
     //
     // Txt_Titre3
     //
     this.Txt_Titre3.AutoSize  = true;
     this.Txt_Titre3.Font      = new System.Drawing.Font("Roboto Th", 39.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.Txt_Titre3.ForeColor = System.Drawing.SystemColors.ControlDark;
     this.Txt_Titre3.Location  = new System.Drawing.Point(555, 40);
     this.Txt_Titre3.Name      = "Txt_Titre3";
     this.Txt_Titre3.Size      = new System.Drawing.Size(810, 65);
     this.Txt_Titre3.TabIndex  = 2;
     this.Txt_Titre3.Text      = "Merci de saisir votre mot de passe";
     //
     // TxtBox_MotDePasse
     //
     this.TxtBox_MotDePasse.CharacterCasing = System.Windows.Forms.CharacterCasing.Upper;
     //
     //
     //
     this.TxtBox_MotDePasse.CustomButton.Image         = null;
     this.TxtBox_MotDePasse.CustomButton.Location      = new System.Drawing.Point(373, 2);
     this.TxtBox_MotDePasse.CustomButton.Name          = string.Empty;
     this.TxtBox_MotDePasse.CustomButton.Size          = new System.Drawing.Size(195, 195);
     this.TxtBox_MotDePasse.CustomButton.Style         = MetroFramework.MetroColorStyle.Blue;
     this.TxtBox_MotDePasse.CustomButton.TabIndex      = 1;
     this.TxtBox_MotDePasse.CustomButton.Theme         = MetroFramework.MetroThemeStyle.Light;
     this.TxtBox_MotDePasse.CustomButton.UseSelectable = true;
     this.TxtBox_MotDePasse.CustomButton.Visible       = false;
     this.TxtBox_MotDePasse.DisplayIcon           = true;
     this.TxtBox_MotDePasse.FontSize              = MetroFramework.MetroTextBoxSize.Tall;
     this.TxtBox_MotDePasse.Lines                 = new string[0];
     this.TxtBox_MotDePasse.Location              = new System.Drawing.Point(207, 424);
     this.TxtBox_MotDePasse.MaxLength             = 4;
     this.TxtBox_MotDePasse.Name                  = "TxtBox_MotDePasse";
     this.TxtBox_MotDePasse.PasswordChar          = '●';
     this.TxtBox_MotDePasse.ScrollBars            = System.Windows.Forms.ScrollBars.None;
     this.TxtBox_MotDePasse.SelectedText          = string.Empty;
     this.TxtBox_MotDePasse.SelectionLength       = 0;
     this.TxtBox_MotDePasse.SelectionStart        = 0;
     this.TxtBox_MotDePasse.ShortcutsEnabled      = true;
     this.TxtBox_MotDePasse.ShowClearButton       = true;
     this.TxtBox_MotDePasse.Size                  = new System.Drawing.Size(571, 200);
     this.TxtBox_MotDePasse.TabIndex              = 3;
     this.TxtBox_MotDePasse.TextAlign             = System.Windows.Forms.HorizontalAlignment.Center;
     this.TxtBox_MotDePasse.UseCustomBackColor    = true;
     this.TxtBox_MotDePasse.UseCustomForeColor    = true;
     this.TxtBox_MotDePasse.UseSelectable         = true;
     this.TxtBox_MotDePasse.UseStyleColors        = true;
     this.TxtBox_MotDePasse.UseSystemPasswordChar = true;
     this.TxtBox_MotDePasse.WaterMarkColor        = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
     this.TxtBox_MotDePasse.WaterMarkFont         = new System.Drawing.Font("Segoe UI", 72F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
     this.TxtBox_MotDePasse.TextChanged          += new System.EventHandler(this.TxtBox_MotDePasse_TextChanged);
     this.TxtBox_MotDePasse.KeyPress             += new System.Windows.Forms.KeyPressEventHandler(this.TxtBox_MotDePasse_KeyPress);
     //
     // Btn_VerifierMDP
     //
     this.Btn_VerifierMDP.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_VerifierMDP.FontWeight         = MetroFramework.MetroButtonWeight.Regular;
     this.Btn_VerifierMDP.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_VerifierMDP.Highlight          = true;
     this.Btn_VerifierMDP.Location           = new System.Drawing.Point(207, 658);
     this.Btn_VerifierMDP.Name               = "Btn_VerifierMDP";
     this.Btn_VerifierMDP.Size               = new System.Drawing.Size(571, 89);
     this.Btn_VerifierMDP.TabIndex           = 4;
     this.Btn_VerifierMDP.Text               = "Vérifier";
     this.Btn_VerifierMDP.UseCustomForeColor = true;
     this.Btn_VerifierMDP.UseSelectable      = true;
     this.Btn_VerifierMDP.Click             += new System.EventHandler(this.Btn_VerifierMDP_Click);
     //
     // Btn_RetourMDP
     //
     this.Btn_RetourMDP.BackColor          = System.Drawing.SystemColors.MenuHighlight;
     this.Btn_RetourMDP.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_RetourMDP.FontWeight         = MetroFramework.MetroButtonWeight.Light;
     this.Btn_RetourMDP.ForeColor          = System.Drawing.SystemColors.Info;
     this.Btn_RetourMDP.Location           = new System.Drawing.Point(1485, 48);
     this.Btn_RetourMDP.Name               = "Btn_RetourMDP";
     this.Btn_RetourMDP.Size               = new System.Drawing.Size(442, 57);
     this.Btn_RetourMDP.TabIndex           = 5;
     this.Btn_RetourMDP.Text               = "Retour";
     this.Btn_RetourMDP.Theme              = MetroFramework.MetroThemeStyle.Light;
     this.Btn_RetourMDP.UseCustomBackColor = true;
     this.Btn_RetourMDP.UseCustomForeColor = true;
     this.Btn_RetourMDP.UseSelectable      = true;
     this.Btn_RetourMDP.Click             += new System.EventHandler(this.Btn_RetourMDP_Click);
     //
     // Pnl_ChiffreMdp
     //
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP0);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP9);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP8);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP7);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP6);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP5);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP4);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP3);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP2);
     this.Pnl_ChiffreMdp.Controls.Add(this.Btn_NombreMDP1);
     this.Pnl_ChiffreMdp.HorizontalScrollbarBarColor         = true;
     this.Pnl_ChiffreMdp.HorizontalScrollbarHighlightOnWheel = false;
     this.Pnl_ChiffreMdp.HorizontalScrollbarSize             = 10;
     this.Pnl_ChiffreMdp.Location = new System.Drawing.Point(863, 247);
     this.Pnl_ChiffreMdp.Name     = "Pnl_ChiffreMdp";
     this.Pnl_ChiffreMdp.Size     = new System.Drawing.Size(646, 751);
     this.Pnl_ChiffreMdp.TabIndex = 6;
     this.Pnl_ChiffreMdp.VerticalScrollbarBarColor         = true;
     this.Pnl_ChiffreMdp.VerticalScrollbarHighlightOnWheel = false;
     this.Pnl_ChiffreMdp.VerticalScrollbarSize             = 10;
     //
     // Btn_NombreMDP0
     //
     this.Btn_NombreMDP0.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP0.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP0.Highlight          = true;
     this.Btn_NombreMDP0.Location           = new System.Drawing.Point(129, 631);
     this.Btn_NombreMDP0.Name               = "Btn_NombreMDP0";
     this.Btn_NombreMDP0.Size               = new System.Drawing.Size(372, 113);
     this.Btn_NombreMDP0.TabIndex           = 11;
     this.Btn_NombreMDP0.Text               = "0";
     this.Btn_NombreMDP0.UseCustomBackColor = true;
     this.Btn_NombreMDP0.UseCustomForeColor = true;
     this.Btn_NombreMDP0.UseSelectable      = true;
     this.Btn_NombreMDP0.UseStyleColors     = true;
     this.Btn_NombreMDP0.Click             += new System.EventHandler(this.Btn_NombreMDP0_Click);
     //
     // Btn_NombreMDP9
     //
     this.Btn_NombreMDP9.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP9.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP9.Highlight          = true;
     this.Btn_NombreMDP9.Location           = new System.Drawing.Point(455, 15);
     this.Btn_NombreMDP9.Name               = "Btn_NombreMDP9";
     this.Btn_NombreMDP9.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP9.TabIndex           = 10;
     this.Btn_NombreMDP9.Text               = "9";
     this.Btn_NombreMDP9.UseCustomBackColor = true;
     this.Btn_NombreMDP9.UseCustomForeColor = true;
     this.Btn_NombreMDP9.UseSelectable      = true;
     this.Btn_NombreMDP9.UseStyleColors     = true;
     this.Btn_NombreMDP9.Click             += new System.EventHandler(this.Btn_NombreMDP9_Click);
     //
     // Btn_NombreMDP8
     //
     this.Btn_NombreMDP8.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP8.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP8.Highlight          = true;
     this.Btn_NombreMDP8.Location           = new System.Drawing.Point(234, 15);
     this.Btn_NombreMDP8.Name               = "Btn_NombreMDP8";
     this.Btn_NombreMDP8.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP8.TabIndex           = 9;
     this.Btn_NombreMDP8.Text               = "8";
     this.Btn_NombreMDP8.UseCustomBackColor = true;
     this.Btn_NombreMDP8.UseCustomForeColor = true;
     this.Btn_NombreMDP8.UseSelectable      = true;
     this.Btn_NombreMDP8.UseStyleColors     = true;
     this.Btn_NombreMDP8.Click             += new System.EventHandler(this.Btn_NombreMDP8_Click);
     //
     // Btn_NombreMDP7
     //
     this.Btn_NombreMDP7.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP7.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP7.Highlight          = true;
     this.Btn_NombreMDP7.Location           = new System.Drawing.Point(20, 15);
     this.Btn_NombreMDP7.Name               = "Btn_NombreMDP7";
     this.Btn_NombreMDP7.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP7.TabIndex           = 8;
     this.Btn_NombreMDP7.Text               = "7";
     this.Btn_NombreMDP7.UseCustomBackColor = true;
     this.Btn_NombreMDP7.UseCustomForeColor = true;
     this.Btn_NombreMDP7.UseSelectable      = true;
     this.Btn_NombreMDP7.UseStyleColors     = true;
     this.Btn_NombreMDP7.Click             += new System.EventHandler(this.Btn_NombreMDP7_Click);
     //
     // Btn_NombreMDP6
     //
     this.Btn_NombreMDP6.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP6.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP6.Highlight          = true;
     this.Btn_NombreMDP6.Location           = new System.Drawing.Point(455, 234);
     this.Btn_NombreMDP6.Name               = "Btn_NombreMDP6";
     this.Btn_NombreMDP6.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP6.TabIndex           = 7;
     this.Btn_NombreMDP6.Text               = "6";
     this.Btn_NombreMDP6.UseCustomBackColor = true;
     this.Btn_NombreMDP6.UseCustomForeColor = true;
     this.Btn_NombreMDP6.UseSelectable      = true;
     this.Btn_NombreMDP6.UseStyleColors     = true;
     this.Btn_NombreMDP6.Click             += new System.EventHandler(this.Btn_NombreMDP6_Click);
     //
     // Btn_NombreMDP5
     //
     this.Btn_NombreMDP5.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP5.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP5.Highlight          = true;
     this.Btn_NombreMDP5.Location           = new System.Drawing.Point(234, 234);
     this.Btn_NombreMDP5.Name               = "Btn_NombreMDP5";
     this.Btn_NombreMDP5.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP5.TabIndex           = 6;
     this.Btn_NombreMDP5.Text               = "5";
     this.Btn_NombreMDP5.UseCustomBackColor = true;
     this.Btn_NombreMDP5.UseCustomForeColor = true;
     this.Btn_NombreMDP5.UseSelectable      = true;
     this.Btn_NombreMDP5.UseStyleColors     = true;
     this.Btn_NombreMDP5.Click             += new System.EventHandler(this.Btn_NombreMDP5_Click);
     //
     // Btn_NombreMDP4
     //
     this.Btn_NombreMDP4.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP4.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP4.Highlight          = true;
     this.Btn_NombreMDP4.Location           = new System.Drawing.Point(20, 234);
     this.Btn_NombreMDP4.Name               = "Btn_NombreMDP4";
     this.Btn_NombreMDP4.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP4.TabIndex           = 5;
     this.Btn_NombreMDP4.Text               = "4";
     this.Btn_NombreMDP4.UseCustomBackColor = true;
     this.Btn_NombreMDP4.UseCustomForeColor = true;
     this.Btn_NombreMDP4.UseSelectable      = true;
     this.Btn_NombreMDP4.UseStyleColors     = true;
     this.Btn_NombreMDP4.Click             += new System.EventHandler(this.Btn_NombreMDP4_Click);
     //
     // Btn_NombreMDP3
     //
     this.Btn_NombreMDP3.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP3.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP3.Highlight          = true;
     this.Btn_NombreMDP3.Location           = new System.Drawing.Point(455, 438);
     this.Btn_NombreMDP3.Name               = "Btn_NombreMDP3";
     this.Btn_NombreMDP3.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP3.TabIndex           = 4;
     this.Btn_NombreMDP3.Text               = "3";
     this.Btn_NombreMDP3.UseCustomBackColor = true;
     this.Btn_NombreMDP3.UseCustomForeColor = true;
     this.Btn_NombreMDP3.UseSelectable      = true;
     this.Btn_NombreMDP3.UseStyleColors     = true;
     this.Btn_NombreMDP3.Click             += new System.EventHandler(this.Btn_NombreMDP3_Click);
     //
     // Btn_NombreMDP2
     //
     this.Btn_NombreMDP2.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP2.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP2.Highlight          = true;
     this.Btn_NombreMDP2.Location           = new System.Drawing.Point(234, 438);
     this.Btn_NombreMDP2.Name               = "Btn_NombreMDP2";
     this.Btn_NombreMDP2.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP2.TabIndex           = 3;
     this.Btn_NombreMDP2.Text               = "2";
     this.Btn_NombreMDP2.UseCustomBackColor = true;
     this.Btn_NombreMDP2.UseCustomForeColor = true;
     this.Btn_NombreMDP2.UseSelectable      = true;
     this.Btn_NombreMDP2.UseStyleColors     = true;
     this.Btn_NombreMDP2.Click             += new System.EventHandler(this.Btn_NombreMDP2_Click);
     //
     // Btn_NombreMDP1
     //
     this.Btn_NombreMDP1.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDP1.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDP1.Highlight          = true;
     this.Btn_NombreMDP1.Location           = new System.Drawing.Point(20, 438);
     this.Btn_NombreMDP1.Name               = "Btn_NombreMDP1";
     this.Btn_NombreMDP1.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDP1.TabIndex           = 2;
     this.Btn_NombreMDP1.Text               = "1";
     this.Btn_NombreMDP1.UseCustomBackColor = true;
     this.Btn_NombreMDP1.UseCustomForeColor = true;
     this.Btn_NombreMDP1.UseSelectable      = true;
     this.Btn_NombreMDP1.UseStyleColors     = true;
     this.Btn_NombreMDP1.Click             += new System.EventHandler(this.Btn_NombreMDP1_Click);
     //
     // Btn_NombreMDPRetour
     //
     this.Btn_NombreMDPRetour.FontSize           = MetroFramework.MetroButtonSize.Tall;
     this.Btn_NombreMDPRetour.ForeColor          = System.Drawing.SystemColors.Highlight;
     this.Btn_NombreMDPRetour.Highlight          = true;
     this.Btn_NombreMDPRetour.Location           = new System.Drawing.Point(1544, 262);
     this.Btn_NombreMDPRetour.Name               = "Btn_NombreMDPRetour";
     this.Btn_NombreMDPRetour.Size               = new System.Drawing.Size(170, 170);
     this.Btn_NombreMDPRetour.TabIndex           = 12;
     this.Btn_NombreMDPRetour.Text               = "<-";
     this.Btn_NombreMDPRetour.UseCustomBackColor = true;
     this.Btn_NombreMDPRetour.UseCustomForeColor = true;
     this.Btn_NombreMDPRetour.UseSelectable      = true;
     this.Btn_NombreMDPRetour.UseStyleColors     = true;
     this.Btn_NombreMDPRetour.Click             += new System.EventHandler(this.Btn_NombreMDPRetour_Click);
     //
     // pictureBox1
     //
     this.pictureBox1.Image    = global::ProjOXFORD_G2WinForm.Properties.Resources.LogoOxford;
     this.pictureBox1.Location = new System.Drawing.Point(0, -1);
     this.pictureBox1.Name     = "pictureBox1";
     this.pictureBox1.Size     = new System.Drawing.Size(193, 194);
     this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
     this.pictureBox1.TabIndex = 0;
     this.pictureBox1.TabStop  = false;
     //
     // IdentificationMDP
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(1920, 1080);
     this.Controls.Add(this.Pnl_ChiffreMdp);
     this.Controls.Add(this.Btn_RetourMDP);
     this.Controls.Add(this.Btn_NombreMDPRetour);
     this.Controls.Add(this.Btn_VerifierMDP);
     this.Controls.Add(this.TxtBox_MotDePasse);
     this.Controls.Add(this.Txt_Titre3);
     this.Controls.Add(this.pictureBox1);
     this.Name  = "IdentificationMDP";
     this.Load += new System.EventHandler(this.IdentificationMDP_Load);
     this.Pnl_ChiffreMdp.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
     this.ResumeLayout(false);
     this.PerformLayout();
 }
Esempio n. 17
0
        private void LoadData(BlockchainLibrary.Block block)
        {
            var panel = new MetroFramework.Controls.MetroPanel()
            {
                Anchor      = (AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top),
                Size        = GetSizePanel,
                Location    = new System.Drawing.Point(curLocation.X, curLocation.Y),
                BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
            };

            panel.Controls.Clear();

            var txtHash = new MetroFramework.Controls.MetroTextBox
            {
                Anchor   = (AnchorStyles.Left | AnchorStyles.Top),
                Text     = block.Hash,
                Enabled  = false,
                ReadOnly = true,
                Size     = new System.Drawing.Size()
                {
                    Width = GetSizeTxtHash.Width, Height = GetSizeTxtHash.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtHash.X, GetLocationTxtHash.Y)
            };

            panel.Controls.Add(txtHash);

            var txtContent = new MetroFramework.Controls.MetroTextBox
            {
                Anchor    = (AnchorStyles.Left | AnchorStyles.Bottom | AnchorStyles.Top),
                Text      = block.Data.Content,
                Multiline = true,
                ReadOnly  = true,
                Size      = new System.Drawing.Size()
                {
                    Width = GetSizeTxtContent.Width, Height = GetSizeTxtContent.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtContent.X, GetLocationTxtContent.Y)
            };

            panel.Controls.Add(txtContent);

            var txtUser = new MetroFramework.Controls.MetroTextBox
            {
                Anchor   = (AnchorStyles.Left | AnchorStyles.Bottom),
                Text     = block.UserFrom.Login,
                ReadOnly = true,
                Size     = new System.Drawing.Size()
                {
                    Width = GetSizeTxtUser.Width, Height = GetSizeTxtUser.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtUser.X, GetLocationTxtUser.Y)
            };

            panel.Controls.Add(txtUser);

            var txtMoney = new MetroFramework.Controls.MetroTextBox
            {
                Anchor   = (AnchorStyles.Left | AnchorStyles.Bottom),
                Text     = block.Money.ToString() + " $",
                ReadOnly = true,
                Size     = new System.Drawing.Size()
                {
                    Width = GetSizeTxtMoney.Width, Height = GetSizeTxtMoney.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtMoney.X, GetLocationTxtMoney.Y)
            };

            panel.Controls.Add(txtMoney);

            var txtDateTime = new MetroFramework.Controls.MetroTextBox
            {
                Anchor   = (AnchorStyles.Left | AnchorStyles.Bottom),
                Text     = block.CreatedOn.ToString(),
                ReadOnly = true,
                Size     = new System.Drawing.Size()
                {
                    Width = GetSizeTxtDateTime.Width, Height = GetSizeTxtDateTime.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtDateTime.X, GetLocationTxtDateTime.Y)
            };

            panel.Controls.Add(txtDateTime);

            var txtPrevHash = new MetroFramework.Controls.MetroTextBox
            {
                Anchor   = (AnchorStyles.Left | AnchorStyles.Bottom),
                Text     = block.PreviousHash,
                ReadOnly = true,
                Size     = new System.Drawing.Size()
                {
                    Width = GetSizeTxtHash.Width, Height = GetSizeTxtHash.Height
                },
                Location = new System.Drawing.Point(GetLocationTxtPrevHash.X, GetLocationTxtPrevHash.Y)
            };

            panel.Controls.Add(txtPrevHash);

            curGrid.Controls.Add(panel);
            curLocation = new Point(panel.Location.X + panel.Width + OFFSET, panel.Location.Y);
        }
Esempio n. 18
0
        /// <summary>
        /// Create a Task Card on the panel
        /// </summary>
        /// <param name="i">Task Card Number in the panel to calculate position</param>
        /// <param name="title">Title of the task</param>
        /// <param name="details">Details of the task</param>
        /// <param name="priority">Priority of the task</param>
        /// <param name="status">Status of task</param>
        /// <param name="categoryName">Category of the task</param>
        /// <param name="panel">Panel to load</param>
        private void CreateTaskCard(int i, string title, string details, string priority, string status, string categoryName, MetroFramework.Controls.MetroPanel panel)
        {
            try
            {
                var   currentIndex = allTask.Count() - 1;
                Color color;
                //choose panel category
                if (priority == "urgent" && status == "incomplete")
                {
                    color = PanelColor[0];
                }
                else if (priority == "none" && status == "incomplete")
                {
                    color = PanelColor[1];
                }
                else if (priority == "urgent" && status == "complete")
                {
                    color = PanelColor[2];
                }
                else if (priority == "none" && status == "complete")
                {
                    color = PanelColor[3];
                }
                else if (priority == "urgent" && status == "delete")
                {
                    color = PanelColor[4];
                }
                else if (priority == "none" && status == "delete")
                {
                    color = PanelColor[5];
                }
                else
                {
                    color = Color.DeepSkyBlue;
                }

                //Create the controls
                MetroFramework.Controls.MetroLabel taskTitle    = new MetroFramework.Controls.MetroLabel();
                MetroFramework.Controls.MetroLabel taskDetails  = new MetroFramework.Controls.MetroLabel();
                MetroFramework.Controls.MetroLabel taskCategory = new MetroFramework.Controls.MetroLabel();
                MetroFramework.Controls.MetroPanel taskPanel    = new MetroFramework.Controls.MetroPanel();

                //load task title
                taskTitle.Text               = title;
                taskTitle.AutoSize           = true;
                taskTitle.BackColor          = System.Drawing.Color.Transparent;
                taskTitle.FontSize           = MetroFramework.MetroLabelSize.Tall;
                taskTitle.FontWeight         = MetroFramework.MetroLabelWeight.Regular;
                taskTitle.Location           = new System.Drawing.Point(3, 10);
                taskTitle.Size               = new System.Drawing.Size(106, 25);
                taskTitle.TabIndex           = 2;
                taskTitle.UseCustomBackColor = true;
                taskTitle.UseCustomForeColor = true;
                taskTitle.Click             += (sender, e) => ReadPanel(currentIndex);

                //load task details
                taskDetails.Text               = details;
                taskDetails.BackColor          = System.Drawing.Color.Transparent;
                taskDetails.Location           = new System.Drawing.Point(3, 35);
                taskDetails.Size               = new System.Drawing.Size(419, 19);
                taskDetails.TabIndex           = 3;
                taskDetails.ForeColor          = System.Drawing.Color.White;
                taskDetails.UseCustomForeColor = true;
                taskDetails.UseCustomBackColor = true;
                taskDetails.Click             += (sender, e) => ReadPanel(currentIndex);

                //load task category
                taskCategory.Text               = categoryName;
                taskCategory.AutoSize           = true;
                taskCategory.BackColor          = System.Drawing.Color.Transparent;
                taskCategory.Location           = new System.Drawing.Point(339, 10);
                taskCategory.Size               = new System.Drawing.Size(54, 19);
                taskCategory.TabIndex           = 4;
                taskCategory.ForeColor          = System.Drawing.Color.White;
                taskCategory.UseCustomForeColor = true;
                taskCategory.Click             += (sender, e) => ReadPanel(currentIndex);
                taskCategory.UseCustomBackColor = true;

                //load task panel
                taskPanel.BackColor = color;
                taskPanel.Controls.Add(taskCategory);
                taskPanel.Controls.Add(taskTitle);
                taskPanel.Controls.Add(taskDetails);
                taskPanel.HorizontalScrollbarBarColor         = true;
                taskPanel.HorizontalScrollbarHighlightOnWheel = false;
                taskPanel.HorizontalScrollbarSize             = 10;
                taskPanel.Location                          = new System.Drawing.Point(11, i * 70);
                taskPanel.Size                              = new System.Drawing.Size(425, 64);
                taskPanel.TabIndex                          = 3;
                taskPanel.ForeColor                         = System.Drawing.Color.White;
                taskPanel.UseCustomForeColor                = true;
                taskPanel.UseCustomBackColor                = true;
                taskPanel.UseCustomForeColor                = true;
                taskPanel.VerticalScrollbarBarColor         = true;
                taskPanel.VerticalScrollbarHighlightOnWheel = false;
                taskPanel.VerticalScrollbarSize             = 10;
                taskPanel.Click                            += (sender, e) => ReadPanel(currentIndex);
                panel.Controls.Add(taskPanel);
                panel.AutoScroll = true;
            }
            catch (ArgumentOutOfRangeException e)
            {
                ErrorLog.Write(e);
            }
        }
Esempio n. 19
0
 /// <summary>
 /// Требуемый метод для поддержки конструктора — не изменяйте
 /// содержимое этого метода с помощью редактора кода.
 /// </summary>
 private void InitializeComponent()
 {
     MetroFramework.Controls.MetroPanel metroPanel1;
     this.descriptionLabel  = new MetroFramework.Controls.MetroLabel();
     this.typeLabel         = new MetroFramework.Controls.MetroLabel();
     this.rarityLabel       = new MetroFramework.Controls.MetroLabel();
     this.powerLabel        = new MetroFramework.Controls.MetroLabel();
     this.nameLabel         = new MetroFramework.Controls.MetroLabel();
     this.rarityColorBorder = new MetroFramework.Controls.MetroPanel();
     metroPanel1            = new MetroFramework.Controls.MetroPanel();
     metroPanel1.SuspendLayout();
     this.rarityColorBorder.SuspendLayout();
     this.SuspendLayout();
     //
     // metroPanel1
     //
     metroPanel1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                 | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     metroPanel1.BackColor = System.Drawing.Color.White;
     metroPanel1.Controls.Add(this.descriptionLabel);
     metroPanel1.Controls.Add(this.typeLabel);
     metroPanel1.Controls.Add(this.rarityLabel);
     metroPanel1.Controls.Add(this.powerLabel);
     metroPanel1.Controls.Add(this.nameLabel);
     metroPanel1.HorizontalScrollbarBarColor         = true;
     metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
     metroPanel1.HorizontalScrollbarSize             = 10;
     metroPanel1.Location = new System.Drawing.Point(3, 3);
     metroPanel1.Name     = "metroPanel1";
     metroPanel1.Size     = new System.Drawing.Size(224, 357);
     metroPanel1.TabIndex = 2;
     metroPanel1.VerticalScrollbarBarColor         = true;
     metroPanel1.VerticalScrollbarHighlightOnWheel = false;
     metroPanel1.VerticalScrollbarSize             = 10;
     metroPanel1.Click += new System.EventHandler(this.metroPanel1_Click);
     //
     // descriptionLabel
     //
     this.descriptionLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                                                                          | System.Windows.Forms.AnchorStyles.Right)));
     this.descriptionLabel.FontSize    = MetroFramework.MetroLabelSize.Small;
     this.descriptionLabel.FontWeight  = MetroFramework.MetroLabelWeight.Regular;
     this.descriptionLabel.Location    = new System.Drawing.Point(3, 98);
     this.descriptionLabel.MaximumSize = new System.Drawing.Size(218, 222);
     this.descriptionLabel.MinimumSize = new System.Drawing.Size(218, 49);
     this.descriptionLabel.Name        = "descriptionLabel";
     this.descriptionLabel.Size        = new System.Drawing.Size(218, 49);
     this.descriptionLabel.TabIndex    = 7;
     this.descriptionLabel.Text        = "Приходит, значит, мужик к батюшке, \\n  и говорит,мол, можно покаятся.\r\nБатюшка ем" +
                                         "у: конечно. Он начинает\r\n";
     this.descriptionLabel.TextAlign = System.Drawing.ContentAlignment.TopCenter;
     //
     // typeLabel
     //
     this.typeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.typeLabel.FontSize   = MetroFramework.MetroLabelSize.Small;
     this.typeLabel.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.typeLabel.Location   = new System.Drawing.Point(112, 320);
     this.typeLabel.Name       = "typeLabel";
     this.typeLabel.Size       = new System.Drawing.Size(112, 37);
     this.typeLabel.TabIndex   = 6;
     this.typeLabel.Text       = "metroLabel1";
     this.typeLabel.TextAlign  = System.Drawing.ContentAlignment.BottomRight;
     //
     // rarityLabel
     //
     this.rarityLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                      | System.Windows.Forms.AnchorStyles.Left)
                                                                     | System.Windows.Forms.AnchorStyles.Right)));
     this.rarityLabel.FontSize   = MetroFramework.MetroLabelSize.Small;
     this.rarityLabel.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.rarityLabel.Location   = new System.Drawing.Point(0, 320);
     this.rarityLabel.Name       = "rarityLabel";
     this.rarityLabel.Size       = new System.Drawing.Size(112, 37);
     this.rarityLabel.TabIndex   = 5;
     this.rarityLabel.Text       = "metroLabel1";
     this.rarityLabel.TextAlign  = System.Drawing.ContentAlignment.BottomLeft;
     //
     // powerLabel
     //
     this.powerLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                     | System.Windows.Forms.AnchorStyles.Left)
                                                                    | System.Windows.Forms.AnchorStyles.Right)));
     this.powerLabel.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.powerLabel.Location   = new System.Drawing.Point(3, 51);
     this.powerLabel.Name       = "powerLabel";
     this.powerLabel.Size       = new System.Drawing.Size(218, 47);
     this.powerLabel.TabIndex   = 3;
     this.powerLabel.Text       = "metroLabel1";
     this.powerLabel.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // nameLabel
     //
     this.nameLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                   | System.Windows.Forms.AnchorStyles.Right)));
     this.nameLabel.FontWeight = MetroFramework.MetroLabelWeight.Bold;
     this.nameLabel.Location   = new System.Drawing.Point(3, 0);
     this.nameLabel.Name       = "nameLabel";
     this.nameLabel.Size       = new System.Drawing.Size(218, 51);
     this.nameLabel.TabIndex   = 2;
     this.nameLabel.Text       = "metroLabel1";
     this.nameLabel.TextAlign  = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // rarityColorBorder
     //
     this.rarityColorBorder.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                            | System.Windows.Forms.AnchorStyles.Left)
                                                                           | System.Windows.Forms.AnchorStyles.Right)));
     this.rarityColorBorder.BackColor = System.Drawing.Color.Red;
     this.rarityColorBorder.Controls.Add(metroPanel1);
     this.rarityColorBorder.HorizontalScrollbarBarColor         = true;
     this.rarityColorBorder.HorizontalScrollbarHighlightOnWheel = false;
     this.rarityColorBorder.HorizontalScrollbarSize             = 10;
     this.rarityColorBorder.Location                          = new System.Drawing.Point(3, 3);
     this.rarityColorBorder.Name                              = "rarityColorBorder";
     this.rarityColorBorder.Size                              = new System.Drawing.Size(230, 363);
     this.rarityColorBorder.TabIndex                          = 0;
     this.rarityColorBorder.UseCustomBackColor                = true;
     this.rarityColorBorder.VerticalScrollbarBarColor         = true;
     this.rarityColorBorder.VerticalScrollbarHighlightOnWheel = false;
     this.rarityColorBorder.VerticalScrollbarSize             = 10;
     //
     // CardControl
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.Controls.Add(this.rarityColorBorder);
     this.Name = "CardControl";
     this.Size = new System.Drawing.Size(236, 369);
     metroPanel1.ResumeLayout(false);
     this.rarityColorBorder.ResumeLayout(false);
     this.ResumeLayout(false);
 }
Esempio n. 20
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     MetroFramework.Controls.MetroPanel             metroPanel1;
     System.Windows.Forms.PictureBox                pictureBox1;
     MetroFramework.Controls.MetroLabel             metroLabel1;
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FormWelcome));
     this.metroProgressBar1 = new MetroFramework.Controls.MetroProgressBar();
     this.tableLayoutPanel1 = new System.Windows.Forms.TableLayoutPanel();
     this.metroTextBox1     = new MetroFramework.Controls.MetroTextBox();
     metroPanel1            = new MetroFramework.Controls.MetroPanel();
     pictureBox1            = new System.Windows.Forms.PictureBox();
     metroLabel1            = new MetroFramework.Controls.MetroLabel();
     this.tableLayoutPanel1.SuspendLayout();
     metroPanel1.SuspendLayout();
     ((System.ComponentModel.ISupportInitialize)(pictureBox1)).BeginInit();
     this.SuspendLayout();
     //
     // metroProgressBar1
     //
     this.metroProgressBar1.Dock             = System.Windows.Forms.DockStyle.Bottom;
     this.metroProgressBar1.Location         = new System.Drawing.Point(20, 390);
     this.metroProgressBar1.Margin           = new System.Windows.Forms.Padding(0);
     this.metroProgressBar1.Name             = "metroProgressBar1";
     this.metroProgressBar1.ProgressBarStyle = System.Windows.Forms.ProgressBarStyle.Marquee;
     this.metroProgressBar1.Size             = new System.Drawing.Size(796, 23);
     this.metroProgressBar1.TabIndex         = 0;
     //
     // tableLayoutPanel1
     //
     this.tableLayoutPanel1.ColumnCount = 2;
     this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
     this.tableLayoutPanel1.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
     this.tableLayoutPanel1.Controls.Add(this.metroTextBox1, 1, 0);
     this.tableLayoutPanel1.Controls.Add(metroPanel1, 0, 0);
     this.tableLayoutPanel1.Dock     = System.Windows.Forms.DockStyle.Fill;
     this.tableLayoutPanel1.Location = new System.Drawing.Point(20, 60);
     this.tableLayoutPanel1.Margin   = new System.Windows.Forms.Padding(0, 5, 0, 5);
     this.tableLayoutPanel1.Name     = "tableLayoutPanel1";
     this.tableLayoutPanel1.RowCount = 1;
     this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
     this.tableLayoutPanel1.Size     = new System.Drawing.Size(796, 330);
     this.tableLayoutPanel1.TabIndex = 1;
     //
     // metroTextBox1
     //
     this.metroTextBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                        | System.Windows.Forms.AnchorStyles.Left)
                                                                       | System.Windows.Forms.AnchorStyles.Right)));
     //
     //
     //
     this.metroTextBox1.CustomButton.Image         = null;
     this.metroTextBox1.CustomButton.Location      = new System.Drawing.Point(90, 2);
     this.metroTextBox1.CustomButton.Name          = "";
     this.metroTextBox1.CustomButton.Size          = new System.Drawing.Size(305, 305);
     this.metroTextBox1.CustomButton.Style         = MetroFramework.MetroColorStyle.Blue;
     this.metroTextBox1.CustomButton.TabIndex      = 1;
     this.metroTextBox1.CustomButton.Theme         = MetroFramework.MetroThemeStyle.Light;
     this.metroTextBox1.CustomButton.UseSelectable = true;
     this.metroTextBox1.CustomButton.Visible       = false;
     this.metroTextBox1.Lines = new string[] {
         "start up...OK",
         "loading configuration...OK",
         "connecting to the server...OK",
         "confirm that the API Key...OK"
     };
     this.metroTextBox1.Location         = new System.Drawing.Point(398, 10);
     this.metroTextBox1.Margin           = new System.Windows.Forms.Padding(0, 10, 0, 10);
     this.metroTextBox1.MaxLength        = 32767;
     this.metroTextBox1.Multiline        = true;
     this.metroTextBox1.Name             = "metroTextBox1";
     this.metroTextBox1.PasswordChar     = '\0';
     this.metroTextBox1.ReadOnly         = true;
     this.metroTextBox1.ScrollBars       = System.Windows.Forms.ScrollBars.None;
     this.metroTextBox1.SelectedText     = "";
     this.metroTextBox1.SelectionLength  = 0;
     this.metroTextBox1.SelectionStart   = 0;
     this.metroTextBox1.ShortcutsEnabled = true;
     this.metroTextBox1.Size             = new System.Drawing.Size(398, 310);
     this.metroTextBox1.TabIndex         = 10;
     this.metroTextBox1.TabStop          = false;
     this.metroTextBox1.Text             = "start up...OK\r\nloading configuration...OK\r\nconnecting to the server...OK\r\nconfirm" +
                                           " that the API Key...OK";
     this.metroTextBox1.UseSelectable  = true;
     this.metroTextBox1.WaterMarkColor = System.Drawing.Color.FromArgb(((int)(((byte)(109)))), ((int)(((byte)(109)))), ((int)(((byte)(109)))));
     this.metroTextBox1.WaterMarkFont  = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Italic, System.Drawing.GraphicsUnit.Pixel);
     //
     // metroPanel1
     //
     metroPanel1.Controls.Add(metroLabel1);
     metroPanel1.Controls.Add(pictureBox1);
     metroPanel1.Dock = System.Windows.Forms.DockStyle.Fill;
     metroPanel1.HorizontalScrollbarBarColor         = true;
     metroPanel1.HorizontalScrollbarHighlightOnWheel = false;
     metroPanel1.HorizontalScrollbarSize             = 10;
     metroPanel1.Location = new System.Drawing.Point(0, 10);
     metroPanel1.Margin   = new System.Windows.Forms.Padding(0, 10, 0, 10);
     metroPanel1.Name     = "metroPanel1";
     metroPanel1.Size     = new System.Drawing.Size(398, 310);
     metroPanel1.TabIndex = 2;
     metroPanel1.VerticalScrollbarBarColor         = true;
     metroPanel1.VerticalScrollbarHighlightOnWheel = false;
     metroPanel1.VerticalScrollbarSize             = 10;
     //
     // pictureBox1
     //
     pictureBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
                                                                 | System.Windows.Forms.AnchorStyles.Left)
                                                                | System.Windows.Forms.AnchorStyles.Right)));
     pictureBox1.Image    = global::ECC_client_windows.Properties.Resources.LOGO;
     pictureBox1.Location = new System.Drawing.Point(3, 3);
     pictureBox1.Name     = "pictureBox1";
     pictureBox1.Size     = new System.Drawing.Size(395, 244);
     pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
     pictureBox1.TabIndex = 3;
     pictureBox1.TabStop  = false;
     //
     // metroLabel1
     //
     metroLabel1.Dock      = System.Windows.Forms.DockStyle.Bottom;
     metroLabel1.FontSize  = MetroFramework.MetroLabelSize.Small;
     metroLabel1.Location  = new System.Drawing.Point(0, 250);
     metroLabel1.Name      = "metroLabel1";
     metroLabel1.Size      = new System.Drawing.Size(398, 60);
     metroLabel1.TabIndex  = 4;
     metroLabel1.Text      = "ECCIoT Client for Windows\r\nCopyright © 2018 Landriesnidis.\r\nAll Rights Reserved.";
     metroLabel1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // FormWelcome
     //
     this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
     this.AutoScaleMode       = System.Windows.Forms.AutoScaleMode.Font;
     this.ClientSize          = new System.Drawing.Size(836, 433);
     this.Controls.Add(this.tableLayoutPanel1);
     this.Controls.Add(this.metroProgressBar1);
     this.Icon        = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
     this.MaximizeBox = false;
     this.MinimizeBox = false;
     this.Name        = "FormWelcome";
     this.Resizable   = false;
     this.Text        = "ECCIoT Client for Windows";
     this.tableLayoutPanel1.ResumeLayout(false);
     metroPanel1.ResumeLayout(false);
     ((System.ComponentModel.ISupportInitialize)(pictureBox1)).EndInit();
     this.ResumeLayout(false);
 }
        private void btnAutonomous_Click(object sender, EventArgs e)
        {
            if (lstboxAutonomousChooser.SelectedItem == null || lstboxAutonomousChooser.SelectedItem.ToString().Length == 0) return;
            MetroFramework.Forms.MetroForm autoForm = new MetroFramework.Forms.MetroForm();
            MetroFramework.Controls.MetroPanel p = new MetroFramework.Controls.MetroPanel();
            p.Name = "panel";

            string[] autoParams = autonomousDict[lstboxAutonomousChooser.SelectedItem.ToString()];
            if (autoParams.Length < 2) return;
            for (int i = 1; i < autoParams.Length; i++)
            {
                MetroFramework.Controls.MetroLabel lbl = new MetroFramework.Controls.MetroLabel();
                lbl.Text = autoParams[i].Substring(0, autoParams[i].IndexOf(":"));
                lbl.Location = new Point(10, 30 + 30 * i);
                p.Controls.Add(lbl);
                Control c;
                string ControlText = autoParams[i].Substring(autoParams[i].IndexOf(":") + 1);
                switch (ControlText)
                {
                    case "TextBox":
                        c = new MetroFramework.Controls.MetroTextBox();
                        c.Size = new Size(100, lbl.Height);
                        break;
                    case "CheckBox":
                        c = new MetroFramework.Controls.MetroCheckBox();
                        break;
                    default:
                        MessageBox.Show("Unsupported Control");
                        return;
                }
                c.Location = new Point(10 + lbl.Width, 30 + 30 * i);
                p.Controls.Add(c);
            }
            p.Top = 55;
            p.Width = autoForm.Width;
            p.Height = autoForm.Height - p.Top;
            autoForm.Controls.Add(p);
            autoForm.Text = lstboxAutonomousChooser.SelectedItem.ToString();
            autoForm.PerformLayout();
            autoForm.Show();
            autoForm.FormClosing += autoForm_FormClosing;
        }
Esempio n. 22
0
        public static void switchLanguage(MetroFramework.Controls.MetroPanel panel, CultureInfo cul, ResourceManager res_man)
        {
            foreach (Control ctrls001 in panel.Controls)
            {
                try
                {
                    ctrls001.Text = res_man.GetString(ctrls001.Name, cul);
                }
                catch (Exception e)
                {
                    //throw new Exception("Error.", e);
                }

                foreach (Control ctrls002 in ctrls001.Controls)
                {
                    try
                    {
                        ctrls002.Text = res_man.GetString(ctrls002.Name, cul);
                    }
                    catch (Exception e)
                    {
                        //throw new Exception("Error.", e);
                    }

                    foreach (Control ctrls003 in ctrls002.Controls)
                    {
                        try
                        {
                            ctrls003.Text = res_man.GetString(ctrls003.Name, cul);
                        }
                        catch (Exception e)
                        {
                            //throw new Exception("Error.", e);
                        }

                        foreach (Control ctrls004 in ctrls003.Controls)
                        {
                            try
                            {
                                ctrls004.Text = res_man.GetString(ctrls004.Name, cul);
                            }
                            catch (Exception e)
                            {
                                //throw new Exception("Error.", e);
                            }

                            foreach (Control ctrls005 in ctrls004.Controls)
                            {
                                try
                                {
                                    ctrls005.Text = res_man.GetString(ctrls005.Name, cul);
                                }
                                catch (Exception e)
                                {
                                    //throw new Exception("Error.", e);
                                }

                                foreach (Control ctrls006 in ctrls005.Controls)
                                {
                                    try
                                    {
                                        ctrls006.Text = res_man.GetString(ctrls006.Name, cul);
                                    }
                                    catch (Exception e)
                                    {
                                        //throw new Exception("Error.", e);
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }