Exemplo n.º 1
0
 protected override void OnUnloaded()
 {
     base.OnUnloaded();
     DataContext = null;
     entityVMStack.Clear();
     windowInputContext?.Stop();
     windowInputContext = null;
     if (Instance == this)
     {
         Instance = null;
     }
 }
Exemplo n.º 2
0
 public static void Open(ProtoEntityViewModel entityViewModel)
 {
     if (Instance == null)
     {
         var instance = new WindowCNEIdetails();
         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();
         }
     }
 }