Beispiel #1
0
        private void ShowChangelog(ModuleData data)
        {
            formChangelog frm = new formChangelog(module.GetModuleChangelog(data), new Point(this.Location.X, this.Location.Y), data.Name);

            changelogOpen = true;
            frm.ShowDialog();
        }
Beispiel #2
0
        private void menu_Click(object sender, EventArgs e)
        {
            // Each context menu item triggers this event, get which is triggered using Tag element //
            ToolStripMenuItem click = (ToolStripMenuItem)sender;

            switch (click.Tag)
            {
            case "modules":
                if (module.InstalledModules.Count > 0)
                {
                    formModules = new formModules(module, utility);
                    formModules.ShowDialog();
                }
                UpdateWorker.RunWorkerAsync(false);
                break;

            case "settings":
                if (formSettings == null)
                {
                    formSettings = new formSettings(module, utility);
                }
                if (formSettings.Visible == false)
                {
                    formSettings.ShowDialog();
                    UpdateWorker.RunWorkerAsync(false);
                }
                break;

            case "update":
                if (!UpdateWorker.IsBusy)
                {
                    UpdateWorker.RunWorkerAsync(true);
                }
                break;

            case "changelog":
                formChangelog = new formChangelog(module.GetModuleChangelog(null), new Point(Screen.PrimaryScreen.WorkingArea.Width - (600 + 5), Screen.PrimaryScreen.WorkingArea.Height - (600 + 5)), "Jovo");
                formChangelog.ShowDialog();
                break;

            case "exit":
                icon.Visible = false;
                Application.Exit();
                break;

            case "test":
                // nothing here :'(
                break;

            default:
                module.ExecuteModule(module.FindModule(((ModuleData)click.Tag).Name));
                break;
            }
        }