Esempio n. 1
0
        static MainWindow()
        {
            SWITCH_TO_LOG_TAB_ON_PROCESSING_START = Context.RegisterOption(Context.OptionCategory.App, "SwitchToLogTabOnProcessingStart", true);

            List<ITileSourceControl> controls = RegisterControls();
            c_controls = controls.OrderBy(c => c.Index).ToArray();
        }
Esempio n. 2
0
        static MainWindow()
        {
            SWITCH_TO_LOG_TAB_ON_PROCESSING_START = Context.RegisterOption(Context.OptionCategory.App, "SwitchToLogTabOnProcessingStart", true);

            List <ITileSourceControl> controls = RegisterControls();

            c_controls = controls.OrderBy(c => c.Index).ToArray();
        }
Esempio n. 3
0
        public static bool GetProperty(IPropertyState state)
        {
            if (state == null)
            {
                throw new ArgumentNullException("state");
            }

            return(c_manager.GetProperty(state));
        }
Esempio n. 4
0
        public static IPropertyState <T> RegisterOption <T>(OptionCategory category, string name, T defaultValue)
        {
            if (!Enum.IsDefined(typeof(OptionCategory), category))
            {
                throw new ArgumentException("Invalid category.");
            }

            if (string.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Option registration is empty.", "name");
            }

            if (name.IndexOfAny(new[] { '.', '\\', ' ', ':' }) > 0)
            {
                throw new ArgumentException("Option registration contains invalid characters.", "name");
            }

            string categoryName = Enum.GetName(typeof(OptionCategory), category);
            string optionName   = String.Format("{0}.{1}", categoryName, name);

            IPropertyState <T> state = null;
            var propertyName         = PropertyManager.CreatePropertyName(optionName);

            if (c_registeredProperties.ContainsKey(propertyName))
            {
                state = c_registeredProperties[propertyName] as IPropertyState <T>;
                if (state == null)
                {
                    throw new Exception("Duplicate option registration with a different type for {0}.");
                }

                WriteLine("Duplicate option registration: ", propertyName);
            }
            else
            {
                state = PropertyManager.Create(propertyName, defaultValue);
                c_registeredProperties.Add(propertyName, state);
                c_registeredPropertiesList.Add(state);
            }

            return(state);
        }
Esempio n. 5
0
 static QuantizationTest()
 {
     PROPERTY_QUANTIZATION_MEMORY_LIMIT = Context.RegisterOption(Context.OptionCategory.Tiling, "QuantizationMemoryLimit", ByteSizesSmall.MB_16);
 }
Esempio n. 6
0
 static PointCloudTileManager()
 {
     PROPERTY_DESIRED_TILE_COUNT       = Context.RegisterOption(Context.OptionCategory.Tiling, "DesiredTilePoints", 40000);
     PROPERTY_MAX_TILES_FOR_ESTIMATION = Context.RegisterOption(Context.OptionCategory.Tiling, "EstimationTilesMax", 10000000);
     PROPERTY_MAX_LOWRES_POINTS        = Context.RegisterOption(Context.OptionCategory.Tiling, "LowResPointsMax", 1000000);
 }
Esempio n. 7
0
 static ProcessingSet()
 {
     PROPERTY_SEGMENT_SIZE = Context.RegisterOption(Context.OptionCategory.Tiling, "MaxSegmentSize", ByteSizesSmall.MB_256);
     PROPERTY_REUSE_TILING = Context.RegisterOption(Context.OptionCategory.Tiling, "UseCache", true);
 }
Esempio n. 8
0
 static PointCloudTileManager()
 {
     PROPERTY_DESIRED_TILE_COUNT = Context.RegisterOption(Context.OptionCategory.Tiling, "DesiredTilePoints", 40000);
     PROPERTY_MAX_TILES_FOR_ESTIMATION = Context.RegisterOption(Context.OptionCategory.Tiling, "EstimationTilesMax", 10000000);
     PROPERTY_MAX_LOWRES_POINTS = Context.RegisterOption(Context.OptionCategory.Tiling, "LowResPointsMax", 1000000);
 }
Esempio n. 9
0
 static ProcessingSet()
 {
     PROPERTY_SEGMENT_SIZE = Context.RegisterOption(Context.OptionCategory.Tiling, "MaxSegmentSize", ByteSizesSmall.MB_256);
     PROPERTY_REUSE_TILING = Context.RegisterOption(Context.OptionCategory.Tiling, "UseCache", true);
 }