public AnnotateMarginControl() { _regions = new List <AnnotateRegion>(); _toolTip = new MyToolTip(); _toolTip.ShowAlways = true; }
private VisibleRegRuleItem(ItemInfo info) : base(info) { ChkVisible = new VisibleCheckBox(this); MyToolTip.SetToolTip(ChkVisible, info.Tip); TsiRegLocation = new RegLocationMenuItem(this); this.ContextMenuStrip.Items.AddRange(new ToolStripItem[] { new ToolStripSeparator(), TsiRegLocation }); }
public DictionariesBox() { this.Dock = DockStyle.Fill; this.Controls.AddRange(pages); this.Font = new Font(SystemFonts.MenuFont.FontFamily, 10F); cms.Items.AddRange(items); for (int i = 0; i < 6; i++) { boxs[i] = new ReadOnlyRichTextBox { Parent = pages[i] }; if (i > 0) { boxs[i].ContextMenuStrip = cms; } } items[0].Click += (sender, e) => ExternalProgram.OpenNotepadWithText(GetInitialText()); items[2].Click += (sender, e) => SaveFile(); boxs[0].Controls.Add(btnOpenDir); boxs[0].Text = AppString.Other.Dictionaries; btnOpenDir.Top = boxs[0].Height - btnOpenDir.Height; MyToolTip.SetToolTip(btnOpenDir, AppString.Menu.FileLocation); btnOpenDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.DicsDir); this.SelectedIndexChanged += (sender, e) => LoadText(); }
private void LoadShellExItems(XmlElement shellExXE, GroupPathItem groupItem) { foreach (XmlElement itemXE in shellExXE.SelectNodes("Item")) { if (!JudgeOSVersion(itemXE)) { continue; } if (!GuidEx.TryParse(itemXE.GetAttribute("Guid"), out Guid guid)) { continue; } EnhanceShellExItem item = new EnhanceShellExItem { FoldGroupItem = groupItem, ShellExPath = $@"{groupItem.TargetPath}\ShellEx", Image = ResourceIcon.GetIcon(itemXE.GetAttribute("Icon"))?.ToBitmap() ?? AppImage.DllDefaultIcon, Text = ResourceString.GetDirectString(itemXE.GetAttribute("Text")), DefaultKeyName = itemXE.GetAttribute("KeyName"), Guid = guid }; if (item.Text.IsNullOrWhiteSpace()) { item.Text = GuidInfo.GetText(guid); } if (item.DefaultKeyName.IsNullOrWhiteSpace()) { item.DefaultKeyName = guid.ToString("B"); } item.ChkVisible.Checked = item.ItemVisible; MyToolTip.SetToolTip(item.ChkVisible, itemXE.GetAttribute("Tip")); this.AddItem(item); } }
public Form_transparent() { InitializeComponent(); //this.Size = new Size(0, 0); SetStyle(ControlStyles.AllPaintingInWmPaint, true); //SetStyle(ControlStyles.UserPaint, true); //SetStyle(ControlStyles.OptimizedDoubleBuffer, true); BackColor = Color.Black; TransparencyKey = Color.Black; FormBorderStyle = FormBorderStyle.None; ShowInTaskbar = false; m_pen = new Pen(Brushes.Red); m_pen.StartCap = System.Drawing.Drawing2D.LineCap.Round; m_pen.EndCap = System.Drawing.Drawing2D.LineCap.Round; m_gp = this.CreateGraphics(); cMS_MatchedGestures = new ContextMenuStrip(); cMS_MatchedGestures.Text = "cMS_MatchedGestures"; // register visibility event so the context menu is closed when it is hidden cMS_MatchedGestures.VisibleChanged += new EventHandler(cMS_MatchedGestures_VisibleChanged); m_hwndCms = cMS_MatchedGestures.Handle; this.ContextMenuStrip = cMS_MatchedGestures; m_hwndCmsList = new List <IntPtr>(); m_tooltip = new MyToolTip(); m_hwndForm = this.Handle; m_threadTimerDraw = new System.Threading.Timer(m_threadTimerDraw_Tick, null, -1, -1); }
public NewItem() { this.Image = AppImage.NewItem; this.Text = AppString.Item.NewItem; this.AddCtr(BtnAddNewItem); MyToolTip.SetToolTip(BtnAddNewItem, AppString.Item.NewItem); BtnAddNewItem.MouseDown += (sender, e) => NewItemAdd?.Invoke(null, null); }
private RegRuleItem(ItemInfo info) { this.Text = info.Text; this.Image = info.Image; this.RestartExplorer = info.RestartExplorer; ChkVisible = new VisibleCheckBox(this); MyToolTip.SetToolTip(ChkVisible, info.Tip); }
public SubNewItem(bool isPublic) { this.AddCtrs(new[] { btnAddExisting, btnAddSeparator }); MyToolTip.SetToolTip(btnAddExisting, isPublic ? AppString.Tip.AddReference : AppString.Tip.AddFromParentMenu); MyToolTip.SetToolTip(btnAddSeparator, AppString.Tip.AddSeparator); btnAddExisting.MouseDown += (sender, e) => AddExisting?.Invoke(null, null); btnAddSeparator.MouseDown += (sender, e) => AddSeparator?.Invoke(null, null); }
public SubSeparatorItem() { this.Text = AppString.Other.Separator; this.HasImage = false; BtnDelete = new DeleteButton(this); BtnMoveDown = new MoveButton(this, false); BtnMoveUp = new MoveButton(this, true); MyToolTip.SetToolTip(BtnDelete, AppString.Menu.Delete); }
public NewItem(string text) { this.Text = text; this.Image = AppImage.NewItem; this.SetNoClickEvent(); this.AddCtr(BtnAddNewItem); MyToolTip.SetToolTip(BtnAddNewItem, text); BtnAddNewItem.MouseDown += (sender, e) => AddNewItem?.Invoke(null, null); }
public CommonMultiItemsList(MyListBox owner) : base(owner) { this.AddItem(newItem); newItem.AddCtrs(new[] { btnAddCommon, btnAddExisting, btnAddSeparator }); MyToolTip.SetToolTip(btnAddExisting, AppString.Tip.AddExistingItems); MyToolTip.SetToolTip(btnAddSeparator, AppString.Tip.AddSeparator); newItem.NewItemAdd += (sender, e) => AddNewItem(); btnAddCommon.MouseDown += (sender, e) => AddCommonItems(); btnAddExisting.MouseDown += (sender, e) => AddExistingItems(); btnAddSeparator.MouseDown += (sender, e) => AddSeparator(); }
private void btnRestore_MouseHover(object sender, EventArgs e) { if (this.WindowState == FormWindowState.Maximized) { MyToolTip.Show(" Restore Downe", btnRestore); } else { MyToolTip.Show(" Maximize", btnRestore); } }
public LanguagesBox() { this.Dock = DockStyle.Fill; this.Font = new Font(SystemFonts.MenuFont.FontFamily, 10F); this.Controls.AddRange(new Control[] { cmbLanguages, btnOpenDir, llbOtherLanguages, txtTranslators }); this.OnResize(null); cmbLanguages.SelectionChangeCommitted += (sender, e) => ChangeLanguage(); llbOtherLanguages.LinkClicked += (sender, e) => Process.Start(OtherLanguagesUrl); btnOpenDir.MouseDown += (sender, e) => Process.Start(AppConfig.LangsDir); MyToolTip.SetToolTip(btnOpenDir, AppString.Tip.OpenLanguagesDir); }
private RegRuleItem(ItemInfo info) { this.Text = info.Text; this.Image = info.Image; this.RestartExplorer = info.RestartExplorer; BtnShowMenu = new MenuButton(this); ChkVisible = new VisibleCheckBox(this); MyToolTip.SetToolTip(ChkVisible, info.Tip); TsiSearch = new WebSearchMenuItem(this); this.ContextMenuStrip = new ContextMenuStrip(); this.ContextMenuStrip.Items.Add(TsiSearch); }
protected void SetMyToolTip() { var fi = Utils.GetField(this.GetType(), "toolTip"); var dToolTip = new MyToolTip(); dToolTip.ShowAlways = true; dToolTip.InitialDelay = 0; dToolTip.UseFading = false; dToolTip.UseAnimation = false; dToolTip.AutoPopDelay = 0; fi.SetValue(this, dToolTip); }
public InvalidItem(CommonMultiItemsList list, string keyName) { this.Owner = list; this.Text = $"{AppString.Item.InvalidItem} {keyName}"; this.Image = AppImage.NotFound.ToTransparent(); BtnDelete = new DeleteButton(this); BtnMoveDown = new MoveButton(this, false); BtnMoveUp = new MoveButton(this, true); BtnMoveUp.MouseDown += (sender, e) => MoveItem(this, Owner, true); BtnMoveDown.MouseDown += (sender, e) => MoveItem(this, Owner, false); MyToolTip.SetToolTip(BtnDelete, AppString.Tip.InvalidItem); }
public SeparatorItem(CommonMultiItemsList list) { this.Owner = list; this.Text = AppString.Item.Separator; this.Image = AppImage.Separator; BtnDelete = new DeleteButton(this); BtnMoveDown = new MoveButton(this, false); BtnMoveUp = new MoveButton(this, true); BtnMoveUp.MouseDown += (sender, e) => MoveItem(this, Owner, true); BtnMoveDown.MouseDown += (sender, e) => MoveItem(this, Owner, false); MyToolTip.SetToolTip(BtnDelete, AppString.Tip.Separator); }
private void rFacturas_Load(object sender, EventArgs e) { FechaDateTimePicker.Value = DateTime.Now; if (FacturaId > 0) { FacturaIdNumericUpDown.Value = FacturaId; Buscar(); } MyToolTip.SetToolTip(VerProductosButton, "Ver listado de productos"); }
public ExplorerRestarter() { this.Visible = false; this.Dock = DockStyle.Bottom; this.Image = AppImage.Explorer; this.Text = AppString.Text_RestartExplorer; MyToolTip.SetToolTip(BtnRestart, AppString.Tip_RestartExplorer); this.AddCtr(BtnRestart); this.CanMoveForm(); BtnRestart.MouseDown += (sender, e) => { Explorer.ReStart(); this.Visible = false; }; RestartHandler += (sender, e) => this.Visible = NeedRestart; }
public ExplorerRestarter() { this.Visible = false; this.Dock = DockStyle.Bottom; this.Image = AppImage.Explorer; this.Text = AppString.Other.RestartExplorer; MyToolTip.SetToolTip(BtnRestart, AppString.Tip.RestartExplorer); this.AddCtr(BtnRestart); this.CanMoveForm(); BtnRestart.MouseDown += (sender, e) => { ExternalProgram.RestartExplorer(); this.Visible = false; }; ShowHandler += (sender, e) => this.Visible = true; }
public LanguagesBox() { this.Dock = DockStyle.Fill; this.Font = new Font(SystemFonts.MenuFont.FontFamily, 10F); this.Controls.AddRange(new Control[] { cmbLanguages, btnOpenDir, btnDownLoad, txtTranslators }); cmbLanguages.SelectionChangeCommitted += (sender, e) => ChangeLanguage(); btnDownLoad.MouseDown += (sender, e) => ExternalProgram.OpenUrl(OtherLanguagesUrl); btnOpenDir.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(AppConfig.LangsDir); btnTranslate.MouseDown += (sender, e) => new TranslateDialog().ShowDialog(); MyToolTip.SetToolTip(btnOpenDir, AppString.Tip.OpenLanguagesDir); MyToolTip.SetToolTip(btnDownLoad, AppString.Tip.OtherLanguages); this.OnResize(null); }
public LockNewItem(ShellNewList list) { this.Owner = list; this.Image = AppImage.Lock; this.Text = AppString.Item.LockNewMenu; this.SetNoClickEvent(); ChkVisible = new VisibleCheckBox(this) { Margin = new Padding(Margin.Left, Margin.Top, RegRuleItem.SysMarginRignt, Margin.Bottom), Checked = IsLocked() }; MyToolTip.SetToolTip(ChkVisible, AppString.Tip.LockNewMenu); }
private void InitializeComponents() { BtnDelete = new DeleteButton(this); ContextMenuStrip = new ContextMenuStrip(); TsiSearch = new WebSearchMenuItem(this); TsiFileProperties = new FilePropertiesMenuItem(this); TsiFileLocation = new FileLocationMenuItem(this); ContextMenuStrip.Items.AddRange(new ToolStripItem[] { TsiSearch, new ToolStripSeparator(), TsiFileProperties, TsiFileLocation }); MyToolTip.SetToolTip(BtnDelete, AppString.Menu.Delete); }
public ShellNewLockItem(ShellNewList list) { this.Owner = list; this.Image = AppImage.Lock; this.Text = AppString.Other.LockNewMenu; BtnShowMenu = new MenuButton(this); ChkVisible = new VisibleCheckBox(this) { Checked = IsLocked }; MyToolTip.SetToolTip(ChkVisible, AppString.Tip.LockNewMenu); TsiSearch = new WebSearchMenuItem(this); TsiRegLocation = new RegLocationMenuItem(this); this.ContextMenuStrip.Items.AddRange(new ToolStripItem[] { TsiSearch, new ToolStripSeparator(), TsiRegLocation }); }
private void AddNewItem() { MyListItem newItem = new MyListItem { Text = AppString.Item.AddGuidBlockedItem, Image = AppImage.AddNewItem }; PictureButton btnAddNewItem = new PictureButton(AppImage.AddNewItem); newItem.AddCtr(btnAddNewItem); newItem.SetNoClickEvent(); this.AddItem(newItem); MyToolTip.SetToolTip(btnAddNewItem, newItem.Text); btnAddNewItem.MouseDown += (sender, e) => { using (InputDialog dlg = new InputDialog { Title = AppString.Dialog.InputGuid }) { if (GuidEx.TryParse(Clipboard.GetText(), out Guid guid)) { dlg.Text = guid.ToString(); } if (dlg.ShowDialog() != DialogResult.OK) { return; } if (GuidEx.TryParse(dlg.Text, out guid)) { Array.ForEach(GuidBlockedItem.BlockedPaths, path => { Registry.SetValue(path, guid.ToString("B"), string.Empty); }); for (int i = 1; i < Controls.Count; i++) { if (((GuidBlockedItem)Controls[i]).Guid.Equals(guid)) { MessageBoxEx.Show(AppString.MessageBox.HasBeenAdded); return; } } this.InsertItem(new GuidBlockedItem(dlg.Text), 1); ExplorerRestarter.NeedRestart = true; } else { MessageBoxEx.Show(AppString.MessageBox.MalformedGuid); } } }; }
private void AddDirItem() { MyListItem item = new MyListItem { Text = Path.GetFileNameWithoutExtension(SendToPath), Image = ResourceIcon.GetFolderIcon(SendToPath).ToBitmap() }; PictureButton btnPath = new PictureButton(AppImage.Open); MyToolTip.SetToolTip(btnPath, AppString.Menu.FileLocation); btnPath.MouseDown += (sender, e) => ExternalProgram.JumpExplorer(SendToPath); item.AddCtr(btnPath); this.InsertItem(item, 1); }
private void rProductos_Load(object sender, EventArgs e) { FechaDeRegistroDateTimePicker.Value = DateTime.Now; LlenaComboBoxCategorias(); if (ProductoId > 0) { ProductoIdNumericUpDown.Value = ProductoId; Buscar(); } CategoriaComboBox.DropDownWidth = 233; MyToolTip.SetToolTip(AnadirCategoriasButton, "Agregar una nueva categoría"); }
public ShellNewLockItem(ShellNewList list) { this.Owner = list; this.Image = AppImage.Lock; this.Text = AppString.Other.LockNewMenu; this.SetNoClickEvent(); BtnShowMenu = new MenuButton(this); ChkVisible = new VisibleCheckBox(this) { Checked = IsLocked }; MyToolTip.SetToolTip(ChkVisible, AppString.Tip.LockNewMenu); TsiSearch = new WebSearchMenuItem(this); this.ContextMenuStrip = new ContextMenuStrip(); this.ContextMenuStrip.Items.Add(TsiSearch); }
private void LoadShellItems(XmlElement shellXE, GroupPathItem groupItem) { foreach (XmlElement itemXE in shellXE.GetElementsByTagName("Item")) { XmlElement verXE = (XmlElement)itemXE.SelectSingleNode("OSVersion"); if (!JudgeOSVersion(verXE)) { continue; } XmlElement szXE = (XmlElement)itemXE.SelectSingleNode("Value/REG_SZ"); string keyName = itemXE.GetAttribute("KeyName"); if (keyName.IsNullOrWhiteSpace()) { continue; } string regPath = $@"{groupItem.TargetPath}\shell\{keyName}"; EnhanceShellItem item = new EnhanceShellItem() { RegPath = $@"{groupItem.TargetPath}\shell\{keyName}", FoldGroupItem = groupItem, ItemXE = itemXE }; if (szXE != null) { item.Text = ResourceString.GetDirectString(szXE.GetAttribute("MUIVerb")); if (szXE.HasAttribute("Icon")) { item.Image = ResourceIcon.GetIcon(szXE.GetAttribute("Icon"))?.ToBitmap(); } else if (szXE.HasAttribute("HasLUAShield")) { item.Image = AppImage.Shield; } } if (item.Image == null) { item.Image = AppImage.NotFound; } if (item.Text.IsNullOrWhiteSpace()) { item.Text = keyName; } item.ChkVisible.Checked = item.ItemVisible; MyToolTip.SetToolTip(item.ChkVisible, itemXE.GetAttribute("Tip")); this.AddItem(item); } }
private void rEntradaProductos_Load(object sender, EventArgs e) { FechaDateTimePicker.Value = DateTime.Now; if (EntradaProductoId > 0) { EntradaIdNumericUpDown.Value = EntradaProductoId; Buscar(); } else if (ProductoId > 0) { Producto = BuscaProducto(ProductoId); ProductoTextBox.Text = Producto.Descripcion; CantidadNumericUpDown.Focus(); } MyToolTip.SetToolTip(VerProductosButton, "Ver listado de productos"); }