private void CB_SkillFile_SelectedIndexChanged(object sender, EventArgs e) { ToolTips.SetToolTip(this.CB_SkillFile, this.CB_SkillFile.Text); if (groups.Contains(CB_SkillFile.Text)) { CB_SkillFile_Skill.Items.Clear(); var tmp = skillGroups.Where(x => x[0].DescriptorReference == CB_SkillFile.Text).Single(); CB_SkillFile_Skill.Items.AddRange(tmp.ToArray()); CB_SkillFile_Skill.Enabled = true; } else { CB_SkillFile_Skill.Enabled = false; } }
private static void OnObjectChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) { if (d is ButtonBase element && e.NewValue is ICupSupportedObject newValue) { element.PreviewMouseLeftButtonUp -= OnButtonMouseUp; element.PreviewMouseLeftButtonUp += OnButtonMouseUp; element.Command = new AsyncCommand(() => CupClient.Instance?.InstallUpdateAsync(newValue.CupContentType, newValue.Id)); element.SetBinding(UIElement.VisibilityProperty, new Binding { Path = new PropertyPath(nameof(newValue.IsCupUpdateAvailable)), Converter = new BooleanToVisibilityConverter(), Source = newValue }); ToolTips.SetCupUpdate(d, newValue); ContextMenus.SetCupUpdate(d, newValue); }
private void Fullscreen() { if (!isFullscreen) { windowState = WindowState; borderStyle = FormBorderStyle; topMost = TopMost; bounds = Bounds; WindowState = FormWindowState.Maximized; FormBorderStyle = FormBorderStyle.None; TopMost = true; WinApi.SetWinFullScreen(Handle); FullscreenButton.Image = Resources.down_left; ToolTips.SetToolTip(FullscreenButton, "Exit fullscreen (ESC)"); isFullscreen = true; } }
private void cboType_SelectedIndexChanged(object sender, EventArgs e) { string splitDescription = cboSplit.SelectedValue.ToString(); SplitName split = GetEnumValue <SplitName>(splitDescription); MemberInfo[] infos = typeof(SplitName).GetMember(split.ToString()); DescriptionAttribute[] descriptions = null; if (infos.Length > 0) { descriptions = (DescriptionAttribute[])infos[0].GetCustomAttributes(typeof(DescriptionAttribute), false); } if (descriptions != null && descriptions.Length > 0) { ToolTips.SetToolTip(cboSplit, descriptions[0].Description); } else { ToolTips.SetToolTip(cboSplit, string.Empty); } }
private void SetCurrentTease(Tease tease) { try { PictureBox1.SizeMode = PictureBoxSizeMode.Zoom; currentTease = tease; TeaseTitleLabel.Text = currentTease.Title; AuthorNameLabel.Text = (currentTease.Author != null) ? currentTease.Author.Name : String.Empty; ToolTips.SetToolTip(OnlineButton, String.Format("Open {0} in web browser", !String.IsNullOrEmpty(currentTease.Url) ? currentTease.Url : DefaultUrl)); if (currentTease.Author != null && !String.IsNullOrEmpty(currentTease.Author.Url)) { AuthorNameLabel.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Underline, GraphicsUnit.Point, 0); AuthorNameLabel.ForeColor = Color.SkyBlue; ToolTips.SetToolTip(AuthorNameLabel, String.Format("Open {0} in web browser", currentTease.Author.Url)); } else { AuthorNameLabel.Font = new Font("Microsoft Sans Serif", 9.75F, FontStyle.Regular, GraphicsUnit.Point, 0); AuthorNameLabel.ForeColor = Color.Gainsboro; ToolTips.SetToolTip(AuthorNameLabel, null); } PagesComboBox.Sorted = true; PagesComboBox.Items.Clear(); currentTease.Pages.ForEach(page => PagesComboBox.Items.Add(page.Id)); currentTease.CurrentPageChanged += currentTease_CurrentPageChanged; currentTease.Start(); } catch (Exception ex) { MessageBox.Show("Error: " + ex.Message); } }
private void listAttribs_MouseMove(object sender, MouseEventArgs e) { var listBox = (ListBox)sender; try { int index = listBox.IndexFromPoint(e.Location); if (index > -1 && index < listBox.Items.Count) { string tipp = listBox.Items[index].ToString(); //int idd = GetAttribId(tipp); string tip = ToolTips.FindToolTip(tipp); if (tipp != _lastTip) { toolTip1.SetToolTip(listBox, tip); _lastTip = tipp; } } } catch { toolTip1.Hide(listBox); } }
private void Start() { inv = GameObject.Find("Inventory").GetComponent <Inventory>(); tooltip = inv.GetComponent <ToolTips>(); }
public void Add(MapItem item) { if (item is MapLife) { MapLife l = (MapLife)item; int id = 0; IMGEntry le = map.GetChild("life"); if (le == null) { le = new IMGEntry(); le.Name = "life"; Map.Instance.map.Add(le); } while (le.childs.Contains(id.ToString())) { id++; } l.ID = id; l.Object.Name = l.ID.ToString(); lifes.Add(l); lifes.Sort(Map.CompareItems); le.Add(l.Object); } else if (item is MapReactor) { MapReactor r = (MapReactor)item; int id = 0; IMGEntry re = map.GetChild("reactor"); if (re == null) { re = new IMGEntry(); re.Name = "reactor"; Map.Instance.map.Add(re); } while (re.childs.Contains(id.ToString())) { id++; } r.ID = id; r.Object.Name = r.ID.ToString(); reactors.Add(r); reactors.Sort(Map.CompareItems); re.Add(r.Object); } else if (item is MapLR) { MapLR l = (MapLR)item; int id = 1; IMGEntry lrse = map.GetChild("ladderRope"); if (lrse == null) { lrse = new IMGEntry(); lrse.Name = "ladderRope"; Map.Instance.map.Add(lrse); } while (lrse.childs.Contains(id.ToString())) { id++; } l.ID = id; l.Object.Name = l.ID.ToString(); lrs.Add(l); lrs.Sort(Map.CompareItems); lrse.Add(l.Object); } else if (item is MapSeat) { MapSeat s = (MapSeat)item; int id = 0; IMGEntry seate = map.GetChild("seat"); if (seate == null) { seate = new IMGEntry(); seate.Name = "seat"; Map.Instance.map.Add(seate); } while (seate.childs.Contains(id.ToString())) { id++; } s.ID = id; s.Object.Name = s.ID.ToString(); seats.Add(s); seats.Sort(Map.CompareItems); seate.Add(s.Object); } else if (item is MapPortal) { MapPortal p = (MapPortal)item; int id = 0; IMGEntry portalse = map.GetChild("portal"); if (portalse == null) { portalse = new IMGEntry(); portalse.Name = "portal"; Map.Instance.map.Add(portalse); } while (portalse.childs.Contains(id.ToString())) { id++; } p.ID = id; p.Object.Name = p.ID.ToString(); p.Image = MapEditor.file.Directory.GetIMG("MapHelper.img").GetChild("portal/game/pv/0"); portals.Add(p); portals.Sort(Map.CompareItems); portalse.Add(p.Object); } else if (item is MapToolTip) { MapToolTip t = (MapToolTip)item; int id = 0; IMGEntry ToolTips = map.GetChild("ToolTip"); if (ToolTips == null) { ToolTips = new IMGEntry(); ToolTips.Name = "ToolTip"; Map.Instance.map.Add(ToolTips); } while (ToolTips.childs.Contains(id.ToString())) { id++; } t.ID = id; t.Object.Name = t.ID.ToString(); tooltips.Add(t); tooltips.Sort(Map.CompareItems); ToolTips.Add(t.Object); } else if (item is MapClock) { if (clock == null) { clock = item as MapClock; clock.Object.Name = "clock"; clock.Image = MapEditor.file.Directory.GetIMG("Obj/etc.img").GetChild("clock/fontTime"); map.Add(clock.Object); } } else { layers[(int)MapEditor.Instance.Layer.Value].Add(item); } }
private void SettingToolTip() { TxtBoxLOGIN.ToolTip = ToolTips.Default("Логин пользователя", "Уникальный идентификатор пользователя"); }
private void CB_Icon_SelectedIndexChanged(object sender, EventArgs e) { ToolTips.SetToolTip(this.CB_Icon, this.CB_Icon.Text); }