コード例 #1
0
        private void Films_MouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            string str = "";

            if (e.Node.ImageIndex == 1)
            {
                str = "Not watched";
            }
            else if (e.Node.ImageIndex == 2)
            {
                str = "Watched";
            }
            else
            {
                var control = (Control)sender;
                TurnOnToolTip.Hide(control);
                return;
            }

            var relativePoint = this.PointToClient(Cursor.Position);;
            int x             = this.Location.X + relativePoint.X + e.Node.Bounds.Width;
            int y             = this.Location.Y + relativePoint.Y + e.Node.Bounds.Height;

            if (!string.IsNullOrEmpty(str))
            {
                TurnOnToolTip.Show(str, Films, Films.PointToClient(new Point(x, y)));
            }
        }
コード例 #2
0
        private void tvwProvas_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            int somatorio = 0;
            var node      = sender as TreeNode; // O node que deu origem ao evento como TreeNode

            if (e.Node.Nodes.Count > 0)
            {
                //Mostrar tooltip bom o melhor           //Devolver o item do melhor node e apanhar a sua marca
                e.Node.ToolTipText = (ReturnItemFromNode(ReturnBest(e.Node))).SubItems[2].Text;
                toolTipScore.Show(e.Node.ToolTipText, tvwProvas);
            }
            else
            {  //Mostrar o somatório em todas as provas
                e.Node.ToolTipText = "Somatório Total: ";
                foreach (TreeNode Parent in tvwProvas.Nodes)
                {
                    foreach (TreeNode Child in Parent.Nodes)
                    {
                        if (Child.Text == e.Node.Text)
                        {
                            somatorio += Convert.ToInt32((ReturnItemFromNode(e.Node)).SubItems[4].Text);
                        }
                    }
                }

                e.Node.ToolTipText = "Somatório Total: " + somatorio.ToString();

                toolTipScore.Show(e.Node.ToolTipText, tvwProvas);
            }
        }
コード例 #3
0
ファイル: UcHL7.cs プロジェクト: ektesarping/Hl7Parser-v1.01
        private int MIN_LINE_LENGHT_TO_SHOW_TOOLTIP      = 5; //40;
        private void tvHL7_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            if (TooltipEnable == true)
            {
                try
                {
                    TreenodeHL7Base node = (TreenodeHL7Base)e.Node;
                    //activeTooltipnode = (TreenodeHL7Base)e.Node;

                    string strTmp = node._MsgNode.ErrorMsg;
                    if (!string.IsNullOrEmpty(strTmp))
                    {
                        strTmp += "\r\n"; // Legger til lnjeskift hvis noden har error status.
                    }

                    strTmp += HL7.InsertLinebreaks(node._MsgNode.Value, TOOLTIP_LINE_LENGTH_BEFORE_LINEBREAK);
                    if (strTmp.Length > MIN_LINE_LENGHT_TO_SHOW_TOOLTIP)
                    {
                        toolTipTreenode.RemoveAll();
                        toolTipTreenode.SetToolTip(tvHL7, strTmp); //  MsgNode.Value);
                    }
                    else
                    {
                        toolTipTreenode.RemoveAll();
                    }
                }
                catch (Exception ex)
                {
                    //MessageBox.Show("Exception (Ikke kritisk): " + ex.Message + "\r\n\n" + ex.StackTrace, "Internal warning", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                }
            }
        }
コード例 #4
0
 protected internal virtual void OnMouseHover(TreeNodeMouseHoverEventArgs e)
 {
     if (NodeMouseHover != null)
     {
         NodeMouseHover(this, e);
     }
 }
コード例 #5
0
 private void TreeNode_MouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node.Tag is FileInfo)
     {
         BinaryStateLoader.LoadAndDetect(Path.Combine(PathManager.GetSaveStatePath(Global.Game), string.Format("{0}.State", e.Node.FullPath))).GetLump(BinaryStateLump.Framebuffer, false, PopulatePictureBox);
     }
 }
コード例 #6
0
 private void TrvFilters_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node.Parent == null)
     {
         e.Node.Expand();
     }
 }
コード例 #7
0
 private void tvTables_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node.Level == 0)
     {
         e.Node.ToolTipText = datasource;
     }
 }
