public void ResolutionChangeHandler(ResolutionChangeEventArgs resolutionChangeEventArgs)
 {
     if (ResolutionChange != null)
     {
         ResolutionChange(resolutionChangeEventArgs);
     }
 }
        private void SafeInvokeChangeResolution(ResolutionChangeEventArgs resolutionChangeEventArgs)
        {
            if (ResolutionChanged == null)
            {
                return;         //No Listeners
            }
            ResolutionChangeEvent listener = null;

            Delegate[] dels = ResolutionChanged.GetInvocationList();

            foreach (Delegate del in dels)
            {
                try
                {
                    listener = (ResolutionChangeEvent)del;
                    listener.Invoke(resolutionChangeEventArgs);
                }
                catch (Exception)
                {
                    //Could not reach the destination, so remove it
                    //from the list
                    ResolutionChanged -= listener;
                }
            }
        }