Ejemplo n.º 1
0
 private void btnAdd_Click(object sender, EventArgs e)
 {
     if (txtAddCommand.Text != string.Empty)
     {
         PackagesManagement pm = new PackagesManagement();
         pm.add(new string[] { txtAddCommand.Text });
         RefreshList();
         txtAddCommand.Text = string.Empty;
     }
     else
     {
         MessageBox.Show(Translation.Engine.Lines["mboxnopackagenamegiventext"], Translation.Engine.Lines["mboxnopackagenamegiventitle"], MessageBoxButtons.OK, MessageBoxIcon.Warning);
     }
 }
Ejemplo n.º 2
0
        private void addInstalledToList()
        {
            string output = Cmd.RunAndWaitWithOutput("choco list --local-only", ProcessWindowStyle.Hidden);

            output.Split('\n').ToList().ForEach((line) =>
            {
                this.Invoke(new MethodInvoker(() =>
                {
                    if ((!line.Contains("installed")) && line != "")
                    {
                        PackagesManagement pm = new PackagesManagement();
                        pm.add(new string[] { line.Split(' ')[0] });
                        RefreshList();
                    }
                    HideLog();
                }));
            });
        }
Ejemplo n.º 3
0
 private void btnOpenSite_Click(object sender, EventArgs e)
 {
     if (Application.OpenForms["FrmBrowser"] == null)
     {
         FrmBrowser browser = new FrmBrowser();
         browser.Show();
         browser.FormClosed += (send, ev) =>
         {
             foreach (string package in browser.Chocolatras)
             {
                 PackagesManagement pm = new PackagesManagement();
                 pm.add(new string[] { package });
             }
             RefreshList();
         };
     }
     else
     {
         Application.OpenForms["FrmBrowser"].BringToFront();
     }
 }