示例#1
0
		protected virtual void OnItemMouseHover (ListViewItemMouseHoverEventArgs e)
		{
			ListViewItemMouseHoverEventHandler eh = (ListViewItemMouseHoverEventHandler)(Events [ItemMouseHoverEvent]);
			if (eh != null)
				eh (this, e);
		}
 private void HistoryListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (this.UseCustomToolTips)
     {
         System.Drawing.Point position = this.PointToClient(Cursor.Position);
         position.Offset(0, Cursor.Current.Size.Height - 10);
         IntPtr handle = (IntPtr)typeof(ToolTip).GetProperty("Handle", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(this.tooltip, null);
         this.tooltip.Show(e.Item.ToolTipText, this, position, this.tooltip.AutoPopDelay);
         Growl.DisplayStyle.Win32.SetWindowPos(handle, Growl.DisplayStyle.Win32.HWND_TOPMOST, 0, 0, 0, 0, Growl.DisplayStyle.Win32.SWP_NOACTIVATE | Growl.DisplayStyle.Win32.SWP_NOMOVE | Growl.DisplayStyle.Win32.SWP_NOSIZE);
     }
 }
 private void listviewPrintFormatters_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     toolTip.SetToolTip(listviewPrintFormatters, e.Item.ToolTipText);
 }
示例#4
0
        void _listView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            if (e != null && e.Item != null && e.Item.Tag is IIssue
                && !string.IsNullOrEmpty(e.Item.ToolTipText))	// don't show big blank square when tip is empty
            {
                if (!_tipitem.Visible)
                {
                    _tipitem.DisplayWidth = _listView.Width / 2;
                    _tipitem.Tag = e.Item;
                    _tipitem.Text = e.Item.ToolTipText;
                    _tipitem.Visible = true;

                }
            }
        }
示例#5
0
 /// <summary> 
 /// Applies tooltip on item hover. 
 /// </summary> 
 /// <param name="sender"></param> 
 /// <param name="e"></param> 
 private void ListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (!string.IsNullOrEmpty(e.Item.ToolTipText))
     {
         _toolTip.SetToolTip(InnerControl, e.Item.ToolTipText);
     }
     else
     {
         _toolTip.SetToolTip(InnerControl, e.Item.Text);
     }
 }
        /// <summary>
        /// Extends BeginInvoke so that when a state object is not needed, null does not need to be passed.
        /// <example>
        /// listviewitemmousehovereventhandler.BeginInvoke(sender, e, callback);
        /// </example>
        /// </summary>
        public static IAsyncResult BeginInvoke(this ListViewItemMouseHoverEventHandler listviewitemmousehovereventhandler, Object sender, ListViewItemMouseHoverEventArgs e, AsyncCallback callback)
        {
            if(listviewitemmousehovereventhandler == null) throw new ArgumentNullException("listviewitemmousehovereventhandler");

            return listviewitemmousehovereventhandler.BeginInvoke(sender, e, callback, null);
        }
