Пример #1
0
        public TimerForm()
        {
            InitializeComponent();

            panel1.BackColor = textBox1.BackColor = Color.FromArgb(30, 30, 30);

            this.icon = new CounterIcon(this.notifyIcon1);
            this.icon.Tick += icon_Tick;
            this.icon.Elapsed += icon_Elapsed;

            this.player = new AudioControl<string>(x => x);

            this.Load+=TimerForm_Load;
            hotkeys = new List<GlobalHotkey>();
            hotkeys.Add(new GlobalHotkey("Next", Constants.ALT + Constants.CTRL, Keys.A, this));

            this.Disposed += (s, e) => { icon.Dispose(); player.Dispose(); };
        }
Пример #2
0
        public TimerForm()
        {
            InitializeComponent();

            panel1.BackColor = textBox1.BackColor = Color.FromArgb(30, 30, 30);

            this.icon          = new CounterIcon(this.notifyIcon1);
            this.icon.Tick    += icon_Tick;
            this.icon.Elapsed += icon_Elapsed;

            this.player = new AudioControl <string>(x => x);

            this.Load += TimerForm_Load;
            hotkeys    = new List <GlobalHotkey>();
            hotkeys.Add(new GlobalHotkey("Next", Constants.ALT + Constants.CTRL, Keys.A, this));

            this.Disposed += (s, e) => { icon.Dispose(); player.Dispose(); };
        }