コード例 #1
0
ファイル: HintWindow.xaml.cs プロジェクト: vestild/nemerle
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: vestild/nemerle
 static void hint_Click(Hint ht, string handler)
 {
     Console.WriteLine("Hint clicked, handler name: " + handler);
 }
コード例 #4
0
        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;
        }