protected override void CreateHandle () { m_helper = new UpDownSpinnerHelper(); m_view = m_helper; m_helper.Host = this; m_helper.MinValue = -1; m_helper.MaxValue = 1; m_helper.IntValue = 0; m_helper.Increment = 1; m_helper.Activated += delegate(object sender, EventArgs e) { if(m_helper.IntValue == 1) owner.UpButton(); else if (m_helper.IntValue == -1) owner.DownButton(); m_helper.IntValue = 0; }; }
protected override void CreateHandle() { m_helper = new UpDownSpinnerHelper(); m_view = m_helper; m_helper.Host = this; m_helper.MinValue = -1; m_helper.MaxValue = 1; m_helper.IntValue = 0; m_helper.Increment = 1; m_helper.Activated += delegate(object sender, EventArgs e) { if (m_helper.IntValue == 1) { owner.UpButton(); } else if (m_helper.IntValue == -1) { owner.DownButton(); } m_helper.IntValue = 0; }; }