DumpObjectsWithEditedProperties() public static method

public static DumpObjectsWithEditedProperties ( ) : void
return void
Exemplo n.º 1
0
        private void CopyPropertyChangesHandler(object sender, ExecutedRoutedEventArgs e)
        {
            if (this.currentSelection != null)
            {
                SaveEditedProperties(this.currentSelection);
            }

            EditedPropertiesHelper.DumpObjectsWithEditedProperties();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Cleanup when closing the window.
        /// </summary>
        protected override void OnClosing(CancelEventArgs e)
        {
            base.OnClosing(e);

            // unsubscribe to owner window closing event
            // replaces previous attempts to hookup to MainWindow.Closing on the wrong dispatcher thread
            // This one should be running on the right dispatcher thread since this SnoopUI instance
            // is wired up to the dispatcher thread/window that it owns
            if (Owner != null)
            {
                Owner.Closing -= SnoopedWindowClosingHandler;
            }

            this.CurrentSelection = null;

            InputManager.Current.PreProcessInput -= this.HandlePreProcessInput;
            EventsListener.Stop();

            EditedPropertiesHelper.DumpObjectsWithEditedProperties();

            // persist the window placement details to the user settings.
            WINDOWPLACEMENT wp   = new WINDOWPLACEMENT();
            IntPtr          hwnd = new WindowInteropHelper(this).Handle;

            Win32.GetWindowPlacement(hwnd, out wp);
            Properties.Settings.Default.SnoopUIWindowPlacement = wp;

            // persist whether all properties are shown by default
            Properties.Settings.Default.ShowDefaults = this.PropertyGrid.ShowDefaults;

            // persist whether the previewer is shown by default
            Properties.Settings.Default.ShowPreviewer = this.PreviewArea.IsActive;

            // actually do the persisting
            Properties.Settings.Default.Save();

            SnoopPartsRegistry.RemoveSnoopVisualTreeRoot(this);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Event handler for a snooped window closing. This is our chance to spit out
 /// all the properties that changed during the snoop session for that window.
 /// Note: there may be multiple snooped windows (when in multiple dispatcher mode)
 /// and each window is hooked up to it's own instance of SnoopUI and this event.
 /// </summary>
 private void SnoopedWindowClosingHandler(object sender, CancelEventArgs e)
 {
     // changing the selection captures any changes in the selected item at the time of window closing
     this.CurrentSelection = null;
     EditedPropertiesHelper.DumpObjectsWithEditedProperties();
 }