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);
             * }
             * */
        }
Example #2
0
        private void MilkyLogListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            var item = e.Item.Tag as MilkyLogListItem;

            this.allItems.ForEach(i => i.Hover = false);
            item.Hover = true;
        }
Example #3
0
 private void lst_packs_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (lst_all.SelectedItems.Count == 1)
     {
         lst_all.Items[lst_all.SelectedItems[0].Index].Selected = false;
     }
 }
Example #4
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));
         }
     }
 }
Example #5
0
        private void WordList_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            NewWordItem wordItem = (NewWordItem)e.Item.Tag;
            string      tooltip  = wordItem.Name + "\r\n" + wordItem.Annoucement + "\r\n\r\n" + wordItem.Meaning;

            e.Item.ToolTipText = tooltip;
        }
Example #6
0
        private void listView_LogMain_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            ToolTip toolTip   = new ToolTip();
            string  itemInfor = e.Item.SubItems[3].Text;

            toolTip.SetToolTip((e.Item).ListView, itemInfor);
        }
        private void listViewChild_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            string path = e.Item.ImageKey;

            formPreview.PathImage = path;
            formPreview.Show();
        }
Example #8
0
        private void messagesListView_ItemActivate(object sender, ListViewItemMouseHoverEventArgs e)
        {
            Console.WriteLine("Item Active");
            Console.WriteLine(e.Item.Text);

            Speak(e.Item.Text);
        }
Example #9
0
        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
                {
                }
            }
        }
Example #10
0
        /// <summary>
        /// 实现鼠标悬停在ListView上显示相关信息
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            ToolTip toolTip = new ToolTip();

            string itemInfor =
                "课程名称:" + e.Item.Text + "\n" +
                "上课教室:" + e.Item.SubItems[1].Text + "\n" +
                "任课老师:" + e.Item.SubItems[2].Text + "\n" +
                "其他安排:" + "\n";

            List <EventDetails> eventDetails = db.GetEventDetails(e.Item.Text);

            eventDetails = eventDetails.OrderBy(ed => Calculated.Calculate(ed.createTime.Year, ed.createTime.Month, ed.createTime.Day)).ToList();
            foreach (var a in eventDetails)
            {
                string   rstStr = "距离:";
                DateTime dt     = a.createTime;
                int      year   = dt.Year;
                int      month  = dt.Month;
                int      day    = dt.Day;
                int      count  = Calculated.Calculate(year, month, day);
                rstStr += a.eventName;
                if (count >= 0)
                {
                    rstStr += "还有" + Convert.ToString(count) + "天\n";
                }
                else
                {
                    rstStr = a.eventName + "时间已过\n";
                }
                itemInfor += rstStr;
            }
            toolTip.SetToolTip((e.Item).ListView, itemInfor);
        }
Example #11
0
 private void lstFunctions_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     //if (e.Item..Index == 5)
     //{
     //    toolTip1.Show(e.Item.Text, lstFunctions, Cursor.Position, 500);
     //}
 }
Example #12
0
        private void lstShips_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            var d = (IDesign)e.Item.Tag;

            txtName.Text      = d.Name;
            resCostMin.Amount = d.Cost[Resource.Minerals];
            resCostOrg.Amount = d.Cost[Resource.Organics];
            resCostRad.Amount = d.Cost[Resource.Radioactives];

            int present, queued;
            IEnumerable <IConstructor> sobjs;
            var emp = ConstructionQueue.Container.Owner;

            sobjs   = new IConstructor[] { ConstructionQueue.Container };
            present = CountPresentVehicles(sobjs, d.BaseName);
            queued  = CountQueuedVehicles(sobjs, d.BaseName);
            lblPresentLocal.Text = MakePresentQueuedString(present, queued);

            sobjs   = ConstructionQueue.Container.Sector.SpaceObjects.OfType <IConstructor>().OwnedBy(emp);;
            present = CountPresentVehicles(sobjs, d.BaseName);
            queued  = CountQueuedVehicles(sobjs, d.BaseName);
            lblPresentSector.Text = MakePresentQueuedString(present, queued);

            sobjs   = ConstructionQueue.Container.StarSystem.SpaceObjects.OfType <IConstructor>().OwnedBy(emp);
            present = CountPresentVehicles(sobjs, d.BaseName);
            queued  = CountQueuedVehicles(sobjs, d.BaseName);
            lblPresentSystem.Text = MakePresentQueuedString(present, queued);

            sobjs   = ConstructionQueue.Owner.OwnedSpaceObjects.OfType <IConstructor>();
            present = CountPresentVehicles(sobjs, d.BaseName);
            queued  = CountQueuedVehicles(sobjs, d.BaseName);
            lblPresentEmpire.Text = MakePresentQueuedString(present, queued);
        }
