コード例 #1
0
		public void Show()
		{
			if (ComponentShelf == null)
			{
				try
				{
					IDesktopWindow desktopWindow = Context.DesktopWindow;
					
					ImagePropertiesApplicationComponent component =
						new ImagePropertiesApplicationComponent(Context.DesktopWindow);

					IShelf shelf = ApplicationComponent.LaunchAsShelf(Context.DesktopWindow, component,
						SR.TitleImageProperties, "ImageProperties", ShelfDisplayHint.DockLeft);

					Shelves.Add(Context.DesktopWindow, shelf);
					shelf.Closed += delegate { Shelves.Remove(desktopWindow); };
				}
				catch(Exception e)
				{
					ExceptionHandler.Report(e, Context.DesktopWindow);
				}
			}
			else
			{
				ComponentShelf.Show();
			}
		}
		/// <summary>
		/// Constructor.
		/// </summary>
		public ImagePropertiesApplicationComponentControl(ImagePropertiesApplicationComponent component)
			: base(component)
		{
			_component = component;
			InitializeComponent();

			_component.PropertyChanged += Update;

			Update(null, null);
		}
コード例 #3
0
        /// <summary>
        /// Constructor.
        /// </summary>
        public ImagePropertiesApplicationComponentControl(ImagePropertiesApplicationComponent component)
            : base(component)
        {
            _component = component;
            InitializeComponent();

            _component.PropertyChanged += Update;

            Update(null, null);
        }
コード例 #4
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ImagePropertiesApplicationComponent)component;
 }
コード例 #5
0
 /// <summary>
 /// Called by the host to assign this view to a component.
 /// </summary>
 public void SetComponent(IApplicationComponent component)
 {
     _component = (ImagePropertiesApplicationComponent)component;
 }