Exemple #1
0
        public SplashWnd()
        {
            _initializationComplete = false;
            _timer          = new Timer();
            _timer.Interval = 500;
            _startingTick   = Environment.TickCount;
            _timer.Tick    += timer_Tick;
            _timer.Enabled  = true;

            InitializeComponent();

            _titleLabel.Text     = AssemblyAttributes.Title;
            _authorLabel.Text    = $"by {AssemblyAttributes.Company}";
            _versionLabel.Text   = AssemblyAttributes.Version;
            _copyrightLabel.Text = AssemblyAttributes.Copyright;

            _controls = new ManageIntervalWnd();

            _tray     = new TrayIconWnd(_trayIcon, _controls);
            _settings = new SettingsManager();

            _settings.InitializeFromSqlitePath(getStoragePath(), "debug.private");
            _clock = new IntervalManager(_settings);

            _plugins = new PluginManager();
            if (!_plugins.Initialize(_clock, _tray, _controls))
            {
                Application.Exit();
            }
            else
            {
                _initializationComplete = true;
            }
        }
Exemple #2
0
 public void RefreshForState(IntervalManager clock = null)
 {
     if (clock == null)
     {
         _icon.Icon = Properties.Resources.idle;
         return;
     }
 }
Exemple #3
0
        public bool Initialize(IntervalManager core, params IPlugin[] builtins)
        {
            _clock    = core;
            _settings = core.Settings;
            _plugins  = new List <Plugin>();

            foreach (IPlugin builtin in builtins)
            {
                Plugin.Register(this, builtin, $"internal");
            }

            findAndRegisterPlugins();

            _clock.Subscribe(this);

            return(true);
        }
Exemple #4
0
 public CoreShim(Plugin caller, IntervalManager api, SettingsManager settings)
 {
     _instance = caller;
     _api      = api;
     _settings = settings;
 }