當前位置: 首頁>>代碼示例>>C#>>正文


C# ToolTip.Dispose方法代碼示例

本文整理匯總了C#中System.Windows.Forms.ToolTip.Dispose方法的典型用法代碼示例。如果您正苦於以下問題:C# ToolTip.Dispose方法的具體用法?C# ToolTip.Dispose怎麽用?C# ToolTip.Dispose使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在System.Windows.Forms.ToolTip的用法示例。


在下文中一共展示了ToolTip.Dispose方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: SplitContainerTools

        /// <summary>Initializes a new instance of the <see cref="SplitContainerTools"/> class.</summary>
        /// <param name="container">
        /// The <see cref="System.Windows.Forms.SplitContainer"/> to which this instance will be bound.
        /// </param>
        public SplitContainerTools(SplitContainer container)
        {
            split = container;
            _keepFocus = false;
            _showGripper = true;
            _showButtons = SplitContainerButtons.None;
            _panel1Border = false;
            _panel2Border = false;
            _buttons = new SplitContainerButton[] { };
            _tooltip = new ToolTip();

            _splitRectInternal = typeof(SplitContainer).GetField("splitterRect", Reflection.BindingFlags.NonPublic |
                                                                                 Reflection.BindingFlags.GetField |
                                                                                 Reflection.BindingFlags.Instance);

            split.Paint += split_Paint;
            split.MouseDown += split_MouseDown;
            split.MouseUp += split_MouseUp;
            split.MouseClick += split_MouseClick;
            split.MouseMove += split_MouseMove;
            split.MouseLeave += (o, e) => split.Cursor = Cursors.Default;
            split.SplitterMoved += split_SplitterMoved;
            split.SizeChanged += split_Resize;
            split.Disposed += (o, e) => _tooltip.Dispose();

            ((Panel)split.Panel1).ClientSizeChanged += Split_Panel_CollapsedChanged;
            ((Panel)split.Panel2).LocationChanged += Split_Panel_CollapsedChanged;
        }
開發者ID:franzalex,項目名稱:SimpleGui,代碼行數:32,代碼來源:SplitContainerTools.cs

示例2: createTooltip

        public void createTooltip(ToolTip toolTip)
        {
            if (toolTip != null)
            {
                toolTip.Dispose();
            }
            toolTip = new ToolTip();
            toolTip.AutoPopDelay = 3000;
            toolTip.InitialDelay = 1;
            toolTip.ReshowDelay = 500;
            // Force the ToolTip text to be displayed whether or not the form is active.
            toolTip.ShowAlways = true;

            toolTip.SetToolTip(this.groupBox2, "你選擇的是" + this.requestType_cb.Text + "方式");
        }
開發者ID:zhang1987wing,項目名稱:FiddlerResponse,代碼行數:15,代碼來源:UserTabpage.cs

示例3: SystrayRemove

		internal override void SystrayRemove(IntPtr handle, ref ToolTip tt)
		{

			SetVisible (handle, false, false);

			// The caller can now re-dock it later...
			if (tt != null) {
				tt.Dispose();
				tt = null;
			}
			// Close any balloon window *we* fired.
			ThemeEngine.Current.HideBalloonWindow (handle);
		}
開發者ID:nlhepler,項目名稱:mono,代碼行數:13,代碼來源:XplatUIX11.cs

示例4: SystrayRemove

		public void SystrayRemove(IntPtr handle, ref ToolTip tt)
		{
#if GTKSOCKET_SUPPORTS_REPARENTING
			X11Hwnd hwnd;

			hwnd = (X11Hwnd)Hwnd.ObjectFromHandle(handle);

			/* in the XEMBED spec, it mentions 3 ways for a client window to break the protocol with the embedder.
			 * 1. The embedder can unmap the window and reparent to the root window (we should probably handle this...)
			 * 2. The client can reparent its window out of the embedder window.
			 * 3. The client can destroy its window.
			 *
			 * this call to SetParent is case 2, but in
			 * the spec it also mentions that gtk doesn't
			 * support this at present.  Looking at HEAD
			 * gtksocket-x11.c jives with this statement.
			 *
			 * so we can't reparent.  we have to destroy.
			 */
			SetParent(hwnd.WholeWindow, FosterParent);
#else
			Control	control = Control.FromHandle(handle);
			if (control is NotifyIcon.NotifyIconWindow)
				((NotifyIcon.NotifyIconWindow)control).InternalRecreateHandle ();
#endif

			// The caller can now re-dock it later...
			if (tt != null) {
				tt.Dispose();
				tt = null;
			}
		}
開發者ID:BrzVlad,項目名稱:mono,代碼行數:32,代碼來源:X11Display.cs

示例5: SystrayRemove

		internal override void SystrayRemove (IntPtr handle, ref ToolTip tt)
		{
			Hwnd	hwnd;
			
			hwnd = Hwnd.ObjectFromHandle (handle);
			
			XUnmapWindow (DisplayHandle, hwnd.whole_window);
			SetParent (hwnd.whole_window, FosterParent);
			
			// The caller can now re-dock it later...
			if (tt != null) {
				tt.Dispose ();
				tt = null;
			}
		}
開發者ID:BrzVlad,項目名稱:mono,代碼行數:15,代碼來源:XplatUIX11GTK.cs

示例6: SystrayRemove

		internal override void SystrayRemove(IntPtr handle, ref ToolTip tt) {

			SetVisible (handle, false, false);

			// The caller can now re-dock it later...
			if (tt != null) {
				tt.Dispose();
				tt = null;
			}
		}
開發者ID:calumjiao,項目名稱:Mono-Class-Libraries,代碼行數:10,代碼來源:XplatUIX11.cs


注:本文中的System.Windows.Forms.ToolTip.Dispose方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。