Esempio n. 1
0
        public void CreateMenu()
        {
            AppCommand schedulerMenu = GetSchedulerMenu();

            AppCommand showCommand = new AppCommand("SuperSchedulerCreateSchedule", "Schedules");
            showCommand.Click += (sender, e) =>
            {
                using (SetupForm form = new SetupForm(_data))
                {
                    if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                    {
                    }
                }
            };

            LatchedAppCommand enabledCommand = new LatchedAppCommand("SuperSchedulerEnabled", "Enabled");
            enabledCommand.IsChecked = _data.IsEnabled;
            enabledCommand.Checked += (sender, e) =>
            {
                _data.IsEnabled = e.CheckedState;
            };

            /*if (schedulerMenu.Items.Length > 0)
                schedulerMenu.Add(new AppCommand("s1", "-"));*/
            schedulerMenu.Add(showCommand);
            schedulerMenu.Add(new AppCommand("s1", "-"));
            schedulerMenu.Add(enabledCommand);
        }