示例#7
0
        private void ListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e) {
            try {
                string title = e.Item.Text;
                string toolTip = string.Empty;

                switch (e.Item.ImageKey) {
                    case Palette.ANNOTATION_FEATURE_CLASS:
                        toolTip = Resources.TEXT_ANNOTATION_DESCRIPTION;
                        break;
                    case Palette.CODED_VALUE_DOMAIN:
                        toolTip = Resources.TEXT_CODED_VALUE_DESCRIPTION;
                        break;
                    case Palette.DIMENSION_FEATURE_CLASS:
                        toolTip = Resources.TEXT_DIMENSION_DESCRIPTION;
                        break;
                    case Palette.FEATURE_DATASET:
                        toolTip = Resources.TEXT_FEATURE_DATASET_DESCRIPTION;
                        break;
                    case Palette.GEOMETRIC_NETWORK:
                        toolTip = Resources.TEXT_GEOMETRIC_NETWORK_DESCRIPTION;
                        break;
                    case Palette.MULTIPATCH_FEATURE_CLASS:
                        toolTip = Resources.TEXT_MULTIPATCH_DESCRIPTION;
                        break;
                    case Palette.NETWORK_DATASET:
                        toolTip = Resources.TEXT_NETWORK_DESCRIPTION;
                        break;
                    case Palette.POINT_FEATURE_CLASS:
                        toolTip = Resources.TEXT_POINT_DESCRIPTION;
                        break;
                    case Palette.POLYGON_FEATURE_CLASS:
                        toolTip = Resources.TEXT_POLYGON_DESCRIPTION;
                        break;
                    case Palette.POLYLINE_FEATURE_CLASS:
                        toolTip = Resources.TEXT_POLYLINE_DESCRIPTION;
                        break;
                    case Palette.RANGE_DOMAIN:
                        toolTip = Resources.TEXT_RANGE_DESCRIPTION;
                        break;
                    case Palette.RASTER_BAND:
                        toolTip = Resources.TEXT_RASTER_BAND_DESCRIPTION;
                        break;
                    case Palette.RASTER_CATALOG:
                        toolTip = Resources.TEXT_RASTER_CATALOG_DESCRIPTION;
                        break;
                    case Palette.RASTER_DATASET:
                        toolTip = Resources.TEXT_RASTER_DATASET_DESCRIPTION;
                        break;
                    case Palette.RELATIONSHIP_CLASS:
                        toolTip = Resources.TEXT_RELATIONSHIP_DESCRIPTION;
                        break;
                    case Palette.SUBTYPE:
                        toolTip = Resources.TEXT_SUBTYPE_DESCRIPTION;
                        break;
                    case Palette.TABLE:
                        toolTip = Resources.TEXT_TABLE_DESCRIPTION;
                        break;
                    case Palette.TERRAIN:
                        toolTip = Resources.TEXT_TERRAIN_DESCRIPTION;
                        break;
                    case Palette.TOPOLOGY:
                        toolTip = Resources.TEXT_TOPOLOGY_DESCRIPTION;
                        break;
                    default:
                        break;
                }

                string toolTip2 = string.Empty;
                bool needNewLine = false;
                for (int i = 0; i < toolTip.Length; i++) {
                    string x = toolTip.Substring(i, 1);
                    if (needNewLine) {
                        if (x == " ") {
                            toolTip2 += Environment.NewLine;
                            needNewLine = false;
                            continue;
                        }
                    }
                    else {
                        if ((i != 0) && (i % 80 == 0)) {
                            needNewLine = true;
                        }
                    }
                    toolTip2 += x;
                }

                // Update Tooltip
                if (this.toolTip1.GetToolTip(this.listViewPalette) != toolTip2) {
                    this.toolTip1.SetToolTip(this.listViewPalette, toolTip2);
                }
                if (this.toolTip1.ToolTipTitle != title) {
                    this.toolTip1.ToolTipTitle = title;
                }
            }
            catch (Exception ex) {
                ExceptionDialog.HandleException(ex);
            }
        }
示例#8
0
        /// <summary>
        /// When the user hovers an item, we update the tooltip.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void lvSkills_ItemHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            if (e.Item == null)
                return;

            // Is it an entry ?
            if (e.Item.Tag is PlanEntry)
            {
                Skill skill = GetPlanEntry(e.Item).CharacterSkill;
                StringBuilder builder = new StringBuilder(skill.Description.WordWrap(100, false));

                if (!skill.IsKnown)
                {
                    builder.AppendLine();
                    builder.Append("You do not know this skill - you ");
                    if (!skill.IsOwned)
                        builder.Append("do not ");
                    builder.Append("own the skillbook.");
                }
                e.Item.ToolTipText = builder.ToString();
            }
                // Then it is a remapping point
            else if (e.Item.Tag is RemappingPoint)
            {
                RemappingPoint point = e.Item.Tag as RemappingPoint;
                e.Item.ToolTipText = m_areRemappingPointsActive ? point.ToLongString() : "Remapping (ignored)";
            }
        }
示例#9
0
        void FeedListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            // update tooltip text
            Feed feed = e.Item.Tag as Feed;
            if (feed != null)
            {
                e.Item.ToolTipText = String.Format("Updates every {0} minutes", feed.PollInterval);
            }

            /*
            Feed feed = e.Item.Tag as Feed;
            if (feed != null)
            {
                string text = String.Format("Updates every {0} minutes", feed.PollInterval);

                //System.Drawing.Point position = Cursor.Position;
                System.Drawing.Point position = this.PointToClient(Cursor.Position);
                position.Offset(0, Cursor.Current.Size.Height - 10);
                IntPtr handle = (IntPtr)typeof(ToolTip).GetProperty("Handle", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(this.tooltip, null);
                this.tooltip.Show(text, this, position, this.tooltip.AutoPopDelay);
                User32DLL.SetWindowPos(handle, User32DLL.HWND_TOPMOST, 0, 0, 0, 0, User32DLL.SWP_NOACTIVATE | User32DLL.SWP_NOMOVE | User32DLL.SWP_NOSIZE);
            }
             * */
        }
