Esempio n. 1
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            ListView lv1 = ((ListView)((TabControl)tabControl1.SelectedTab.Controls[0]).SelectedTab.Controls[0]);

            FolderBrowserDialog fd = new FolderBrowserDialog();
            if (fd.ShowDialog() == DialogResult.OK)
            {

                for (int i = 0; i < lv1.SelectedIndices.Count; i++)
                {
                    parametrs.LV.Items.Add(new ListViewItem(new string[] { lv1.Items[lv1.SelectedIndices[i]].SubItems[1].Text + " - " + lv1.Items[lv1.SelectedIndices[i]].SubItems[2].Text, "0%", lv1.Items[lv1.SelectedIndices[i]].SubItems[4].Text, lv1.Items[lv1.SelectedIndices[i]].SubItems[5].Text}));
                    if (parametrs.LV.Items.Count % 2 == 0)
                        parametrs.LV.Items[parametrs.LV.Items.Count - 1].BackColor = SystemColors.ControlLight;

                    ProgressBar pb = new ProgressBar();
                    pb.Parent = parametrs.LV;
                    pb.Visible = true;
                    pb.Bounds = new Rectangle(parametrs.LV.Items[parametrs.LV.Items.Count - 1].SubItems[1].Bounds.X, parametrs.LV.Items[parametrs.LV.Items.Count - 1].SubItems[1].Bounds.Y, parametrs.LV.Columns[1].Width, parametrs.LV.Items[0].Bounds.Height);
                    pb.SetBounds(parametrs.LV.Items[parametrs.LV.Items.Count - 1].SubItems[1].Bounds.X, parametrs.LV.Items[parametrs.LV.Items.Count - 1].SubItems[1].Bounds.Y, parametrs.LV.Columns[1].Width, parametrs.LV.Items[0].Bounds.Height);
                    pb.BackColor = Color.Black;
                    pb.ForeColor = Color.Lime;
                    pb.Style = ProgressBarStyle.Blocks;

                    parametrs.prgb.Add(pb);
                    download(parametrs.LV.Items.Count-1, fd.SelectedPath);

                }
                //MessageBox.Show("BioHazard ☣☣");
                parametrs.fd.Show();
                parametrs.fd.ShowInTaskbar = true;
            }
            else MessageBox.Show("Ничего не выбрано.");
        }
Esempio n. 2
0
 private void CrearProgressBars(int sX, int sY, int sAltura, int sAncho)
 {
     pb= new System.Windows.Forms.ProgressBar();
     pb.SetBounds(sX, sY, sAncho, sAltura);
        // pb.Parent = this;
     pb.Visible = true;
     pb.CreateControl();
     pb.Maximum = 100;
     pb.Minimum = 0;
     pb.Name = "progressBar";
     pb.Step = 1;
     pb.Value = 1;
     pb.PerformStep();
 }
Esempio n. 3
0
        private void createTab(int connection)
        {
            TabPage page = new TabPage(Properties.Settings.Default["username" + connection].ToString());

            ListView listview = new ListView();
            listview.SetBounds(6, 40, 360, 430);
            listview.Name = "lv_mails" + connection;
            listview.View = View.List;
            listview.SelectedIndexChanged += new EventHandler(mailSelectionChanged);
            page.Controls.Add(listview);

            ProgressBar progBar = new ProgressBar();
            progBar.SetBounds(6, 239, 360, 23);
            progBar.Name = "pb_progress" + connection;
            progBar.Style = ProgressBarStyle.Blocks;
            page.Controls.Add(progBar);
            progBar.BringToFront();

            Button button_compose = new Button();
            button_compose.Name = "btn_compose" + connection;
            button_compose.SetBounds(6, 10, 75, 23);
            button_compose.Text = "New mail...";
            button_compose.Click += new EventHandler(sendMailButton_Click);
            page.Controls.Add(button_compose);

            Button button_delete = new Button();
            button_delete.Name = "btn_delete" + connection;
            button_delete.SetBounds(87 ,10, 75, 23);
            button_delete.Text = "Delete mail";
            button_delete.Click += new EventHandler(deleteMail);
            page.Controls.Add(button_delete);

            GroupBox groupbox = new GroupBox();
            groupbox.Text = "Mail";
            groupbox.SetBounds(372, 34, 432, 436);
            page.Controls.Add(groupbox);

            Label label_from = new Label();
            label_from.Text = "From:";
            label_from.SetBounds(6, 22, 33, 13);
            groupbox.Controls.Add(label_from);

            Label label_to = new Label();
            label_to.Text = "To:";
            label_to.SetBounds(6, 48, 23, 13);
            groupbox.Controls.Add(label_to);

            Label label_cc = new Label();
            label_cc.Text = "CC:";
            label_cc.SetBounds(6, 74, 24, 13);
            groupbox.Controls.Add(label_cc);

            Label label_bcc = new Label();
            label_bcc.Text = "BCC:";
            label_bcc.SetBounds(218, 74, 31, 13);
            groupbox.Controls.Add(label_bcc);

            TextBox tb_from = new TextBox();
            tb_from.Name = "tb_from" + connection;
            tb_from.SetBounds(42, 19, 384, 20);
            groupbox.Controls.Add(tb_from);

            TextBox tb_to = new TextBox();
            tb_to.Name = "tb_to" + connection;
            tb_to.SetBounds(42, 45, 384, 20);
            groupbox.Controls.Add(tb_to);

            TextBox tb_cc = new TextBox();
            tb_cc.Name = "tb_cc" + connection;
            tb_cc.SetBounds(42, 71, 170, 20);
            groupbox.Controls.Add(tb_cc);

            TextBox tb_bcc = new TextBox();
            tb_bcc.Name = "tb_bcc" + connection;
            tb_bcc.SetBounds(256, 71, 170, 20);
            groupbox.Controls.Add(tb_bcc);

            TextBox tb_msg = new TextBox();
            tb_msg.Name = "tb_msg" + connection;
            tb_msg.Multiline = true;
            tb_msg.SetBounds(9, 97, 417, 333);
            groupbox.Controls.Add(tb_msg);

            tabControl1.TabPages.Add(page);
        }