Example #13
0
        private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            CustomLegendItemEventArgs _customLegendItemEventArgs = new CustomLegendItemEventArgs((Series)e.Item.Tag);

            this.OnLegendItemToolTipShowing(ref _customLegendItemEventArgs);

            if ((this.listView1.Columns[0].Width
                 + this.listView1.Columns[1].Width
                 + this.GetTextWidth(e.Item)
                 + 20 //NOTE: ne vem točno zakaj tu, ma je točno
                 > this.listView1.Width) ||
                (!_customLegendItemEventArgs.ShowOnlyWhenTextDoesNotFitScreen))
            {
                if (string.IsNullOrEmpty(_customLegendItemEventArgs.AlternativeText))
                {
                    this.toolTip1.Show(
                        e.Item.SubItems[2].Text,
                        this,
                        this.PointToClient(System.Windows.Forms.Cursor.Position));
                }
                else
                {
                    this.toolTip1.ToolTipTitle = e.Item.SubItems[2].Text;

                    //NOTE: če je alternative text null, potem se ne prikaže nič (to se lahko uporabi)!
                    this.toolTip1.Show(
                        _customLegendItemEventArgs.AlternativeText,
                        this,
                        this.PointToClient(System.Windows.Forms.Cursor.Position));
                }
            }
        }
        private void lvData_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            Delay(300);
            conn.Open();
            cmd = new MySqlCommand("", conn);
            MySqlDataReader reader;
            Bitmap          images;
            string          size = "";
            int             rsize;

            int indxnum = lvData.FocusedItem.Index;
            int f_id    = int.Parse(lvData.Items[indxnum].SubItems[0].Text.ToString());

            string sql = "SELECT fileData,fileSize FROM blob_table WHERE f_id = " + f_id + ";";

            cmd.CommandText = sql;
            reader          = cmd.ExecuteReader();
            byte[] bImage = null;

            while (reader.Read())
            {
                bImage = (byte[])reader[0];
                size   = reader["fileSize"].ToString();
            }
            if (bImage != null)
            {
                Delay(1000);
                rsize             = (int)Math.Sqrt(int.Parse(size)); //입력 영상 메모리 할당
                pictureBox1.Size  = new System.Drawing.Size(rsize, rsize);
                pictureBox1.Image = new Bitmap(new MemoryStream(bImage));
            }
            reader.Close();
            conn.Close();
        }
 void lvLinkedFrom_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[3].Text)).FromViewSQL + " where t.GlobalRecordId = @GlobalRecordId");
         query.Parameters.Add(new QueryParameter("@GlobalRecordId", DbType.StringFixedLength, e.Item.SubItems[1].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.ToLowerInvariant().Contains("uniquekey") && !col.ColumnName.ToLowerInvariant().Contains("recstatus") && !col.ColumnName.ToLowerInvariant().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 { }
 }
Example #16
0
 private void mMetadataListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (mMetadataTooltipDictionary.ContainsKey(e.Item.Text))
     {
         e.Item.ToolTipText = Localizer.Message(mMetadataTooltipDictionary[e.Item.Text]);
     }
 }
Example #17
0
 /// <summary>
 /// Funkcja wyświetlająca okienko, w któym można dokonać oceny filmu
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     // spradzenie czy jest już otwarte inne okno tej klasy, jeżeli tak to je zamyka
     if (nickLoggedIn != "0")
     {
         Form formRatingOpen = Application.OpenForms["Rating"];
         if (formRatingOpen != null)
         {
             formRatingOpen.Close();
         }
         // sprawdza lokalizację kursora
         if (Cursor.Position.X - this.Location.X < 280)
         {
             // tworzy listę
             ListViewItem itemo = GetItemFromPoint(listViewMovies, Cursor.Position);
             // dodaje od listy tytul filmu na ktory wskazuje kursor
             titleOfSelectedMovie = itemo.SubItems[0].Text;
             // dodaje do listy ocenę filmu,na który wskazuje kursor wystawioną przez zalogowanego użytkownika
             string rateOfSelectedMovie = itemo.SubItems[2].Text;
             // jeżeli
             if (rateOfSelectedMovie == "          -")
             {
                 rateOfSelectedMovie = "0";
             }
             int IDOfSelectedMovie = Convert.ToInt32(itemo.SubItems[3].Text);
             MessageBox.Show("ID mOVIE: " + IDOfSelectedMovie.ToString());
             FormRating windows3 = new FormRating(_UserID, IDOfSelectedMovie, titleOfSelectedMovie, Int32.Parse(rateOfSelectedMovie));
             windows3.Load += delegate
             {
                 windows3.Location = new Point(Cursor.Position.X, Cursor.Position.Y);
             };
             windows3.Show();
         }
     }
 }
        void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            var cursor = listView1.PointToClient(MousePosition);

            var dbgObject = (DbgObject)e.Item.Tag;

            string toolTipText = e.Item.ToolTipText;

            if (this.IsPinnable && dbgObject.IsPinable && GetItemPinClickableRange().Contains(cursor.X))
            {
                toolTipText = "Click to pin this expression.";
            }
            else if (GetItemVisualizerClickableRange().Contains(cursor.X))
            {
                if (dbgObject.IsRefreshable && !dbgObject.IsCurrent)
                {
                    toolTipText = "Click to refresh this value.";
                }
                else if (dbgObject.IsVisualizable)
                {
                    toolTipText = "Click to visualize this value.";
                }
            }
            toolTip.Show(toolTipText, this, cursor.X, cursor.Y - 30, 1000);
        }
