예제 #1
0
        private void OnLoad(object sender, EventArgs e)
        {
            _toolListView.Items.Clear();


            //doing our own image list because VS2010 croaks their resx if have an imagelist while set to .net 3.5 with x86 on a 64bit os (something like that). This is a known bug MS doesn't plan to fix.

            _toolListView.LargeImageList = _toolImages;
            _toolImages.ColorDepth       = ColorDepth.Depth24Bit;
            _toolImages.ImageSize        = new Size(32, 32);

            _editLink.Visible = false;

            AddControl("Get Picture".Localize("ImageToolbox.GetPicture"), ImageToolboxButtons.browse, "browse", (x) =>
            {
                var c = new AcquireImageControl();
                c.SetIntialSearchString(InitialSearchString);
                return(c);
            });
            _cropToolListItem = AddControl("Crop".Localize("ImageToolbox.Crop"), ImageToolboxButtons.crop, "crop", (x) => new ImageCropper());

            _toolListView.Items[0].Selected = true;
            _toolListView.Refresh();

            if (ImageInfo == null)
            {
                return;
            }

            SetupMetaDataControls(ImageInfo.Metadata);
            this._toolListView.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
        }
        private void OnLoad(object sender, EventArgs e)
        {
            _toolListView.Items.Clear();

            //doing our own image list because VS2010 croaks their resx if have an imagelist while set to .net 3.5 with x86 on a 64bit os (something like that). This is a known bug MS doesn't plan to fix.

            _toolListView.LargeImageList = _toolImages;
            _toolImages.ColorDepth = ColorDepth.Depth24Bit;
            _toolImages.ImageSize = new Size(32, 32);

            _editLink.Visible = false;

            AddControl("Get Picture".Localize("ImageToolbox.GetPicture"), ImageToolboxButtons.browse, "browse", (x) =>
            {
                var c = new AcquireImageControl();
                c.SetIntialSearchString(InitialSearchString);
                return c;
            });
            _cropToolListItem = AddControl("Crop".Localize("ImageToolbox.Crop"), ImageToolboxButtons.crop, "crop", (x) => new ImageCropper());

            _toolListView.Items[0].Selected = true;
            _toolListView.Refresh();

            if (ImageInfo == null)
                return;

            SetupMetaDataControls(ImageInfo.Metadata);
            this._toolListView.SelectedIndexChanged += new System.EventHandler(this.listView1_SelectedIndexChanged);
        }