/// <summary> /// Handle node actions /// </summary> /// <param name="action">action that was triggered</param> /// <param name="status">asynchronous status for updating the console</param> protected override void OnAction(Action action, AsyncStatus status) { switch ((string)action.Tag) { case "AddChild": { ActionScopeNode actionScopeNode = new ActionScopeNode(); actionScopeNode.DisplayName = "Added " + System.DateTime.Now.ToLongTimeString(); actionScopeNode.ImageIndex = 0; this.Children.Add(actionScopeNode); break; } case "AddToRoot": { ActionScopeNode actionScopeNode = new ActionScopeNode(); actionScopeNode.DisplayName = "Added " + System.DateTime.Now.ToLongTimeString(); actionScopeNode.ImageIndex = 0; ((ActionsSnapIn)this.SnapIn).RootNode.Children.Add(actionScopeNode); break; } } }
/// <summary> /// Handle node actions /// </summary> /// <param name="action">action that was triggered</param> /// <param name="status">asynchronous status for updating the console</param> protected override void OnAction(Action action, AsyncStatus status) { switch ((string)action.Tag) { case "AddChild": { ActionScopeNode actionScopeNode = new ActionScopeNode(); actionScopeNode.DisplayName = "Added " + System.DateTime.Now.ToLongTimeString(); actionScopeNode.ImageIndex = 0; this.Children.Add(actionScopeNode); break; } case "AddToRoot": { ActionScopeNode actionScopeNode = new ActionScopeNode(); actionScopeNode.DisplayName = "Added " + System.DateTime.Now.ToLongTimeString(); actionScopeNode.ImageIndex = 0; ((ActionsSnapIn)this.SnapIn).RootNode.Children.Add(actionScopeNode); break; } } }