private void AnimationExplorerWPF_OnClosing(object sender, CancelEventArgs e) { //if (!GameController.TryGetME3Process(out _)) //{ // string asiPath = InteropHelper.GetInteropAsiWritePath(); // if (File.Exists(asiPath)) // { // File.Delete(asiPath); // } //} ME3OpenTimer.Stop(); ME3OpenTimer.Tick -= CheckIfME3Open; GameController.RecieveME3Message -= GameController_RecieveME3Message; DataContext = null; Instance = null; }
public AnimationViewer() : base("Animation Viewer", true) { if (Instance != null) { throw new Exception("Can only have one instance of AnimViewer open!"); } Instance = this; DataContext = this; InitializeComponent(); LoadCommands(); GameController.RecieveME3Message += GameController_RecieveME3Message; ME3OpenTimer = new DispatcherTimer { Interval = TimeSpan.FromSeconds(1) }; ME3OpenTimer.Tick += CheckIfME3Open; }