Exemplo n.º 1
0
        /// <summary>
        /// The Language changed event callback function.
        /// </summary>
        /// <param name="source">The application instance.</param>
        /// <param name="e">The event argument for LanguageChanged.</param>
        private void OnLanguageChanged(object source, NUIApplicationLanguageChangedEventArgs e)
        {
            Log.Info("NUI", "NUICorebackend OnLanguageChanged Called");
            var handler = Handlers[EventType.LocaleChanged] as Action <LocaleChangedEventArgs>;

            handler?.Invoke(new LocaleChangedEventArgs((source as Application)?.GetLanguage()));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Language changed event callback function.
        /// </summary>
        /// <param name="source">Application instance</param>
        /// <param name="e">Event argument for LanguageChanged</param>
        private void OnLanguageChanged(object source, NUIApplicationLanguageChangedEventArgs e)
        {
            Log.Debug("NUI", "NUIWatchCorebackend OnLanguageChanged Called");
            var handler = Handlers[EventType.LocaleChanged] as Action <LocaleChangedEventArgs>;

            // Need to make new signal return in native to return right value.
            handler?.Invoke(new LocaleChangedEventArgs(""));
        }
Exemplo n.º 3
0
 // Callback for Application LanguageChangedSignal
 private void OnNUIApplicationLanguageChanged(IntPtr data)
 {
     if (_applicationLanguageChangedEventHandler != null)
     {
         NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs();
         e.Application = this;
         _applicationLanguageChangedEventHandler.Invoke(this, e);
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// The Language changed event callback function.
        /// </summary>
        /// <param name="source">The application instance.</param>
        /// <param name="e">The event argument for LanguageChanged.</param>
        private void OnLanguageChanged(object source, NUIApplicationLanguageChangedEventArgs e)
        {
            var handler = Handlers[EventType.LocaleChanged] as Action <LocaleChangedEventArgs>;

            handler?.Invoke(new LocaleChangedEventArgs(e.Application.GetLanguage()));
        }