public SettingsCollection GetDefaultVersionSettings()
        {
            SettingsCollection collection = new SettingsCollection();

            Setting <string> baseUrl = new Setting <string>();

            baseUrl.Key         = "BaseUrl";
            baseUrl.Name        = "Base URL";
            baseUrl.Description = "Base url of the website for the manual.\nPage urls will be appended to this value.";
            baseUrl.Validator   = new UrlValidator();

            collection.TextSettings.Add(baseUrl);

            MultipleChoiceSetting browserSetting = new MultipleChoiceSetting();

            browserSetting.Key         = "BrowserType";
            browserSetting.Name        = "Browser";
            browserSetting.Description = "The browser to use for this version.\n\nFor all browsers:\nThe browser MUST be installed localy on the system.";
            browserSetting.Choices     = new List <KeyValuePair <string, string> >
            {
                new KeyValuePair <string, string>("Chrome", "chrome"),
                new KeyValuePair <string, string>("Firefox", "firefox"),
            };
            browserSetting.Value = "chrome";
            collection.Name      = GetProjectTypeName();
            collection.MultipleChoiceSettings.Add(browserSetting);
            return(collection);
        }
        /// <summary>
        /// Creates a MultiGeoPointProperty. The parameter "controlledObject" provides the owner
        /// of the list.
        /// </summary>
        /// <param name="controlledObject">owner of the list</param>
        /// <param name="resourceId">the resource id to specify a string from the StringTable.
        /// ResourceId+".Label": the Label left of the
        /// edit box. ResourceId+".ShortInfo": a short tooltip text ResourceId+"DetailedInfo":
        /// a longer tooltip text.
        /// </param>
        public MultiGeoPointProperty(IIndexedGeoPoint controlledObject, string resourceId, IFrame frame)
        {
            this.Frame            = frame;
            this.resourceId       = resourceId;
            this.controlledObject = controlledObject;
            prependContextMenue   = null;
            MultipleChoiceSetting formattingZValue = Settings.GlobalSettings.GetValue("Formatting.Coordinate.ZValue") as MultipleChoiceSetting;

            if (formattingZValue != null && formattingZValue.CurrentSelection >= 0)
            {
                displayZComponent = formattingZValue.CurrentSelection == 0;
            }
            else
            {
                displayZComponent = true;
            }
        }
示例#3
0
        private void InitFormat(IFrame frame)
        {
            MultipleChoiceSetting formattingSystem = frame.GetSetting("Formatting.System") as MultipleChoiceSetting;

            if (formattingSystem != null && formattingSystem.CurrentSelection >= 0)
            {
                displayCoordinateSystem = (DisplayCoordinateSystem)formattingSystem.CurrentSelection;
            }
            else
            {
                displayCoordinateSystem = DisplayCoordinateSystem.local;
            }
            MultipleChoiceSetting formattingZValue = frame.GetSetting("Formatting.Coordinate.ZValue") as MultipleChoiceSetting;

            if (formattingZValue != null && formattingZValue.CurrentSelection >= 0)
            {
                displayZComponent = formattingZValue.CurrentSelection == 0;
            }
            else
            {
                displayZComponent = true;
            }
            alwaysAbsoluteCoordinateSystem = false;
            alwaysZComponent = false;
            displayMode      = (DisplayMode)frame.GetIntSetting("Formatting.Vector.Mode", 0);
            numberFormatInfo = (NumberFormatInfo)CultureInfo.CurrentCulture.NumberFormat.Clone();
            int decsym = Settings.GlobalSettings.GetIntValue("Formatting.Decimal", 0); // Systemeinstellung | Punkt | Komma

            // wenn 0, dann unverändert
            if (decsym == 1)
            {
                numberFormatInfo.NumberDecimalSeparator = ".";
            }
            else if (decsym == 2)
            {
                numberFormatInfo.NumberDecimalSeparator = ",";
            }
            numberFormatInfo.NumberDecimalDigits = frame.GetIntSetting("Formatting.Coordinate.Digits", 3);
            componentsDigits = frame.GetIntSetting("Formatting.Coordinate.ComponentsDigits", 3);
            angleMode        = (AngleMode)frame.GetIntSetting("Formatting.Angle.Mode", 0);
            angleDigits      = frame.GetIntSetting("Formatting.Angle.Digits", 3);
            this.Frame       = frame;
        }