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); }
/// <summary> /// Called by the host to assign this view to a component. /// </summary> public void SetComponent(IApplicationComponent component) { _component = (ImagePropertiesApplicationComponent)component; }