Beispiel #1
0
        public VwXls()
        {
            InitializeComponent();

            {
                FlowLayoutPanel flp = flperr = new FlowLayoutPanel();
                flp.Hide();
                flp.Dock = DockStyle.Fill;
                {
                    PictureBox pb = new PictureBox();
                    pb.Image    = Resources.eventlogError.ToBitmap();
                    pb.SizeMode = PictureBoxSizeMode.AutoSize;
                    flp.Controls.Add(pb);
                }
                {
                    Label la = laerr1 = new Label();
                    la.AutoSize = true;
                    flp.Controls.Add(la);
                    flp.SetFlowBreak(la, true);
                }
                {
                    Label la = laerr2 = new Label();
                    la.AutoSize = true;
                    flp.Controls.Add(la);
                }
                flp.Parent = this;
            }

            {
                TableLayoutPanel p = flpwip = new TableLayoutPanel();
                p.Hide();
                p.Dock = DockStyle.Fill;
                p.ColumnStyles.Add(new ColumnStyle(SizeType.AutoSize));
                p.RowStyles.Add(new RowStyle(SizeType.AutoSize));
                {
                    FlowLayoutPanel flp = new FlowLayoutPanel();
                    flp.Anchor       = AnchorStyles.None;
                    flp.AutoSize     = true;
                    flp.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                    flp.BackColor    = Color.WhiteSmoke;
                    flp.ForeColor    = Color.Black;
                    {
                        Label la = lawip = new Label();
                        la.AutoSize = true;
                        flp.Controls.Add(la);
                        flp.SetFlowBreak(la, true);
                    }
                    {
                        ProgressBar pb = new ProgressBar();
                        pb.Style = ProgressBarStyle.Marquee;
                        flp.Controls.Add(pb);
                    }
                    p.Controls.Add(flp);
                    flp.Show();
                }
                p.Parent = this;
            }

            Sync = SynchronizationContext.Current;
        }
Beispiel #2
0
        private void addProgressBarToTheWindow(FlowLayoutPanel progressBar)
        {
            FlowLayoutPanel f = new FlowLayoutPanel();

            f.Size          = new Size(5400, 30);
            f.FlowDirection = FlowDirection.LeftToRight;
            f.WrapContents  = true;

            f.HorizontalScroll.Visible = true;
            f.VerticalScroll.Maximum   = 0;

            f.AutoScroll = true;

            ProgressBar p = new ProgressBar();

            p.Size    = new Size(420, 24);
            p.Maximum = 100;
            p.Minimum = 0;
            p.Value   = 60;
            p.Visible = true;

            f.Controls.Add(p);


            Label l = new Label();

            l.Text    = _name + " " + p.Value.ToString() + "%";
            l.Visible = true;
            l.Size    = new Size(300, 24);

            f.Controls.Add(l);
            f.Show();

            progressBar.Controls.Add(f);
        }
Beispiel #3
0
        public CSToolbarBigControl()
        {
            _splitContainer.Dock             = DockStyle.Fill;
            _splitContainer.IsSplitterFixed  = true;
            _splitContainer.Orientation      = Orientation.Vertical;
            _splitContainer.FixedPanel       = FixedPanel.Panel2;
            _splitContainer.SplitterWidth    = 1;
            _splitContainer.SplitterDistance = _splitContainer.Width - ITEM_WIDTH;

            this.Controls.Add(_splitContainer);

            //
            _dropdownPanel.Width     = 300;
            _dropdownPanel.Height    = 300;
            _dropdownPanel.BackColor = Color.Blue;
            _dropdownPanel.BringToFront();
            _dropdownPanel.FlowDirection = FlowDirection.TopDown;
            this.Controls.Add(_dropdownPanel);
            _dropdownPanel.Show();

            _btnDropdown.Dock = DockStyle.Fill;
            _btnDropdown.Text = "Others";
            _btnDropdown.TextImageRelation = TextImageRelation.ImageAboveText;
            //_btnDropdown.ButtonElement.Children[0].Visibility = ElementVisibility.Hidden;

            _splitContainer.Panel2.Controls.Add(_btnDropdown);
        }
