Beispiel #1
0
        private void InitializeControls()
        {
            InitializeComponent();

            toolStrip.Renderer       = new DockPanelStripRenderer();
            toolStrip.Padding        = new Padding(2, 1, 2, 2);
            sortDropDown.Font        = PluginBase.Settings.DefaultFont;
            sortDropDown.Image       = PluginBase.MainForm.FindImage("444");
            clearButton.Image        = PluginBase.MainForm.FindImage("153");
            clearButton.Alignment    = ToolStripItemAlignment.Right;
            clearButton.CheckOnClick = false;

            outlineTree                  = new FixedTreeView();
            outlineTree.BorderStyle      = BorderStyle.None;
            outlineTree.ShowRootLines    = false;
            outlineTree.Location         = new System.Drawing.Point(0, toolStrip.Bottom);
            outlineTree.Size             = new System.Drawing.Size(198, 300);
            outlineTree.Dock             = DockStyle.Fill;
            outlineTree.ImageList        = treeIcons;
            outlineTree.HotTracking      = true;
            outlineTree.TabIndex         = 1;
            outlineTree.NodeClicked     += new FixedTreeView.NodeClickedHandler(ClassTreeSelect);
            outlineTree.KeyDown         += new System.Windows.Forms.KeyEventHandler(this.FindProcTxtKeyDown);
            outlineTree.AfterSelect     += new TreeViewEventHandler(outlineTree_AfterSelect);
            outlineTree.ShowNodeToolTips = true;
            Controls.Add(outlineTree);
            outlineTree.BringToFront();
        }
 public PluginUI()
 {
     InitializeComponent();
     //
     // custom treeview
     //
     classTree              = new FixedTreeView();
     classTree.Dock         = DockStyle.Fill;
     classTree.ImageList    = treeIcons;
     classTree.HotTracking  = true;
     classTree.TabIndex     = 0;
     classTree.NodeClicked += new FixedTreeView.NodeClickedHandler(ClassTreeSelect);
     classTree.KeyDown     += new System.Windows.Forms.KeyEventHandler(this.FindProcTxtKeyDown);
     Controls.Add(classTree);
     classTree.BringToFront();
     //
     // search field information
     //
     FindProcTxtLeave(null, null);
     //
     // entries "checksum"
     //
     checkEntries = new Hashtable();
     //
     // load resource icons
     //
     try
     {
         treeIcons.Images.Clear();
         System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly();
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("Class.png")));                               //0
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("FolderClosed.png")));                        //1
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("FolderOpen.png")));                          //2
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("Method.png")));                              //3
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("Property.png")));                            //4
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("Variable.png")));                            //5
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("Package.png")));                             //6
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("Intrinsic.png")));                           //7
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("Template.png")));                            //8
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("FilePlain.png")));                           //9
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("QuickBuild.png")));                          //10
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("CheckAS.png")));                             //11
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("MethodPrivate.png")));                       //12
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("PropertyPrivate.png")));                     //13
         treeIcons.Images.Add(new System.Drawing.Bitmap(assembly.GetManifestResourceStream("VariablePrivate.png")));                     //14
     }
     catch (Exception ex)
     {
         ErrorHandler.ShowError("Error while loading resources in ASCompletion.DLL", ex);
     }
 }