Inheritance: System.Windows.Forms.ToolStripDropDown, IFWDisposable
示例#1
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Handles the Closed event of the m_dropDown control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.Windows.Forms.ToolStripDropDownClosedEventArgs"/>
 /// instance containing the event data.</param>
 /// ------------------------------------------------------------------------------------
 private void dropDown_Closed(object sender, ToolStripDropDownClosedEventArgs e)
 {
     // we have to set a variable so that we know that user clicked on drop down button
     // or in text box to close the drop down.
     m_fDropDownClickedClose = ClientRectangle.Contains(PointToClient(MousePosition));
     m_dropDown = null;
 }
示例#2
0
 /// ------------------------------------------------------------------------------------
 /// <summary>
 /// Shows the drop down.
 /// </summary>
 /// ------------------------------------------------------------------------------------
 private void ShowDropDown()
 {
     m_dropDown                 = new ColorPickerDropDown(m_fShowUnspecified, m_currentColor);
     m_dropDown.ColorPicked    += new EventHandler(dropDown_ColorPicked);
     m_dropDown.Closed         += new ToolStripDropDownClosedEventHandler(dropDown_Closed);
     m_dropDown.PreviewKeyDown += new PreviewKeyDownEventHandler(m_dropDown_PreviewKeyDown);
     m_dropDown.Show(this, new Point(0, Height));
 }
示例#3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// This event occurs when the color picker drop down has chosen a color.
        /// </summary>
        /// ------------------------------------------------------------------------------------
        private void dropDown_ColorPicked(object sender, EventArgs e)
        {
            ColorPickerDropDown dropDown = sender as ColorPickerDropDown;

            Debug.Assert(dropDown != null);

            ColorValue = dropDown.CurrentColor;
            Focus();
            Refresh();
        }
示例#4
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        ///
        /// </summary>
        /// <param name="disposing"></param>
        /// ------------------------------------------------------------------------------------
        protected override void Dispose(bool disposing)
        {
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
            }
            m_colorName = null;
            m_dropDown  = null;

            base.Dispose(disposing);
        }
示例#5
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        ///
        /// </summary>
        /// <param name="disposing"></param>
        /// ------------------------------------------------------------------------------------
        protected override void Dispose(bool disposing)
        {
            System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
            if (IsDisposed)
            {
                return;
            }

            if (disposing)
            {
            }
            m_colorName = null;
            m_dropDown  = null;

            base.Dispose(disposing);
        }
示例#6
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Shows the drop down.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		private void ShowDropDown()
		{
			m_dropDown = new ColorPickerDropDown(m_fShowUnspecified, m_currentColor);
			m_dropDown.ColorPicked += new EventHandler(dropDown_ColorPicked);
			m_dropDown.Closed += new ToolStripDropDownClosedEventHandler(dropDown_Closed);
			m_dropDown.PreviewKeyDown += new PreviewKeyDownEventHandler(m_dropDown_PreviewKeyDown);
			m_dropDown.Show(this, new Point(0, Height));
		}
示例#7
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Handles the Closed event of the m_dropDown control.
		/// </summary>
		/// <param name="sender">The source of the event.</param>
		/// <param name="e">The <see cref="T:System.Windows.Forms.ToolStripDropDownClosedEventArgs"/>
		/// instance containing the event data.</param>
		/// ------------------------------------------------------------------------------------
		private void dropDown_Closed(object sender, ToolStripDropDownClosedEventArgs e)
		{
			// we have to set a variable so that we know that user clicked on drop down button
			// or in text box to close the drop down.
			m_fDropDownClickedClose = ClientRectangle.Contains(PointToClient(MousePosition));
			m_dropDown = null;
		}
示例#8
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// <param name="disposing"></param>
		/// ------------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			System.Diagnostics.Debug.WriteLineIf(!disposing, "****** Missing Dispose() call for " + GetType().Name + ". ****** ");
			if (IsDisposed)
				return;

			if (disposing)
			{
			}
			m_colorName = null;
			m_dropDown = null;

			base.Dispose(disposing);
		}
示例#9
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		///
		/// </summary>
		/// <param name="disposing"></param>
		/// ------------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			if (IsDisposed)
				return;

			if (disposing)
			{
			}
			m_colorName = null;
			m_dropDown = null;

			base.Dispose(disposing);
		}