Пример #1
0
        private void ButtonClick(object sender, VarEventClick e)
        {
            int id = e.idApplication;
            BackgroundWorker workerDownload = new BackgroundWorker();

            workerDownload.DoWork += async delegate(object s, DoWorkEventArgs args)
            {
                await Download(id);

                args.Result = id;
            };

            if (e.numButton == 2)
            {
                UninstallApp(id);
            }
            else
            {
                if (!githubError)
                {
                    workerDownload.RunWorkerAsync(id);
                }
                else
                {
                    MessageBox.Show("Impossible to download tools if the app couldn't get the data from github at launch.");
                }
            }

            e.numButton = 0;
        }
Пример #2
0
        private void buttonUninstall_Click(object sender, RoutedEventArgs e)
        {
            VarEventClick var = new VarEventClick();

            var.numButton     = 2;
            var.idApplication = ApplicationId;
            if (ButtonClick != null)
            {
                ButtonClick(this, var);
            }
        }
Пример #3
0
        private void ButtonClickCustom(object sender, VarEventClick e)
        {
            MessageBox.Show(e.numButton.ToString());
            int id = e.idApplication;

            if (e.numButton == 2)
            {
                UninstallApp(id);
                //MessageBox.Show("delete");
            }
            e.numButton = 0;
        }