Beispiel #1
0
        /// <summary>
        /// Open initialized component, add to the components collection.
        /// </summary>
        private void OpenComponent(ComponentVM vm)
        {
            var index = Math.Max(0, Components.Count - 1);

            Components.Insert(index, vm);
            Components.SelectedItem = Components[index];
        }
Beispiel #2
0
 /// <summary>
 /// Close component, remove from collection and unload.
 /// </summary>
 private void ExecuteCloseComponent(ComponentVM component)
 {
     if ((component != null) && Components.Contains(component))
     {
         Components.Remove(component);
         component.Unload();
     }
 }