Example #1
0
 /// <summary>
 /// Set the state of viewer options, including sunlight, Street View, and historical imagery.
 /// </summary>
 /// <param name="option">
 /// The ViewerOption.
 /// </param>
 /// <param name="value">
 /// The ViewerOptionsValue.
 /// </param>
 public void SetOption(ViewerOption option, OptionState value)
 {
     try
     {
         this.viewerOptions.setOption((int)option, (int)value);
         this.ApplyOptions();
     }
     catch (COMException)
     {
     }
 }
Example #2
0
        /// <summary>
        /// Returns the current state of the specified option.
        /// </summary>
        /// <param name="option">
        /// The ViewerOption.
        /// </param>
        /// <returns>
        /// The current ViewerOptionsValue for the specified ViewerOption
        /// </returns>
        public OptionState GetOption(ViewerOption option)
        {
            try
            {
                int i = this.viewerOptions.getOption((int)option);
                if (Enum.IsDefined(typeof(OptionState), option))
                {
                    return((OptionState)i);
                }
            }
            catch (COMException)
            {
            }

            return(OptionState.Default);
        }
Example #3
0
 public string ViewerOptionsConverter(ViewerOption src, Language lang) =>
 Convert <string>(new ViewerOptionsConverter(), src, lang);
 /// <summary>
 /// Set the state of viewer options, including sunlight, Street View, and historical imagery.
 /// </summary>
 /// <param name="option">
 /// The ViewerOption. 
 /// </param>
 /// <param name="value">
 /// The ViewerOptionsValue. 
 /// </param>
 public void SetOption(ViewerOption option, OptionState value)
 {
     try
     {
         this.viewerOptions.setOption((int)option, (int)value);
         this.ApplyOptions();
     }
     catch (COMException)
     {
     }
 }
        /// <summary>
        /// Returns the current state of the specified option.
        /// </summary>
        /// <param name="option">
        /// The ViewerOption. 
        /// </param>
        /// <returns>
        /// The current ViewerOptionsValue for the specified ViewerOption 
        /// </returns>
        public OptionState GetOption(ViewerOption option)
        {
            try
            {
                int i = this.viewerOptions.getOption((int)option);
                if (Enum.IsDefined(typeof(OptionState), option))
                {
                    return (OptionState)i;
                }
            }
            catch (COMException)
            {
            }

            return OptionState.Default;
        }