Beispiel #4
0
        private void MoreLabelBtn_MouseClick(object sender, MouseEventArgs e)
        {
            projInfo.Hide();
            editProj.Hide();
            tasksPanel.Size       = new Size(850, 400);
            tasksPanel.AutoScroll = true;
            tasksPanel.Location   = new Point(350, 200);
            tasksPanel.BackColor  = Color.Silver;
            ParentForm.Controls.Add(tasksPanel);
            tasksPanel.Controls.Clear();
            tasksPanel.Show();
            tasksPanel.BringToFront();
            //here
            AdminClass       adm      = new AdminClass();
            List <TaskClass> tasklist = new List <TaskClass>();

            adm.showtask(ref tasklist, project.id);
            for (int i = 0; i < tasklist.Count; i++)
            {
                ViewTasksUC task = new ViewTasksUC();
                task.taskStatus.Visible      = true;
                task.InfoLabelBtn.Visible    = false;
                task.AssignLabelBtn.Visible  = false;
                task.CommentLabelBtn.Visible = false;
                task.TaskFinishedBtn.Visible = false;
                //here
                task.TaskName.Text      = tasklist[i].name;
                task.ProjectName.Text   = tasklist[i].project_name;
                task.TaskEmpLabel.Text  = tasklist[i].employee_name;
                task.startDuration.Text = "Start on " + tasklist[i].start_time.Day + " / " + tasklist[i].start_time.Month + " / " + tasklist[i].start_time.Year;
                task.endDuration.Text   = "End on " + tasklist[i].end_time.Day + " / " + tasklist[i].end_time.Month + " / " + tasklist[i].end_time.Year;
                task.taskStatus.Text    = tasklist[i].status;
                tasksPanel.Controls.Add(task);
            }
        }
Beispiel #5
0
        public void Open(string title, string msg)
        {
            Dialog frm = new Dialog();

            frm.Text = title;
            var pnl   = new Panel();
            var flow  = new FlowLayoutPanel();
            var btnok = new Button();

            btnok.AutoSize     = true;
            btnok.AutoSizeMode = AutoSizeMode.GrowAndShrink;
            flow.Height        = btnok.Height + 4;
            btnok.Text         = "ok";
            flow.Dock          = DockStyle.Bottom;
            flow.Controls.Add(btnok);
            btnok.Show(); btnok.Click += (o, a) =>
            {
                frm.Close();
            };
            pnl.Controls.Add(flow);
            flow.Show();
            var lbl = new Label();

            lbl.Text      = msg;
            lbl.TextAlign = ContentAlignment.MiddleCenter;
            lbl.Dock      = DockStyle.Fill;
            lbl.AutoSize  = false;
            pnl.Controls.Add(lbl); lbl.Show();
            frm.Controls.Add(pnl);
            pnl.Dock = DockStyle.Fill;
            frm.Size = new Size(320, 200);
            AppearanceManager.SetupDialog(frm);
        }
Beispiel #6
0
        public dynamic flow(Control parent, Point loc, Size size)
        {
            var pnl = new FlowLayoutPanel();

            pnl.Size     = size;
            pnl.Location = loc;
            parent.Controls.Add(pnl);
            pnl.Show();
            return(pnl);
        }
Beispiel #7
0
        public void PopulateJoinLegion(List <Legion> legions)
        {
            lgn_join.BringToFront();

            fllegionlist.Controls.Clear();

            foreach (var lgn in legions)
            {
                var bnr = new Panel();
                bnr.Height    = 100;
                bnr.Tag       = "keepbg";
                bnr.BackColor = GetColor(lgn.BannerColor);

                bnr.Width = fllegionlist.Width;

                var lTitle = new Label();
                lTitle.AutoSize = true;
                lTitle.Tag      = "keepbg header2";
                lTitle.Text     = $"[{lgn.ShortName}] {lgn.Name}";
                lTitle.Location = new Point(18, 17);
                bnr.Controls.Add(lTitle);
                lTitle.Show();


                var flButtons = new FlowLayoutPanel();
                flButtons.AutoSize      = true;
                flButtons.AutoSizeMode  = AutoSizeMode.GrowAndShrink;
                flButtons.Tag           = "keepbg";
                flButtons.FlowDirection = FlowDirection.RightToLeft;
                flButtons.Anchor        = AnchorStyles.Top | AnchorStyles.Right;
                flButtons.Top           = 2;
                flButtons.Left          = bnr.Width - flButtons.Width - 2;
                bnr.Controls.Add(flButtons);
                flButtons.Show();

                var btn = new Button();
                btn.Text   = "More info";
                btn.Click += (o, a) =>
                {
                    ShowLegionInfo(lgn);
                };
                flButtons.Controls.Add(btn);
                btn.Show();

                fllegionlist.Controls.Add(bnr);
                bnr.Show();
                ControlManager.SetupControls(bnr);
            }
        }
Beispiel #8
0
        private async Task F_DMOpen(ulong arg)
        {
            Hide();
            textArea.Show();
            mainForm.UnHide();
            server.ChangeChannel(new SocketChannel(arg));

            textArea.Controls.Clear();
            if (server.CurrentUser.SelectedChannel.Messages != null)
            {
                foreach (SocketMessage message in server.CurrentUser.SelectedChannel.Messages)
                {
                    Better_Forms.User_Control.Main_Form.Message m = new Better_Forms.User_Control.Main_Form.Message(message, textArea, server, mainForm);
                    m.RefreshChat += M_RefreshChat;
                    textArea.Controls.Add(m);
                }
            }
        }
        private void addProgressBarToTheWindow()
        {
            FlowLayoutPanel f = new FlowLayoutPanel();

            f.Size          = new Size(5400, 30);
            f.FlowDirection = FlowDirection.LeftToRight;
            f.WrapContents  = true;

            f.HorizontalScroll.Visible = true;
            f.VerticalScroll.Maximum   = 0;

            f.AutoScroll = true;

            ProgressBar p = new ProgressBar();

            p.Size    = new Size(420, 24);
            p.Maximum = 100;
            p.Minimum = 0;
            //            p.Location = new Point(0, 0);
            p.Value   = 60;
            p.Visible = true;

            //            p.Show();

            f.Controls.Add(p);

            Label l = new Label();

            l.Text    = p.Value.ToString() + "%";// +"vbdfkjvdfkjlvdfvdfbdkj.avi";
            l.Visible = true;
            l.Size    = new Size(300, 24);
            //  l.Location = new Point(120, 0);

            f.Controls.Add(l);


            f.Show();

            ProgressBars.Controls.Add(f);
        }
