/// <summary>
 /// Route the control's OnApplyCaptionSettings event
 /// </summary>
 /// <param name="sender">the CaptionSettingsControl</param>
 /// <param name="e">the custom caption settings event arguments</param>
 private void Control_OnApplyCaptionSettings(object sender, CustomCaptionSettingsEventArgs e)
 {
     if (this.OnApplyCaptionSettings != null)
     {
         this.OnApplyCaptionSettings(sender, e);
     }
 }
Example #2
0
        /// <summary>
        /// Apply the caption settings
        /// </summary>
        /// <param name="sender">the sender</param>
        /// <param name="e">the custom caption settings event arguments</param>
        private void OnApplyCaptionSettings(object sender, CustomCaptionSettingsEventArgs e)
        {
            this.IsDefault = e.Settings == null;

            if (!this.IsDefault)
            {
                Windows.Storage.ApplicationData.Current.LocalSettings.Values.Remove(LocalSettingsKey);
            }

            this.ApplyCaptionSettings(e.Settings);
        }
Example #3
0
        /// <summary>
        /// Activate the plug-in
        /// </summary>
        /// <returns>true if the CaptionsPlugIn is also installed</returns>
        protected override bool OnActivate()
        {
            this.Activate();

            if (this.OnLoadCaptionSettings != null)
            {
                var eventArgs = new CustomCaptionSettingsEventArgs(this.Settings);

                this.OnLoadCaptionSettings(this, eventArgs);

                this.Settings = eventArgs.Settings;
            }

            this.ApplyCaptionSettings(this.Settings);

            return(true);
        }
        /// <summary>
        /// Apply the caption settings from the control to the TTML
        /// </summary>
        /// <param name="sender">the caption settings control</param>
        /// <param name="e">the custom caption settings event arguments</param>
        private void OnApplyCaptionSettings(object sender, CustomCaptionSettingsEventArgs e)
        {
            this.IsDefault = e.Settings == null;

            this.ApplyCaptionSettings(e.Settings);
        }