Exemplo n.º 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);

            // These two controls should never be visible except when made so by SetupMetaDataControls when ImageInfo is not null.
            // To help ensure this we make both not visible right at the start.
            _editLink.Visible = false;
            _invitationToMetadataPanel.Visible = false;

            AddControl("Get Picture".Localize("ImageToolbox.GetPicture"), ImageToolboxButtons.browse, "browse", (x) =>
            {
                _acquireImageControl = new AcquireImageControl();
                _acquireImageControl.ImageLoadingExceptionReporter =
                    ImageLoadingExceptionReporter;
                _acquireImageControl.SetIntialSearchString(InitialSearchString);
                _acquireImageControl.SearchLanguage = _incomingSearchLanguage;
                return(_acquireImageControl);
            });
            _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);
        }
Exemplo n.º 2
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) =>
			{
				_acquireImageControl = new AcquireImageControl();
				_acquireImageControl.SetIntialSearchString(InitialSearchString);
				_acquireImageControl.SearchLanguage = _incomingSearchLanguage;
				return _acquireImageControl;
			});
			_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);

		}