private void AddLVItem(string key, string name, int value)
        {
            lvi = new ListViewItem();
            MetroFramework.Controls.MetroProgressBar pb = new MetroFramework.Controls.MetroProgressBar();
            lvi.SubItems[0].Text = key;



            lvi.SubItems.Add(name);
            lvi.SubItems.Add("");
            lvi.SubItems.Add("GB");
            listView1.Items.Add(lvi);

            Rectangle r = lvi.SubItems[2].Bounds;

            pb.SetBounds(r.X, r.Y + 6, r.Width, r.Height - 5);
            pb.Minimum = 1;
            pb.Maximum = 100;
            pb.Size    = new Size(120, 5);
            pb.Style   = MetroFramework.MetroColorStyle.Purple;
            pb.Value   = value;
            pb.Name    = key;
            listView1.Controls.Add(pb);
            listView1.Cursor = Cursors.Hand;
        }
Esempio n. 2
0
 public CheckUpdates(string _AppName, string _ThisVers, string _UrlLinq, SwMsgDwnldUpt _sw, MetroFramework.Controls.MetroProgressBar _progressBar, NotifyIcon notify, Panel panel, Label labelU)
 {
     progressBar   = _progressBar;
     AppName       = _AppName;
     ThisVersion   = _ThisVers;
     UrlLinq       = _UrlLinq;
     swMsg         = _sw;
     notifyIcon    = notify;
     panelProgress = panel;
     labelProgress = labelU;
 }
 public PackageDownloader(ref Form1 Method, ShowMessageDownloader mesD,
                          MetroFramework.Controls.MetroProgressBar pb, Panel pan, Label labelInd, string FileName, string LinqFile)
 {
     FileNameDownload = FileName;
     LinqFileDownload = LinqFile;
     form1            = Method;
     swDownl          = mesD;
     progressBar      = pb;
     labelIndicator   = labelInd;
     panelD           = pan;
 }
 public CheckUpdates(string _AppName, string _ThisVers, string _UrlLinq, SwMsgDwnldUpt _sw, MetroFramework.Controls.MetroProgressBar _progressBar, NotifyIcon notify, Label labelU)
 {
     progressBar         = _progressBar;
     AppName             = _AppName;
     ThisVersion         = _ThisVers;
     UrlLinq             = _UrlLinq;
     swMsg               = _sw;
     notifyIcon          = notify;
     labelProgress       = labelU;
     GetRemoteVerLinq    = LinkGenerator() + GetRemoteVerLinq;
     GetReleaseNotesLinq = LinkGenerator() + GetReleaseNotesLinq;
 }
Esempio n. 5
0
 public void discharge(MetroFramework.Controls.MetroProgressBar BatteryCharge)
 {
     if (charge > 0)
     {
         BatteryCharge.Value -= decrement;
         charge = BatteryCharge.Value;
     }
     else
     {
         AutoClosingMessageBox.Show("The ATM is running out of power. Disconnecting... and recharging.", "Low energy", 1500, Form.ActiveForm);
         //charge = 100;
         Environment.Exit(0);
     }
 }
Esempio n. 6
0
        //bar coloring function

        private void bar_color(int n, MetroFramework.Controls.MetroProgressBar a)
        {
            if (n <= 25)
            {
                a.Style = MetroFramework.MetroColorStyle.Green;
            }
            if (n > 25 && n <= 50)
            {
                a.Style = MetroFramework.MetroColorStyle.Yellow;
            }
            if (n > 50 && n < 90)
            {
                a.Style = MetroFramework.MetroColorStyle.Orange;
            }
            if (n >= 90)
            {
                a.Style = MetroFramework.MetroColorStyle.Red;
            }
        }
Esempio n. 7
0
 public Installer(ref Form1 form, ShowMessaged showMsg, MetroFramework.Controls.MetroProgressBar pb)
 {
     _form1      = form;
     progressBar = pb;
     messaged    = showMsg;
 }