public Preview3D() { InitializeComponent(); m_id = IdentityManager.AcquireIdentity(GetType().Name); m_tileInfo = new Dictionary <PointCloudTile, TileInfo3D>(); //m_lowResMap = new Dictionary<PointCloudTile, Model3D>(); m_meshTileMap = new Dictionary <GeometryModel3D, PointCloudTile>(); m_loadedTiles = new Dictionary <PointCloudTile, GeometryModel3D>(); m_loadedTileBuffers = new Dictionary <PointCloudTile, byte[]>(); m_solidBrush = new SolidColorBrush(Colors.DarkKhaki); m_solidBrush.Freeze(); m_backgroundWorker = new ManagedBackgroundWorker(); m_backgroundWorker.WorkerReportsProgress = true; m_backgroundWorker.WorkerSupportsCancellation = true; m_backgroundWorker.DoWork += OnBackgroundDoWork; m_backgroundWorker.ProgressChanged += OnBackgroundProgressChanged; m_backgroundWorker.RunWorkerCompleted += OnBackgroundRunWorkerCompleted; m_timer = new Timer(); m_timer.Interval = 10; m_timer.Elapsed += OnTimerElapsed; }
public Cloud3D() { InitializeComponent(); this.IsEnabled = false; m_backgroundWorker = new ManagedBackgroundWorker(); m_backgroundWorker.WorkerReportsProgress = true; m_backgroundWorker.WorkerSupportsCancellation = true; m_backgroundWorker.DoWork += OnBackgroundDoWork; m_backgroundWorker.ProgressChanged += OnBackgroundProgressChanged; m_backgroundWorker.RunWorkerCompleted += OnBackgroundRunWorkerCompleted; }
static Context() { Config.ContextStarted = true; ContextManager.SetWriteLine(WriteLine); var stopwatch = new Stopwatch(); stopwatch.Start(); // this should go somewhere on startup // also, verify any other platform specs if (!BitConverter.IsLittleEndian) { throw new NotSupportedException(); } if (Config.ShowConsole) { WinConsole.Initialize(); c_writeLineAction = WinConsole.WriteLine; } else { Action <string> defaultWriteLine = Console.WriteLine; //Trace.WriteLine; c_writeLineAction = (s, args) => defaultWriteLine(string.Format(s, args)); } c_registeredProperties = new Dictionary <PropertyName, IPropertyState>(); c_registeredPropertiesList = new List <IPropertyState>(); c_sources = new Dictionary <PointCloudTileSource, FileHandlerBase>(); c_loadedPaths = new Dictionary <string, FileHandlerBase>(StringComparer.OrdinalIgnoreCase); c_queue = new ProcessingQueue(); c_backgroundWorker = new ManagedBackgroundWorker(); c_backgroundWorker.WorkerReportsProgress = true; c_backgroundWorker.WorkerSupportsCancellation = true; c_backgroundWorker.DoWork += OnBackgroundDoWork; c_backgroundWorker.ProgressChanged += OnBackgroundProgressChanged; c_backgroundWorker.RunWorkerCompleted += OnBackgroundRunWorkerCompleted; Config.Write(); #warning EXTENSION SEARCH IS AUTOMATIC (for testing) System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor(typeof(ExtensionManager).TypeHandle); //if (Config.EnableExtensionDiscovery) // RegisterExtensions(); if (Config.EnableFactoryDiscovery) { ExtensionManager.ProcessLoadedTypesInitialize("Factories", typeof(IFactory)); } if (Config.EnablePropertyDiscovery) { ExtensionManager.ProcessLoadedTypesInitialize("Properties", typeof(IPropertyContainer)); } long startupElapsed = stopwatch.ElapsedMilliseconds; stopwatch.Restart(); if (Config.EnableInstrumentation) { SystemInfo.Write(); } stopwatch.Stop(); WriteLine("[Startup]"); WriteLine(" Discover : {0}ms", startupElapsed); WriteLine(" Instrument : {0}ms", stopwatch.ElapsedMilliseconds); WriteLine(" Total : {0}ms", stopwatch.ElapsedMilliseconds + startupElapsed); WriteLine(); }