Beispiel #10
0
        public static void DeckFilter(Deck deck, FlowLayoutPanel target)
        {
            target.Controls.Clear();

            string      json     = File.ReadAllText(JsonPathLocal);
            RootObject  database = JsonConvert.DeserializeObject <RootObject>(json);
            List <Card> cards    = database.Data.Cards; //we only want a list of Card objects

            //Group duplicates
            var dup = deck.Cards
                      .GroupBy(x => new { x.CardId })
                      .Select(group => new { ID = group.Key, Count = group.Count() });

            //Show deck's contents
            target.Hide();
            foreach (var basex in dup)
            {
                Card       targetCard = cards.Find(x => x.CardId == basex.ID.CardId);
                CardBanner banner     = new CardBanner(targetCard.CardId, targetCard.CardName, targetCard.Cost, targetCard.RarityId, basex.Count, true);
                target.Controls.Add(banner);
            }
            target.Show();
        }
Beispiel #11
0
 private void DockFill(FlowLayoutPanel p)
 {
     p.Show();
     p.Dock = DockStyle.Fill;
 }
Beispiel #12
0
 private void ShowAvailableProductsPanel()
 {
     productDetailsPanel.Hide();
     availableProductsPanel.Show();
 }
Beispiel #13
0
        public void SetupCategory(string cat)
        {
            pnlappslist.Controls.Clear();
            pnlappslist.Show();
            pnlappslist.BringToFront();
            Category = Localization.Parse(cat);
            var upgrades = GetAllInCategory();

            lbtitle.Text = Localization.Parse(cat);
            if (upgrades.Length == 0)
            {
                var err = new Label();
                err.AutoSize = true;
                err.Text     = "There are no apps in this list! Come back later for more.";
                pnlappslist.Controls.Add(err);
                err.Show();
            }
            else
            {
                var fl = new FlowLayoutPanel();
                fl.Dock = DockStyle.Fill;
                pnlappslist.Controls.Add(fl);
                fl.AutoScroll = true;
                fl.Show();
                foreach (var upg in upgrades)
                {
                    var pnl = new Panel();
                    pnl.Height = 250;
                    pnl.Width  = 200;
                    fl.Controls.Add(pnl);
                    pnl.Show();
                    var upgTitle = new Label();
                    upgTitle.Text        = upg.Name;
                    upgTitle.Dock        = DockStyle.Top;
                    upgTitle.AutoSize    = true;
                    upgTitle.MaximumSize = new Size(pnl.Width, 0);
                    upgTitle.Tag         = "header3";
                    pnl.Controls.Add(upgTitle);
                    upgTitle.Show();

                    var cp_display = new Panel();
                    cp_display.Height = 30;
                    cp_display.Dock   = DockStyle.Bottom;
                    pnl.Controls.Add(cp_display);
                    cp_display.Show();

                    var cp_value = new Label();
                    if (Shiftorium.UpgradeInstalled(upg.ID))
                    {
                        cp_value.Text = "Already Purchased.";
                    }
                    else
                    {
                        cp_value.Text = $"{upg.Cost} CP";
                    }
                    cp_value.AutoSize = true;
                    cp_value.Top      = (cp_display.Height - cp_value.Height) / 2;
                    cp_value.Left     = 5;
                    cp_display.Controls.Add(cp_value);
                    cp_value.Show();


                    if (cp_value.Text != "Already Purchased.")
                    {
                        var more_info = new Button();
                        more_info.Text   = "More info";
                        more_info.Click += (o, a) =>
                        {
                            ViewMoreInfo(upg);
                        };
                        more_info.AutoSize     = false;
                        more_info.AutoSizeMode = AutoSizeMode.GrowAndShrink;
                        more_info.Top          = (cp_display.Height - more_info.Height) / 2;
                        more_info.Left         = cp_display.Width - more_info.Width - 5;
                        cp_display.Controls.Add(more_info);
                        more_info.Show();
                    }

                    var desc = new Label();
                    desc.Text     = upg.Description;
                    desc.AutoSize = false;
                    desc.Dock     = DockStyle.Fill;
                    pnl.Controls.Add(desc);
                    desc.Show();
                    desc.BringToFront();


                    ControlManager.SetupControls(pnl);
                }
            }
        }