示例#10
0
        private void browserList_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e) {
            var item = e.Item;
            // NetService service = item.Tag;

            Trace.WriteLine("DEBUG: Hovering over " + item);
        }
        private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            if (listView1.SelectedIndices.Count > 0)
            {
                listView1.FullRowSelect = true;
                try
                {
                    VoRow row = table.Rows[e.Item.Index];

                    // double ra = Convert.ToDouble(row[GetRAColumn().Name]) / 15;
                    // double dec = Convert.ToDouble(row[GetDecColumn().Name]);
                    double ra = Coordinates.ParseRA(row[raSource.SelectedIndex - 1].ToString(), true);
                    double dec = Coordinates.ParseDec(row[decSource.SelectedIndex - 1].ToString());
                    string id;

                    VoColumn col = table.GetColumnByUcd("meta.id");
                    if (col != null)
                    {
                        id = row[col.Name].ToString();
                    }
                    else
                    {
                        id = row[0].ToString();
                    }

                    TourPlace pl = new TourPlace(id, dec, ra, Classification.Star, Constellations.Containment.FindConstellationForPoint(ra, dec), ImageSetType.Sky, -1);
                    Earth3d.MainWindow.SetLabelText(pl, true);
                }
                catch
                {
                }

            }
        }
示例#12
0
 private void DialogLisForm_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     e.Item.Selected = true;
 }
        private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            Rectangle er = listView1.GetItemRect(listView1.Items.IndexOf(e.Item));
            int x = er.X + er.Width / 2;
            int y = er.Y + er.Height / 2;
            Point pt = new Point();
            if (x + EmpPL.Width <= listView1.Width)
            {
                pt.X = x;
            }
            else
            {
                pt.X = x - EmpPL.Width;
            }
            if (y + EmpPL.Height <= listView1.Height)
            {
                pt.Y = y;
            }
            else
            {
                pt.Y = y - EmpPL.Height;
            }
            //pt = listView1.PointToScreen(pt);


            //EmpPL.Size = new Size(80, 80);
            EmpPL.Location = pt;
            DataTable paneldt = new DataTable();
            paneldt = abll.Get_Mine_Panel(e.Item.Name);
            if (paneldt.Rows[0]["pic"].ToString().Trim() != "")
            {
                try
                {
                    pictureBox1.Hide();
                    System.IO.MemoryStream memoryStream = new System.IO.MemoryStream((byte[])paneldt.Rows[0]["pic"]);
                    Bitmap bmp = new Bitmap(memoryStream);
                    EmpPicture.Image = bmp;
                    EmpPicture.Show();
                }
                catch
                {
                    pictureBox1.Show();
                    EmpPicture.Hide();
                }
            }
            else
            {
                pictureBox1.Show();
                EmpPicture.Hide();
            }

            EmpLbl.Text = "标识卡:" + paneldt.Rows[0]["标识卡"].ToString() + "\n\n姓名:" + paneldt.Rows[0]["姓名"].ToString() + "\n\n部门:" + paneldt.Rows[0]["部门"].ToString() + "\n\n职务:" + paneldt.Rows[0]["职务"].ToString() + "\n\n现在位置:\n" + paneldt.Rows[0]["地址"].ToString() + "\n\n进入位置的时间:\n" + paneldt.Rows[0]["时间"].ToString();
            EmpPL.BringToFront();
            EmpPL.Show();
        }
 private void lvEvents_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (e.Item != null)
     {
         EventLogRecord el = e.Item.Tag as EventLogRecord;
         if (el != null)
         {
             string s = el.Record.pszDescription;
             if (!string.IsNullOrEmpty(s))
             {
                 e.Item.ToolTipText = Wrap(s, 70);
             }
         }
     }
 }
