public static void Open() { if (Instance == null) { var instance = new FishingCalculatorWindow(); Instance = instance; Api.Client.UI.LayoutRootChildren.Add(instance); } Instance.Window.Open(); }
protected override void OnUnloaded() { base.OnUnloaded(); DataContext = null; viewModel = null; if (Instance == this) { Instance = null; } }