コード例 #8
0
        /// <summary>
        /// In fase di programmazione se si posiziona il mouse sopra un nodo si visualizza la giacenza al periodo 0 del nodo stesso.
        /// </summary>
        private void treeView_DistintaBase_NodeMouseHover_1(object sender, TreeNodeMouseHoverEventArgs e)
        {
            ToolTip.RemoveAll();
            if (TabellaGenerata)
            {
                return;
            }
            TreeNode   TreeNode = e.Node;
            Componente Comp     = new Componente();
            string     Giacenza = "";

            if (TreeNode.Parent == null)
            {
                if (DataGridView_Produzione.Rows[2].Cells[1].Value != null)
                {
                    Giacenza = DataGridView_Produzione.Rows[2].Cells[1].Value.ToString();
                }
                else
                {
                    Giacenza = "0";
                }
            }
            else
            {
                Comp     = DistintaBase.TreeNodeToNode(TreeNode, TreeNode.Parent);
                Giacenza = Comp.Produzione[0].Giacenza.ToString();
            }
            ToolTip = new ToolTip();
            ToolTip.SetToolTip(TreeView_DistintaBase, "La giacenza al periodo 0 è " + Giacenza);
        }
コード例 #9
0
ファイル: MainWindow.cs プロジェクト: xiaodelea/synthesis
 /// <summary>
 /// Allows the user to see what component each tree node references by selecting the component in Inventor.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void CollisionObjectsView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (!interactionEnabled)
     {
         Program.INVENTOR_APPLICATION.ActiveDocument.SelectSet.Clear();
         Program.INVENTOR_APPLICATION.ActiveDocument.SelectSet.Select((ComponentOccurrence)e.Node.Tag);
     }
 }
コード例 #10
0
ファイル: Form1.cs プロジェクト: yoni1857/TextEngine
 private void treeView1_NodeMouseClick(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (treeView1.SelectedNode == null)
     {
         return;
     }
     treeView1_AfterSelect(sender, null);
 }
コード例 #11
0
ファイル: Form1.cs プロジェクト: pstork/XmlConfigEditor
 void TreeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     ttTimer.Stop();
     tt.Hide(this);
     ttNode           = e.Node;
     ttTimer.Interval = ttStart;
     ttTimer.Start();
 }
コード例 #12
0
ファイル: NodeView.cs プロジェクト: Fraysa/MapleStory.Studio
        /// <summary>
        /// Forwards the <see cref="NodeMouseHover"/> event.
        /// </summary>
        /// <param name="e">The <see cref="TreeNodeMouseHoverEventArgs"/> that contains the event data.</param>
        protected sealed override void OnNodeMouseHover(TreeNodeMouseHoverEventArgs e)
        {
            NodeViewMouseHoverEventArgs newArgs = new NodeViewMouseHoverEventArgs((Node)e.Node);

            OnNodeMouseHover(newArgs);

            base.OnNodeMouseHover(e);
        }
コード例 #13
0
 protected override void OnNodeMouseHover(TreeNodeMouseHoverEventArgs e)
 {
     if (_dragging)
     {
         e.Node.Expand();
     }
     base.OnNodeMouseHover(e);
 }
コード例 #14
0
 private void tv_menu_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     foreach (TreeNode item in tv_menu.Nodes)
     {
         item.BackColor = Color.FromArgb(37, 37, 37);
     }
     e.Node.BackColor = Color.FromArgb(63, 64, 69);
 }
コード例 #15
0
        public void TestTreeNodeMouseHoverEventArgs()
        {
            TreeNode tn = new TreeNode("HI");

            TreeNodeMouseHoverEventArgs e = new TreeNodeMouseHoverEventArgs(tn);

            Assert.AreEqual(tn, e.Node, "A1");
        }
コード例 #16
0
ファイル: NodeTreeList.cs プロジェクト: zuojiashun/behaviac
        private void treeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            this.toolTipTimer.Stop();
            this.toolTip.Hide(this);

            this.toolTipNode = e.Node;
            this.toolTipTimer.Start();
        }
コード例 #17
0
ファイル: UIDocumentList.cs プロジェクト: DR2010/FCM2
 private void tvFileList_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     //Document document = (Document)e.Node.Tag;
     //string info = "Document \n" +
     //              document.CUID + "\n" +
     //              document.UID + "\n" +
     //              document.Name + "\n";
     //toolTip1.Show(info, tvFileList, 10, 10, 20000);
 }
コード例 #18
0
        protected override void OnNodeMouseHover(TreeNodeMouseHoverEventArgs e)
        {
            base.OnNodeMouseHover(e);
            AutonomousTreeNode node = e.Node as AutonomousTreeNode;

            if (node != null)
            {
                node.OnNodeMouseHover(e);
            }
        }
コード例 #19
0
ファイル: TreeViewX.cs プロジェクト: tralivali1234/dnExplorer
        protected override void OnNodeMouseHover(TreeNodeMouseHoverEventArgs e)
        {
            var node = e.Node as TreeNodeX;

            if (node != null)
            {
                node.OnMouseHover(e);
            }
            base.OnNodeMouseHover(e);
        }
