Exemplo n.º 1
0
        private void RemoverMensagens()
        {
            uiPanel header = uiHeader;

            uiFlowPanelChat.Controls.Clear();
            uiFlowPanelChat.Controls.Add(header);
        }
Exemplo n.º 2
0
        public static void CreateCryptocurrencyPanel(List <Cryptocurency> cryptocurrencyList, FlowLayoutPanel flowLayoutPanel, EventHandler eventHandler)
        {
            foreach (var cryptocurrency in cryptocurrencyList)
            {
                uiPanel uiPanel = new uiPanel();
                uiPanel.Name        = "pnlCryptocurrency" + cryptocurrency.CryptocurrencyId;
                uiPanel.Size        = new Size(221, 86);
                uiPanel.PanelRadius = 5;
                uiPanel.Tag         = cryptocurrency.CryptocurrencyId;
                uiPanel.BackColor   = Color.FromArgb(215, 223, 255);
                uiPanel.Click      += new EventHandler(eventHandler);

                PictureBox pictureBox = new PictureBox();
                pictureBox.Name  = "picCryptocurrency" + cryptocurrency.CryptocurrencyId;
                pictureBox.Size  = new Size(77, 77);
                pictureBox.Image = UtilImage.ByteToImage(new Archive {
                    ArchiveId = cryptocurrency.ArchiveId
                }.ObterPorCod().Blob);
                pictureBox.SizeMode  = PictureBoxSizeMode.StretchImage;
                pictureBox.Tag       = cryptocurrency.CryptocurrencyId;
                pictureBox.BackColor = Color.Transparent;
                uiPanel.Controls.Add(pictureBox);
                pictureBox.Location = new Point(4, 4);
                pictureBox.Click   += new EventHandler(eventHandler);

                Label label = new Label();
                label.Name         = "lblCryptocurrency" + cryptocurrency.CryptocurrencyId;
                label.Font         = new Font("Gadugi", 14, FontStyle.Bold);
                label.ForeColor    = Color.FromArgb(80, 63, 153);
                label.Tag          = cryptocurrency.CryptocurrencyId;
                label.BackColor    = Color.FromArgb(242, 245, 255);
                label.Text         = String.Format("{0} [{1}]", cryptocurrency.Name, cryptocurrency.Base);
                label.AutoEllipsis = true;
                label.AutoSize     = false;
                label.Size         = new Size(133, 21);
                uiPanel.Controls.Add(label);
                label.Location = new Point(85, 6);
                label.Click   += new EventHandler(eventHandler);

                Label labelBalance = new Label();
                labelBalance.Name         = "lblCryptocurrencyBalance" + cryptocurrency.CryptocurrencyId;
                labelBalance.Font         = new Font("Gadugi", 8);
                labelBalance.ForeColor    = Color.FromArgb(180, 182, 194);
                labelBalance.BackColor    = Color.FromArgb(242, 245, 255);
                labelBalance.Text         = String.Format("{0} ({1})", UtilConvert.ToString(cryptocurrency.CryptocurrencyBalance), UtilConvert.ToString(cryptocurrency.CryptocurrencyUnit));
                labelBalance.AutoEllipsis = true;
                labelBalance.Tag          = cryptocurrency.CryptocurrencyId;
                labelBalance.AutoSize     = false;
                labelBalance.Size         = new Size(131, 14);
                uiPanel.Controls.Add(labelBalance);
                labelBalance.Location = new Point(87, 27);
                labelBalance.Click   += new EventHandler(eventHandler);

                flowLayoutPanel.Controls.Add(uiPanel);
                //flowLayoutPanel.Controls.Add(uiPanelEmployee);
            }
        }
Exemplo n.º 3
0
        // Show the very secret panel
        private void showSecretPanel()
        {
            currentPanel = uiPanel.secret;

            var task = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => {
                Debug.WriteLine("Showing: DoorOpenErrorPanel");
                CommandTestPanel.Visibility   = Visibility.Collapsed;
                BootingPanel.Visibility       = Visibility.Collapsed;
                PickColourPanel.Visibility    = Visibility.Collapsed;
                FinishingUpPanel.Visibility   = Visibility.Collapsed;
                ThankYouPanel.Visibility      = Visibility.Collapsed;
                DoorOpenErrorPanel.Visibility = Visibility.Collapsed;
                BootingErrorPanel.Visibility  = Visibility.Collapsed;
                SecretPanel.Visibility        = Visibility.Visible;
            });
        }
Exemplo n.º 4
0
        public static void CreateSupportPanel(List <Support> supports, FlowLayoutPanel flowLayoutPanel, EventHandler eventHandler)
        {
            foreach (var support in supports)
            {
                uiPanel uiPanel = new uiPanel();
                uiPanel.Name        = "pnlSupport" + support.SupportId;
                uiPanel.Size        = new Size(221, 86);
                uiPanel.PanelRadius = 5;
                uiPanel.Tag         = support.SupportId;
                uiPanel.BackColor   = Color.FromArgb(215, 223, 255);
                uiPanel.Click      += new EventHandler(eventHandler);

                Label lblTitulo = new Label();
                lblTitulo.Name         = "lblTitulo" + support.SupportId;
                lblTitulo.Font         = new Font("Gadugi", 9, FontStyle.Bold);
                lblTitulo.ForeColor    = Color.FromArgb(80, 63, 153);
                lblTitulo.Tag          = support.SupportId;
                lblTitulo.BackColor    = Color.FromArgb(242, 245, 255);
                lblTitulo.Text         = support.Title;
                lblTitulo.AutoEllipsis = true;
                lblTitulo.AutoSize     = false;
                lblTitulo.Size         = new Size(235, 21);
                uiPanel.Controls.Add(lblTitulo);
                lblTitulo.Location = new Point(3, 3);
                lblTitulo.Click   += new EventHandler(eventHandler);

                Label lblCausa = new Label();
                lblCausa.Name         = "lblCausa" + support.SupportId;
                lblCausa.Font         = new Font("Gadugi", 8);
                lblCausa.ForeColor    = Color.FromArgb(180, 182, 194);
                lblCausa.BackColor    = Color.FromArgb(242, 245, 255);
                lblCausa.Text         = support.Description;
                lblCausa.AutoEllipsis = true;
                lblCausa.Tag          = support.SupportId;
                lblCausa.AutoSize     = false;
                lblCausa.Size         = new Size(231, 53);
                uiPanel.Controls.Add(lblCausa);
                lblCausa.Location = new Point(4, 27);
                lblCausa.Click   += new EventHandler(eventHandler);

                flowLayoutPanel.Controls.Add(uiPanel);
                //flowLayoutPanel.Controls.Add(uiPanelEmployee);
            }
        }