Example #19
0
 private void hoveritem(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (e.Item.Text != string.Empty)
     {
         GetUName(e.Item.Text.ToCharArray()[0], charactername);
         charname.Text = "U+" + ((int)e.Item.Text.ToCharArray()[0]).ToString("X4") + ": " + charactername.Substring(0, charactername.IndexOf('*') - 1);
     }
 }
        private void breakpoints_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            //toolTip.InitialDelay = 2000;
            var cursor = this.PointToClient(MousePosition);

            cursor.Offset(15, 15);
            toolTip.Show(e.Item.ToolTipText, this, cursor.X, cursor.Y, 800);
        }
Example #21
0
        private void browserList_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            var item = e.Item;

            // NetService service = item.Tag;

            Trace.WriteLine("DEBUG: Hovering over " + item);
        }
Example #22
0
        private void lvDisks_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            Disk    disk    = (Disk)e.Item.Tag; //获取鼠标悬停时的list view项(台球桌)
            ToolTip toolTip = new ToolTip();    //构建文本提示对象
            string  tip     = string.Format("球桌状态:{0}\r\n球桌描述:{1}", disk.DiskStateID, disk.Description);

            toolTip.SetToolTip((e.Item).ListView, tip);
        }
Example #23
0
        public void TestListViewItemMouseHoverEventArgs()
        {
            ListViewItem item = new ListViewItem("TestItem");

            ListViewItemMouseHoverEventArgs e = new ListViewItemMouseHoverEventArgs(item);

            Assert.AreEqual(item, e.Item, "A1");
        }
Example #24
0
 private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (listViewHitTestInfo != null && listViewHitTestInfo.Location == ListViewHitTestLocations.Label)
     {
         toolTip        = new ToolTip();
         toolTip.Popup += toolTip_Popup;
         toolTip.SetToolTip(listView1, listViewHitTestInfo.SubItem.Text);
     }
 }
        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();
        }
Example #26
0
        /// <summary>
        /// 鼠标悬停于选择项上时
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            var ent = DBManager.Instance.GetEntity <Gg_pd_dyshb_n>(o => o.G3E_FID == long.Parse(e.Item.Name));

            if (ent != null)
            {
                e.Item.ToolTipText = String.Format("房号:{0}\n表号:{1}\n备注:{2}\n门牌地址:{3}\n用户用电号:{4}\n用户姓名:{5}", ent.AZDZ, ent.BH, ent.BZ, ent.HH, ent.YDH, ent.YHXM);
            }
        }
Example #27
0
 private void lvFlat_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if ((this.Bounds.X + 455 + 170) < Cursor.Position.X && (this.Bounds.X + 455 + 247) > Cursor.Position.X)
     {
         Point point = lvFlat.PointToClient(Cursor.Position);
         point.X = point.X + 15;
         toolTip1.Show(e.Item.SubItems[1].Text, lvFlat, point);
     }
 }
Example #28
0
 /// <summary>響應慢的方法 </summary>
 private void listView1_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
 {
     if (lastSelectedItem != null)
     {
         lastSelectedItem.BackColor = Color.White;
     }
     e.Item.BackColor = Color.LightSeaGreen;
     lastSelectedItem = e.Item;
 }
Example #29
0
        private void messagesListView_ItemMouseHover(object sender, ListViewItemMouseHoverEventArgs e)
        {
            int option = Int32.Parse(MarnikProjekt.Properties.Settings.Default["comminication_selection_option"].ToString());

            if (option == 3)
            {
                Speak(e.Item.Text);
            }
        }
 /// <summary>
 /// Event handler for hoverover a listviewitem.
 /// It will present the image if one is present.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void itemShowPicture(object sender, ListViewItemMouseHoverEventArgs e)
 {
     foreach (PersonSeeking person in peopleSeeking)
     {
         if (e.Item.SubItems[0].Text == Convert.ToString(person.PersonID))
         {
             showProfilePicture(person.Picture);
         }
     }
 }