当前位置: 首页>>代码示例>>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;未经允许,请勿转载。