internal void OnFinishUnloading() { Debug.Assert(IsUnloading, $"Level: {Name}"); Debug.Assert(!IsLoading, $"Level: {Name}"); Debug.Assert(IsLoaded, $"Level: {Name}"); IsUnloading = false; IsLoaded = false; OnUnloaded?.Invoke(this); }
protected void OnFinishedUnloading() { if (HUD != null) { HUD.Retire(); } ActiveState = WIActiveState.Invisible; //unloaded just means unloaded, not actually removed //so don't tell our stack that we've been removed //but do tell the group! Group.UnloadChildItem(this); //this will call OnRemovedFromGroup OnUnloaded.SafeInvoke(); //now scripts will start unloading their stuff var enumerator = mScripts.Values.GetEnumerator(); while (enumerator.MoveNext()) { //foreach (WIScript script in mScripts.Values) { enumerator.Current.enabled = false; } StopAllCoroutines(); }
void IMenuNavigationHook.InvokeOnUnloaded(object sender, object args) { OnUnloaded?.Invoke(sender, args); }
private void OnUnloadedHandler(object sender, RoutedEventArgs routedEventArgs) { OnUnloaded?.Invoke(sender, null); }
public MemView() { InitializeComponent(); Loaded += (sender, args) => OnLoaded?.Invoke(); Unloaded += (sender, args) => OnUnloaded?.Invoke(); }