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(); }
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(); }
public static bool GetProperty(IPropertyState state) { if (state == null) { throw new ArgumentNullException("state"); } return(c_manager.GetProperty(state)); }
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); }
static QuantizationTest() { PROPERTY_QUANTIZATION_MEMORY_LIMIT = Context.RegisterOption(Context.OptionCategory.Tiling, "QuantizationMemoryLimit", ByteSizesSmall.MB_16); }
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); }
static ProcessingSet() { PROPERTY_SEGMENT_SIZE = Context.RegisterOption(Context.OptionCategory.Tiling, "MaxSegmentSize", ByteSizesSmall.MB_256); PROPERTY_REUSE_TILING = Context.RegisterOption(Context.OptionCategory.Tiling, "UseCache", true); }