コード例 #20
0
ファイル: SpecialTreeView.cs プロジェクト: VladimirKhil/CIRCe
 private void SpecailTreeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     /*var item = e.Node;
      * if (item != null && item != active)
      * {
      *  if (active != null)
      *      Invalidate(active.Bounds);
      *  active = item;
      *  Invalidate(active.Bounds);
      * }*/
 }
コード例 #21
0
 private void treeViewPDP_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     //if (e.Node.Parent == null || e.Node.Name == "total" || comboBoxProfiles.SelectedIndex == 0)
     //{
     //    System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.Default;
     //}
     //else
     //{
     //    System.Windows.Forms.Cursor.Current = System.Windows.Forms.Cursors.SizeAll;
     //}
 }
コード例 #22
0
        private void TreeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            var tag = (TreeTag)e.Node.Tag;

            if (tag.IsReference)
            {
                WinTooltip.SetToolTip(TreeView, "");
                Point mousePos = TreeView.PointToClient(MousePosition);
                mousePos.Offset(15, 0); // display slightly to the right of the mouse
                WinTooltip.Show($"Jumps to \"{tag.Node.TreeNode.Text}\"", TreeView, mousePos);
            }
        }
コード例 #23
0
 private void treeView1_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node != null &&
         e.Node.Tag != null)
     {
         tsLblOsmSourceUrl.Text = e.Node.Tag.ToString();
     }
     else
     {
         tsLblOsmSourceUrl.Text = "N/A";
     }
 }
コード例 #24
0
ファイル: MainForm.cs プロジェクト: Mortens4444/VirtualWork
 private void TvItems_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node?.Tag is AppointmentBase appointment)
     {
         var nextOccurenceDate = appointment.GetNextOccurenceAfterDate(DateTime.Now);
         toolTip.SetToolTip(e.Node.TreeView, $"{Lng.Elem("Next occasion")}: {nextOccurenceDate}");
     }
     else
     {
         toolTip.SetToolTip(e.Node.TreeView, String.Empty);
     }
 }
コード例 #25
0
        private void TvReport_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            // for (int i = 0; i < TvReport.Nodes.Count; i++)
            // {
            //     TvReport.Nodes[i].ImageIndex = 15;
            //     if (TvReport.Nodes[i].GetType() == typeof(OpReportMaster) )
            //     {
            //         SearchSubNode(TvReport.Nodes[i]);
            //     }
            // }

            //TvReport.SelectedNode = e.Node;
        }
コード例 #26
0
ファイル: ResourceDock.cs プロジェクト: tickbh/TickUIEditor
        private void TreeView1_NodeMouseHover(Object sender, TreeNodeMouseHoverEventArgs e)
        {
            String tag = e.Node.Tag as String;

            if (tag == null)
            {
                return;
            }
            if (ImageHelper.isImageFile(tag))
            {
                EventManager.RaiserEvent(Constant.PreViewImageChange, this, tag);
            }
        }
コード例 #27
0
ファイル: fMain.cs プロジェクト: infra-hdc/LIBFL
        private void trDgtPeriodic_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            //tt.IsBalloon = true;
            //int i = tt.AutomaticDelay;

            //tt.AutoPopDelay = 50000;
            //tt.ShowAlways = true;

            if (!string.IsNullOrEmpty(e.Node.ToolTipText))
            {
                tt.Show(e.Node.ToolTipText, trDgtPeriodic, 30000);
            }
        }
コード例 #28
0
 void treeView1_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node != null)
     {
         TreeNode tn = e.Node;
         if (!IsFolder(tn))
         {
             if (File.Exists(tn.Text))
             {
                 tn.ToolTipText = "Last modified time:" + File.GetLastWriteTime(tn.Text).ToString() + "(" + tn.Text + ")";
             }
         }
     }
 }
コード例 #29
0
ファイル: FilesTreeView.cs プロジェクト: ACE-liu/Pro-Spi
        /// <summary>
        /// 处理鼠标停顿时,节点展开
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void treeView1_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            TreeNode tn = e.Node;

            if (null != ftCallBack)
            {
                if (ftCallBack.isHoverColored())
                {
                    setStopNodeInfo(tn);

                    ftCallBack.mouseHoverCallBack();
                }
            }
        }
コード例 #30
0
ファイル: Form1.cs プロジェクト: 48bartek/Image-Browser
 private void TV_OnMouseHover(Object sender, TreeNodeMouseHoverEventArgs e)
 {
     try
     {
         foreach (Control c in e.Node.TreeView.Parent.Controls)
         {
             if (c.GetType().Equals(typeof(PictureBox)))
             {
                 (c as PictureBox).Image = Image.FromFile("C:\\" + e.Node.FullPath);
             }
         }
     }
     catch { }
 }