Example #1
0
 public Config()
 {
     window  = new _Window();
     tabs    = new _Tabs();
     tweaks  = new _Tweaks();
     tips    = new _Tips();
     misc    = new _Misc();
     skin    = new _Skin();
     bbar    = new _BBar();
     mouse   = new _Mouse();
     keys    = new _Keys();
     plugin  = new _Plugin();
     lang    = new _Lang();
     desktop = new _Desktop();
 }
Example #2
0
    ///// <summary>
    ///// The child list control.
    ///// </summary>
    //public AuListControl ListControl => _list;

    public CiPopupList(CiCompletion compl)
    {
        _compl = compl;

        _w = new _Window(this);
        _w.SuspendLayout();
        _w.Size = Au.Util.ADpi.ScaleSize((300, 360));

        _list = new _FastListBox();
        _list.SuspendLayout();
        _list.AccessibleName         = _list.Name = "Codein_list";
        _list.Dock                   = DockStyle.Fill;
        _list.BackColor              = Color.White;
        _list.ZItemClick            += _list_ItemClick;
        _list.ZSelectedIndexChanged += _list_SelectedIndexChanged;

        _tb = new Au.Util.AToolStrip();
        _tb.SuspendLayout();
        _tb.AccessibleName = _tb.Name = "Codein_listFilter";
        _tb.Renderer       = new AuDockPanel.ZDockedToolStripRenderer();
        _tb.GripStyle      = ToolStripGripStyle.Hidden;
        _tb.LayoutStyle    = ToolStripLayoutStyle.VerticalStackWithOverflow;
        int tbWidth = 0;

        var kindNames = CiUtil.ItemKindNames;

        _nKindButtons = kindNames.Length;
        for (int i = 0; i < kindNames.Length; i++)
        {
            _AddButton(kindNames[i], CiUtil.GetKindImage((CiItemKind)i));
        }
        _tb.Items.Add(new ToolStripSeparator());
        _groupButton = _AddButton("Group by namespace or inheritance", EdResources.GetImageNoCacheDpi(nameof(Au.Editor.Resources.Resources.ciGroupBy)));
        if (Program.Settings.ci_complGroup)
        {
            _groupButton.Checked = true;
        }

        ToolStripButton _AddButton(string text, Image image)
        {
            var b = _tb.Items.Add(image) as ToolStripButton;

            b.DisplayStyle = ToolStripItemDisplayStyle.Image;
            b.ImageScaling = ToolStripItemImageScaling.None;
            b.Name         = b.AccessibleName = b.ToolTipText = text;
            b.Margin       = new Padding(1, 1, 0, 0);
            if (tbWidth == 0)
            {
                tbWidth = 4 + b.ContentRectangle.Left * 2 + image.Width;
            }
            return(b);
        }

        _tb.Width        = tbWidth; _tb.AutoSize = false;  //does not work well with autosize, eg width too small when high DPI
        _tb.Dock         = DockStyle.Left;
        _tb.ItemClicked += _tb_ItemClicked;

        _w.Controls.Add(_list);
        _w.Controls.Add(_tb);
        _tb.ResumeLayout();
        _list.ResumeLayout();
        _w.ResumeLayout(true);

        _imgStatic   = EdResources.GetImageNoCacheDpi(nameof(Au.Editor.Resources.Resources.ciOverlayStatic));
        _imgAbstract = EdResources.GetImageNoCacheDpi(nameof(Au.Editor.Resources.Resources.ciOverlayAbstract));

        _popupHtml  = new CiPopupHtml(CiPopupHtml.UsedBy.PopupList);
        _popupTimer = new ATimer(_ShowPopupHtml);
    }
Example #3
0
 public Config()
 {
     window = new _Window();
     tabs = new _Tabs();
     tweaks = new _Tweaks();
     tips = new _Tips();
     misc = new _Misc();
     skin = new _Skin();
     bbar = new _BBar();
     mouse = new _Mouse();
     keys = new _Keys();
     plugin = new _Plugin();
     lang = new _Lang();
     desktop = new _Desktop();
 }