Esempio n. 1
0
        public static void Main(string[] args)
        {
//Debug.Active = true;
//Debug.DevelopmentInfo = true;
//Debug.Level = 10;
            ConsoleDebug.Connect();
            ApplicationPreferences.AddMasterConfiguration(typeof(TestPreferences), true);
            ConfigFile aFile = ApplicationPreferences.GetMasterConfiguration();

            aFile.Load();

            Application.Init();
            MainWindow win = new MainWindow();

            win.Show();
            Application.Run();

            aFile.Save();
        }
Esempio n. 2
0
    public MainWindow() : base(Gtk.WindowType.Toplevel)
    {
        ApplicationPreferences.AddMasterConfiguration(typeof(TimerList), false);
        configFile = ApplicationPreferences.GetMasterConfiguration();
        configFile.Load();

        Build();
        Timers.ItemsDataSource = list;
        selection.Target       = Timers.CurrentSelection;
        cntActive = new ActionController(selection, "", "",
                                         new ActionMonitor(ActionMonitorType.Sensitivity, removeAction,
                                                           new ActionMonitorDefaults(ActionMonitorDefaultsType.NotNullTarget)),
                                         new ActionMonitor(ActionMonitorType.Sensitivity, propertiesAction,
                                                           new ActionMonitorDefaults(ActionMonitorDefaultsType.NotNullTarget))
                                         );
        for (int i = 1; i <= 25; i++)
        {
            Timer tim = new Timer("Timer " + i, 0, 1, i);
            list.Add(tim);
            tim.Active = true;
        }
    }