Example #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)));
            }
        }
Example #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);
            }
        }
Example #3
0
        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);
                }
            }
        }
Example #4
0
 protected internal virtual void OnMouseHover(TreeNodeMouseHoverEventArgs e)
 {
     if (NodeMouseHover != null)
     {
         NodeMouseHover(this, e);
     }
 }
Example #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);
     }
 }
Example #6
0
 private void TrvFilters_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node.Parent == null)
     {
         e.Node.Expand();
     }
 }
Example #7
0
 private void tvTables_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (e.Node.Level == 0)
     {
         e.Node.ToolTipText = datasource;
     }
 }
Example #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);
        }
Example #9
0
 /// <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);
     }
 }
Example #10
0
 private void treeView1_NodeMouseClick(object sender, TreeNodeMouseHoverEventArgs e)
 {
     if (treeView1.SelectedNode == null)
     {
         return;
     }
     treeView1_AfterSelect(sender, null);
 }
Example #11
0
 void TreeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
 {
     ttTimer.Stop();
     tt.Hide(this);
     ttNode           = e.Node;
     ttTimer.Interval = ttStart;
     ttTimer.Start();
 }
Example #12
0
        /// <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);
        }
 protected override void OnNodeMouseHover(TreeNodeMouseHoverEventArgs e)
 {
     if (_dragging)
     {
         e.Node.Expand();
     }
     base.OnNodeMouseHover(e);
 }
Example #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);
 }
Example #15
0
        public void TestTreeNodeMouseHoverEventArgs()
        {
            TreeNode tn = new TreeNode("HI");

            TreeNodeMouseHoverEventArgs e = new TreeNodeMouseHoverEventArgs(tn);

            Assert.AreEqual(tn, e.Node, "A1");
        }
Example #16
0
        private void treeView_NodeMouseHover(object sender, TreeNodeMouseHoverEventArgs e)
        {
            this.toolTipTimer.Stop();
            this.toolTip.Hide(this);

            this.toolTipNode = e.Node;
            this.toolTipTimer.Start();
        }
Example #17
0
 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);
 }
        protected override void OnNodeMouseHover(TreeNodeMouseHoverEventArgs e)
        {
            base.OnNodeMouseHover(e);
            AutonomousTreeNode node = e.Node as AutonomousTreeNode;

            if (node != null)
            {
                node.OnNodeMouseHover(e);
            }
        }
Example #19
0
        protected override void OnNodeMouseHover(TreeNodeMouseHoverEventArgs e)
        {
            var node = e.Node as TreeNodeX;

            if (node != null)
            {
                node.OnMouseHover(e);
            }
            base.OnNodeMouseHover(e);
        }
Example #20
0
 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);
      * }*/
 }
 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;
     //}
 }
        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);
            }
        }
Example #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";
     }
 }
Example #24
0
 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);
     }
 }
Example #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;
        }
Example #26
0
        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);
            }
        }
Example #27
0
        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);
            }
        }
 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 + ")";
             }
         }
     }
 }
Example #29
0
        /// <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();
                }
            }
        }
Example #30
0
 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 { }
 }