public BreakTimerForm() { this.BackColor = SystemColors.Window; this.Font = new Font("Verdana", 24, FontStyle.Bold); INuGenTimer timer = new NuGenTimer(); timer.Interval = 1000; _countDownBlock = new NuGenCountDownBlock( new NuGenCountDownSpan(Math.Max(1, Math.Min(99, Settings.Default.Interval)), 0) , timer ); _countDownBlock.Tick += _countDownBlock_Tick; }
/// <summary> /// Disposes of the resources (other than memory) used by the <see cref="T:System.Windows.Forms.Form"></see>. /// </summary> /// <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> protected override void Dispose(bool disposing) { if (disposing) { Cursor.Show(); if (_countDownBlock != null) { _countDownBlock.Tick -= _countDownBlock_Tick; _countDownBlock.Dispose(); _countDownBlock = null; } } base.Dispose(disposing); }