// Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread.
DisposeQueue.Instance.Initialize();
- _applicationInitEventHandler?.Invoke(this, new NUIApplicationInitEventArgs());
-
+ if(_applicationInitEventHandler != null)
+ {
+ NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs();
+ e.Application = this;
+ _applicationInitEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application TerminateSignal
private void OnNUIApplicationTerminate(IntPtr data)
{
- _applicationTerminateEventHandler?.Invoke(this, new NUIApplicationTerminatingEventArgs());
+ if(_applicationTerminateEventHandler != null)
+ {
+ NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs();
+ e.Application = this;
+ _applicationTerminateEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application PauseSignal
private void OnNUIApplicationPause(IntPtr data)
{
- _applicationPauseEventHandler?.Invoke(this, new NUIApplicationPausedEventArgs());
+ if(_applicationPauseEventHandler != null)
+ {
+ NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs();
+ e.Application = this;
+ _applicationPauseEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application ResumeSignal
private void OnNUIApplicationResume(IntPtr data)
{
- _applicationResumeEventHandler?.Invoke(this, new NUIApplicationResumedEventArgs());
+ if(_applicationResumeEventHandler != null)
+ {
+ NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs();
+ e.Application = this;
+ _applicationResumeEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application ResetSignal
private void OnNUIApplicationReset(IntPtr data)
{
- _applicationResetEventHandler?.Invoke(this, new NUIApplicationResetEventArgs());
+ if(_applicationResetEventHandler != null)
+ {
+ NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs();
+ e.Application = this;
+ _applicationResetEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application ResizeSignal
private void OnNUIApplicationResize(IntPtr data)
{
- _applicationResizeEventHandler?.Invoke(this, new NUIApplicationResizedEventArgs());
+ if(_applicationResizeEventHandler != null)
+ {
+ NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs();
+ e.Application = this;
+ _applicationResizeEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application LanguageChangedSignal
private void OnNUIApplicationLanguageChanged(IntPtr data)
{
- _applicationLanguageChangedEventHandler?.Invoke(this, new NUIApplicationLanguageChangedEventArgs());
+ if(_applicationLanguageChangedEventHandler != null)
+ {
+ NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
+ e.Application = this;
+ _applicationLanguageChangedEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application RegionChangedSignal
private void OnNUIApplicationRegionChanged(IntPtr data)
{
- _applicationRegionChangedEventHandler?.Invoke(this, new NUIApplicationRegionChangedEventArgs());
+ if(_applicationRegionChangedEventHandler != null)
+ {
+ NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs();
+ e.Application = this;
+ _applicationRegionChangedEventHandler.Invoke(this, e);
+ }
}
/**
// Callback for Application AppControlSignal
private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp)
{
- NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
- e.VoidP = voidp;
- _applicationAppControlEventHandler?.Invoke(this, e);
+ if(_applicationAppControlEventHandler != null)
+ {
+ NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs();
+ e.VoidP = voidp;
+ e.Application = this;
+ _applicationAppControlEventHandler.Invoke(this, e);
+ }
}
private static Application _instance; // singleton