Пример #1
0
    public AutocompleteForm()
    {
        imagesIL = new ImageList();
        imagesIL.Images.Add("class", ClassImg);
        imagesIL.Images.Add("enum", EnumImg);
        imagesIL.Images.Add("enumprop", EnumPropImg);
        imagesIL.Images.Add("event", EventImg);
        imagesIL.Images.Add("method", MethodImg);
        imagesIL.Images.Add("namespace", NamespaceImg);
        imagesIL.Images.Add("property", PropertyImg);
        imagesIL.Images.Add("keyword", KeywordImg);
        imagesIL.Images.Add("custom", CustomImg);

        suggestionsLV = new ListView {
            Dock          = DockStyle.Fill, View = View.Details,
            HeaderStyle   = ColumnHeaderStyle.None, SmallImageList = imagesIL,
            HideSelection = false, MultiSelect = false
        };
        suggestionsLV.Columns.Add("", -2);

        suggestionsLV.DoubleClick += suggestionsLV_DoubleClick;
        suggestionsLV.KeyDown     += suggestionsLV_KeyDown;
        suggestionsLV.LostFocus   += (s, e) => Hide();

        methodMC = new MethodControl {
            Dock = DockStyle.Fill, Visible = false
        };
        methodMC.SizeChanged += methodMC_SizeChanged;

        ClientSize = FSize;

        FormBorderStyle = FormBorderStyle.None;
        ShowInTaskbar   = false;

        Controls.Add(suggestionsLV);
        Controls.Add(methodMC);
    }