示例#15
0
        private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            try
            {

                Point p = listView1.PointToClient(new Point(Cursor.Position.X, Cursor.Position.Y));
                hoveredIndex = listView1.GetItemAt(p.X, p.Y).Index;
                
               

                lastViewedIndex = hoveredIndex + totalLoadedInListView;

                if (MoviesManager.CurrentMovie == lastViewedIndex && MoviesManager.CurrentMovie != 0)                    
                    return;

                MoviesManager.CurrentMovie = lastViewedIndex;
                UpdateStats();

            }
            catch (Exception)
            {
              //  MessageBox.Show(ItemHover.ToString());
            }

        }
示例#16
0
        private void listViewTags_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            return;

            ListViewItem item = e.Item;
            FileTag tag = (FileTag)item.Tag;

            string tooltipText = "Tags:\n";

            foreach (FileTag tag1 in this.currentDatabase.GetPartialDatabase(tag).Tags)
            {
                if (tag1.Value != tag.Value)
                    tooltipText += tag1.Value + "\n";
            }

            item.ToolTipText = tooltipText;
        }
示例#17
0
文件: Form1.cs 项目: eyberg/jeni
 private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (e.Item.BackColor == Color.White) {
         e.Item.BackColor = Color.DarkBlue;
     } else {
         e.Item.BackColor = Color.White;
     }
 }
示例#18
0
文件: ListView.cs 项目: JianwenSun/cc
 /// <include file='doc\ListView.uex' path='docs/doc[@for="ListView.OnItemMouseHover"]/*' />
 /// <devdoc>
 ///     Fires the ItemMouseHover event.
 /// </devdoc>
 protected virtual void OnItemMouseHover(ListViewItemMouseHoverEventArgs e) {
     if (onItemMouseHover != null) onItemMouseHover(this, e);
 }
示例#19
0
 private void listView_sensitiveData_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if ((pointedItem != null) && (pointedItemInfo.SubItem != null) && (pointedItemInfo.SubItem.Tag != null))
         subItemToolTip.Show(pointedItemInfo.SubItem.Tag.ToString(), (IWin32Window)sender, pointedItemInfo.SubItem.Bounds.Location, 2000);
 }
        //鼠标移动到哪个Item上。//在一行内移动,或者在List空白处移动,不会激发这个消息。
        void OnItemMouseHover ( object sender , ListViewItemMouseHoverEventArgs e )
        {
            if ( SendMsg == null )
                return;

            SENDMSGDATA data = new SENDMSGDATA ();
            data.nFunNO = ( int ) SENDMSGDATA.FunNo.HoverCell;
            data.Item = e.Item;

            SendMsg ( data );
        }
		public void TestListViewItemMouseHoverEventArgs ()
		{
			ListViewItem item = new ListViewItem ("TestItem");

			ListViewItemMouseHoverEventArgs e = new ListViewItemMouseHoverEventArgs (item);

			Assert.AreEqual (item, e.Item, "A1");
		}
示例#22
0
 private void lstFunctions_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     //if (e.Item..Index == 5)
     //{
     //    toolTip1.Show(e.Item.Text, lstFunctions, Cursor.Position, 500);
     //}
 }
 void FileView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     br.BeginInvoke(toolTipDelegate, e.Item);
 }
示例#24
0
 private void listView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     toolTip.SetToolTip(listView, e.Item.ToolTipText);
 }
示例#25
0
 void lvLinkedTo_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     try
     {
         Point relativePosition = enterMainForm.PointToClient(MousePosition);
         Query query = db.CreateQuery(@"Select * " + enterMainForm.View.Project.GetViewById(int.Parse(e.Item.SubItems[4].Text)).FromViewSQL + " where t.GlobalRecordId = @GlobalRecordId");
         query.Parameters.Add(new QueryParameter("@GlobalRecordId", DbType.StringFixedLength, e.Item.SubItems[2].Text));
         DataTable data = db.Select(query);
         StringBuilder sb = new StringBuilder();
         int counter = 0;
         foreach (DataRow row in data.Rows)
         {
             foreach (DataColumn col in data.Columns)
             {
                 if (!col.ColumnName.ToLower().Contains("uniquekey") && !col.ColumnName.ToLower().Contains("recstatus") && !col.ColumnName.ToLower().Contains("globalrecordid"))
                 {
                     counter++;
                     sb.Append(col.ColumnName + " = " + row[col].ToString() + Environment.NewLine);
                     if (counter >= 5)
                         break;
                 }
             }
         }
         this.toolTip1.ToolTipTitle = "Record preview:";
         this.toolTip1.Show(sb.ToString().Substring(0, sb.Length - 2), enterMainForm, relativePosition.X + 5, relativePosition.Y - (15 + (counter * 13)));
     }
     catch (Exception ex)
     {
         //
     }
 }
