Inheritance: System.Windows.Forms.Form
Ejemplo n.º 1
0
        private void button6_Click(object sender, EventArgs e)
        {
            var item = lstwebpackages.SelectedItems[0];

            string[] items  = (string[])item.Tag;
            string   url    = items[2];
            var      result = MessageBox.Show("Are you sure you want to download " + item.Text + " Package ?", "",
                                              MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (result == DialogResult.Yes)
            {
                bool admin      = items.Length > 4 && items[3] == "admin";
                var  downloader = new PackageDownloader(url,
                                                        Path.Combine(Path.GetTempPath(), item.Text + ".ynotepackage"), admin);
                downloader.ShowDialog(this);
            }
        }
Ejemplo n.º 2
0
 private void button6_Click(object sender, EventArgs e)
 {
     var item = lstwebpackages.SelectedItems[0];
     string[] items = (string[]) item.Tag;
     string url = items[2];
     var result = MessageBox.Show("Are you sure you want to download " + item.Text + " Package ?", "",
         MessageBoxButtons.YesNo, MessageBoxIcon.Question);
     if (result == DialogResult.Yes)
     {
         bool admin = items.Length > 4 && items[3] == "admin";
         var downloader = new PackageDownloader(url,
             Path.Combine(Path.GetTempPath(), item.Text + ".ynotepackage"),admin);
         downloader.ShowDialog(this);
     }
 }