/// <summary> /// Called when [execute de serialize]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="System.Windows.Input.ExecutedRoutedEventArgs"/> instance containing the event data.</param> private static void OnExecuteDeSerialize(object sender, ExecutedRoutedEventArgs args) { GridTreeControl GTC = args.Source as GridTreeControl; GTC.InternalGrid.CurrentCell.Deactivate(); GTC.InternalGrid.Deserialize(LayoutControl.FindFile("Default.xml")); GTC.ExpandAllNodes(); }
/// <summary> /// <summary> /// Called when [execute load new changes]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="System.Windows.Input.ExecutedRoutedEventArgs"/> instance containing the event data.</param> private static void OnExecuteLoadNewChanges(object sender, ExecutedRoutedEventArgs args) { GridTreeControl GTC = args.Source as GridTreeControl; GTC.InternalGrid.CurrentCell.Deactivate(); GTC.InternalGrid.Deserialize("newChanges.xml"); GTC.ExpandAllNodes(); }
/// <summary> /// Called when [execute expand all]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="System.Windows.Input.ExecutedRoutedEventArgs"/> instance containing the event data.</param> private static void OnExecuteExpandAll(object sender, ExecutedRoutedEventArgs args) { DateTime start = DateTime.Now; GridTreeControl GTC = args.Source as GridTreeControl; GTC.ExpandAllNodes(); (GTC.DataContext as ViewModel).ExpandTime = string.Format("Expanded time: {0:0.0000} secs", DateTime.Now.Subtract(start).TotalSeconds); (GTC.DataContext as ViewModel).CollapseTime = string.Empty; }
/// <summary> /// Called when [execute expand all]. /// </summary> /// <param name="sender">The sender.</param> /// <param name="args">The <see cref="System.Windows.Input.ExecutedRoutedEventArgs"/> instance containing the event data.</param> private static void OnExecuteExpandAll(object sender, ExecutedRoutedEventArgs args) { GridTreeControl GTC = args.Source as GridTreeControl; GTC.ExpandAllNodes(); }