示例#26
0
 private void ExceptionDetailsListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     toolTip.RemoveAll();
     toolTip.Show(e.Item.SubItems[1].Text, exceptionDetailsListView);
 }
示例#27
0
 private void listTemplates_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (e.Item.Tag != null)
     {
         if (typeof(string).IsInstanceOfType(e.Item.Tag) && (string)e.Item.Tag == "LocalSearch")
         {
             superTooltip1.SetSuperTooltip(listTemplates, new DevComponents.DotNetBar.SuperTooltipInfo { HeaderText = "Search", FooterText = "", BodyText = "Search for a template on your computer or network." });
             superTooltip1.CheckTooltipPosition = false;
             Point pos = e.Item.Position;
             pos.Offset(new Point(5, 20));
             superTooltip1.ShowTooltip(listTemplates, listTemplates.PointToScreen(pos));
         }
         else if (typeof(TemplateDefinition).IsInstanceOfType(e.Item.Tag))
         {
             TemplateDefinition template = (TemplateDefinition)e.Item.Tag;
             superTooltip1.SetSuperTooltip(listTemplates, new DevComponents.DotNetBar.SuperTooltipInfo { HeaderText = template.Name, FooterText = template.Path, BodyText = template.Description });
             superTooltip1.CheckTooltipPosition = false;
             Point pos = e.Item.Position;
             pos.Offset(new Point(5, 20));
             superTooltip1.ShowTooltip(listTemplates, listTemplates.PointToScreen(pos));
         }
     }
 }
 private void pghDataList_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     displayInfo.Text = e.Item.Tag.ToString();
 }
示例#29
0
        //ListViewItemMouseHoverEventArgs e)
        private void filev3_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            if (useprev.Checked == true)
            {
                //Point ppoint = this.PointToClient(Control.MousePosition);
                Gib.pname = e.Item.Text;

                Gib.ppath = Gib.fpos[Gib.nowtab, Gib.nowp[Gib.nowtab]] + '\\' + Gib.pname;
                Gib.plast = Path.GetExtension(Gib.ppath);
                //MessageBox.Show(Gib.pname + '\n' + Gib.ppath + '\n' + Gib.plast);
                if (Gib.plast == ".txt" || Gib.plast == ".TXT" || Gib.plast == ".lrc" || Gib.plast == ".LRC")
                {
                    if (Gib.ptext != Gib.pname)
                    {
                        Gib.ptext = Gib.pname;
                        Point ppoint = Control.MousePosition;
                        Gib.mx = ppoint.X + 2;
                        Gib.my = ppoint.Y + 2;
                        FrmPtxt fprev = new FrmPtxt();
                        fprev.Show(this);
                        fprev.Hide();
                    }
                    else
                    {
                        Gib.ptext = Gib.pname;
                    }
                }
                else if (Gib.plast == ".png" || Gib.plast == ".PNG" || Gib.plast == ".jpg" || Gib.plast == ".JPG" || Gib.plast == ".bmp" || Gib.plast == ".BMP" || Gib.plast == ".ico" || Gib.plast == ".ICO")
                {
                    if (Gib.ptext != Gib.pname)
                    {
                        Gib.ptext = Gib.pname;
                        Point ppoint = Control.MousePosition;
                        Gib.mx = ppoint.X + 2;
                        Gib.my = ppoint.Y + 2;
                        Bitmap image1 = new Bitmap(Gib.ppath);
                        FrmPpic.PictureWidth = image1.Width.ToString();
                        FrmPpic.Pictureheight = image1.Height.ToString();
                        FileInfo finfo = new FileInfo(Gib.ppath);
                        FrmPpic fprev = new FrmPpic();
                        fprev.Show(this);
                        fprev.Hide();
                    }
                    else
                    {
                        Gib.ptext = Gib.pname;
                    }
                    //Gib.ptext = Gib.pname;
                }
            }
        }
 void listViewEntities_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     // TODO: When the mouse hovers over an item it would be nice to show a preview of the resource in the engine view
       // (This needs some modifications on managed c++ code and is thus not included in this version of the entity panel)
 }
示例#31
0
 protected virtual void OnItemMouseHover(ListViewItemMouseHoverEventArgs e)
 {
     throw null;
 }