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 NumberRegRuleItem(RegRule rule, ItemInfo info) : base(info)
 {
     this.AddCtr(NudValue);
     ToolTipBox.SetToolTip(NudValue, info.Tip);
     TsiRegLocation = new RegLocationMenuItem(this);
     this.ContextMenuStrip.Items.AddRange(new ToolStripItem[] { new ToolStripSeparator(), TsiRegLocation });
     this.Rule              = rule;
     NudValue.Maximum       = rule.MaxValue;
     NudValue.Minimum       = rule.MinValue;
     NudValue.Font          = new Font(this.Font.FontFamily, this.Font.Size + 3F);
     NudValue.ValueChanged += (sender, e) =>
     {
         if (NudValue.Value == Rule.DefaultValue)
         {
             NudValue.ForeColor = Color.FromArgb(0, 138, 217);
             NudValue.Font      = new Font(NudValue.Font, FontStyle.Bold);
         }
         else
         {
             NudValue.ForeColor = Color.Black;
             NudValue.Font      = new Font(NudValue.Font, FontStyle.Regular);
         }
         this.ItemValue = (int)NudValue.Value;
     };
     NudValue.Value = ItemValue;
 }
Example #3
0
 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 InitializeComponents()
 {
     BtnShowMenu       = new MenuButton(this);
     ChkVisible        = new VisibleCheckBox(this);
     TsiSearch         = new WebSearchMenuItem(this);
     TsiFileLocation   = new FileLocationMenuItem(this);
     TsiFileProperties = new FilePropertiesMenuItem(this);
     TsiRegLocation    = new RegLocationMenuItem(this);
     TsiDeleteMe       = new DeleteMeMenuItem(this);
     TsiRegExport      = new RegExportMenuItem(this);
     TsiHandleGuid     = new HandleGuidMenuItem(this);
     this.ContextMenuStrip.Items.AddRange(new ToolStripItem[] { TsiHandleGuid,
                                                                new ToolStripSeparator(), TsiDetails, new ToolStripSeparator(), TsiDeleteMe });
     TsiDetails.DropDownItems.AddRange(new ToolStripItem[] { TsiSearch, new ToolStripSeparator(),
                                                             TsiFileProperties, TsiFileLocation, TsiRegLocation, TsiRegExport });
 }
Example #5
0
        private void InitializeComponents()
        {
            BtnDelete         = new DeleteButton(this);
            ContextMenuStrip  = new ContextMenuStrip();
            TsiSearch         = new WebSearchMenuItem(this);
            TsiFileProperties = new FilePropertiesMenuItem(this);
            TsiFileLocation   = new FileLocationMenuItem(this);
            TsiRegLocation    = new RegLocationMenuItem(this);
            TsiHandleGuid     = new HandleGuidMenuItem(this, false);

            ContextMenuStrip.Items.AddRange(new ToolStripItem[] { TsiHandleGuid,
                                                                  new ToolStripSeparator(), TsiDetails });
            TsiDetails.DropDownItems.AddRange(new ToolStripItem[] { TsiSearch,
                                                                    new ToolStripSeparator(), TsiFileProperties, TsiFileLocation, TsiRegLocation });

            MyToolTip.SetToolTip(BtnDelete, AppString.Menu.Delete);
        }
        private void InitializeComponents()
        {
            BtnShowMenu       = new MenuButton(this);
            BtnDetailedEdit   = new DetailedEditButton(this);
            TsiSearch         = new WebSearchMenuItem(this);
            TsiFileProperties = new FilePropertiesMenuItem(this);
            TsiFileLocation   = new FileLocationMenuItem(this);
            TsiRegLocation    = new RegLocationMenuItem(this);
            TsiHandleGuid     = new HandleGuidMenuItem(this);

            ContextMenuStrip.Items.AddRange(new ToolStripItem[] { TsiHandleGuid,
                                                                  new ToolStripSeparator(), TsiDetails, new ToolStripSeparator(), TsiDelete });
            TsiDetails.DropDownItems.AddRange(new ToolStripItem[] { TsiSearch,
                                                                    new ToolStripSeparator(), TsiFileProperties, TsiFileLocation, TsiRegLocation });

            TsiDelete.Click += (sender, e) => DeleteMe();
        }
Example #7
0
        private void InitializeComponents()
        {
            BtnDelete         = new DeleteButton(this);
            ContextMenuStrip  = new ContextMenuStrip();
            TsiSearch         = new WebSearchMenuItem(this);
            TsiFileProperties = new FilePropertiesMenuItem(this);
            TsiFileLocation   = new FileLocationMenuItem(this);
            TsiRegLocation    = new RegLocationMenuItem(this);
            TsiHandleGuid     = new HandleGuidMenuItem(this);

            ContextMenuStrip.Items.AddRange(new ToolStripItem[] { TsiHandleGuid,
                                                                  new ToolStripSeparator(), TsiDetails, new ToolStripSeparator(), TsiDelete });
            TsiDetails.DropDownItems.AddRange(new ToolStripItem[] { TsiSearch,
                                                                    new ToolStripSeparator(), TsiFileProperties, TsiFileLocation, TsiRegLocation });

            MyToolTip.SetToolTip(BtnDelete, AppString.Menu.Delete);
            TsiDelete.Click += (sender, e) =>
            {
                if (MessageBoxEx.Show(AppString.Message.ConfirmDelete, MessageBoxButtons.YesNo) == DialogResult.Yes)
                {
                    DeleteMe();
                }
            };
        }
 public StringRegRuleItem(RegRule rule, ItemInfo info) : base(info)
 {
     this.AddCtr(LblValue);
     ToolTipBox.SetToolTip(LblValue, info.Tip);
     TsiRegLocation = new RegLocationMenuItem(this);
     this.ContextMenuStrip.Items.AddRange(new ToolStripItem[] { new ToolStripSeparator(), TsiRegLocation });
     this.Rule           = rule;
     LblValue.Text       = ItemValue;
     LblValue.Font       = new Font(this.Font.FontFamily, this.Font.Size + 3F);
     LblValue.MouseDown += (sender, e) =>
     {
         using (InputDialog dlg = new InputDialog())
         {
             dlg.Title = AppString.Menu.ChangeText;
             dlg.Text  = ItemValue;
             if (dlg.ShowDialog() != DialogResult.OK)
             {
                 return;
             }
             ItemValue = LblValue.Text = dlg.Text;
         }
     };
     LblValue.TextChanged += (sender, e) => ItemValue = LblValue.Text;
 }