예제 #1
0
        /// <summary>
        /// 升级按钮
        /// </summary>
        void _buttonUpdate_Click(object sender, EventArgs e)
        {
            var items = _gridViewUpdatable.DataStore as List <PluginModel>;

            if (items != null && items.Any(r => r.Checked))
            {
                var infos = items.Select(r => (r.Tag as UpdateInfo)).Where(r => r.CanUpdate).ToArray();
                if (infos.Length <= 0)
                {
                    return;
                }
                var install = new InstallDialog(_host, infos);
                install.InstallPluginCompletedToDo += new EventHandler(install_InstallPluginCompletedToDo);
                install.ShowModal(this);
            }
        }
예제 #2
0
        void _buttonInstallFrom_Click(object sender, EventArgs e)
        {
            var openFileDialog = new OpenFileDialog
            {
                Title = "Select Altman Plugin To Install",
                Filters = {new FileDialogFilter("Altman Plugin Zip File", ".zip")}
            };
            if (openFileDialog.ShowDialog(Application.Instance.MainForm) == DialogResult.Ok)
            {
                var srcfiles = openFileDialog.Filenames;

                var install = new InstallDialog(_host);
                install.InstallPluginCompletedToDo += new EventHandler(install_InstallPluginCompletedToDo);               
                install.Show();
                install.InstallOffline(srcfiles);
            }
        }
예제 #3
0
        void _buttonInstallFrom_Click(object sender, EventArgs e)
        {
            var openFileDialog = new OpenFileDialog
            {
                Title   = "Select Altman Plugin To Install",
                Filters = { new FileDialogFilter("Altman Plugin Zip File", ".zip") }
            };

            if (openFileDialog.ShowDialog(Application.Instance.MainForm) == DialogResult.Ok)
            {
                var srcfiles = openFileDialog.Filenames;

                var install = new InstallDialog(_host);
                install.InstallPluginCompletedToDo += new EventHandler(install_InstallPluginCompletedToDo);
                install.Show();
                install.InstallOffline(srcfiles);
            }
        }
예제 #4
0
 /// <summary>
 /// 升级按钮
 /// </summary>
 void _buttonUpdate_Click(object sender, EventArgs e)
 {
     var items = _gridViewUpdatable.DataStore as List<PluginModel>;
     if (items != null && items.Any(r => r.Checked))
     {
         var infos = items.Select(r => (r.Tag as UpdateInfo)).Where(r => r.CanUpdate).ToArray();
         if (infos.Length <= 0) return;
         var install = new InstallDialog(_host);
         install.InstallPluginCompletedToDo += new EventHandler(install_InstallPluginCompletedToDo);
         install.Show();
         install.InstallOnline(infos.Select(r => r.DownloadUrl));
     }
 }