Exemple #1
0
 protected override void OnUnloaded()
 {
     base.OnUnloaded();
     DataContext = null;
     entityVMStack.Clear();
     windowInputContext?.Stop();
     windowInputContext = null;
     if (Instance == this)
     {
         Instance = null;
     }
 }
Exemple #2
0
 public static void Open(ProtoEntityViewModel entityViewModel)
 {
     if (Instance == null)
     {
         var instance = new DetailsWindow();
         instance.entityVMStack.Push(entityViewModel);
         Instance = instance;
         Api.Client.UI.LayoutRootChildren.Add(instance);
     }
     else
     {
         if (Instance.entityVMStack.Peek() != entityViewModel)
         {
             Instance.entityVMStack.Push(entityViewModel);
             Instance.UpdateCount();
             Instance.DataContext = Instance.entityVMStack.Peek();
         }
     }
 }