public HintWindow(Hint hint, HintRoot root) { InitializeComponent(); this._hint = hint; _hintRoot = root; // window props Left = 0; Top = 0; MaxHeight = 1200; SizeToContent = SizeToContent.WidthAndHeight; Opacity = 1; _timer.Tick += OnTimerTick; LayoutUpdated += OnLayoutUpdated; MouseLeave += OnMouseLeave; _hintRoot.MouseLeave += RestartCloseTimer; MouseRightButtonUp += MouseButtonEventHandler; HintControl.AddClickHandler(this, OnClick); HintControl.AddMouseHoverHandler(this, OnMouseHover); }
static void hint_Click(Hint ht, string handler) { Console.WriteLine("Hint clicked, handler name: " + handler); }
public NemerleLanguageService(NemerlePackage package) { Debug.Assert(package != null, "package != null"); Package = package; if (System.Threading.Thread.CurrentThread.Name == null) System.Threading.Thread.CurrentThread.Name = "UI Thread"; CompiledUnitAstBrowser.ShowLocation += GotoLocation; AstToolControl.ShowLocation += GotoLocation; if (DefaultEngine == null) { try { DefaultEngine = EngineFactory.Create(EngineCallbackStub.Default, new TraceWriter(), true); } catch (Exception ex) { Debug.WriteLine(ex.Message); } } Hint = new Hint(); Hint.WrapWidth = 900.1; }