Example #1
0
        /// <summary>
        /// Set default settings.
        /// </summary>
        private void SetDefaultSettings()
        {
            // TODO: Save in user config file
            // TODO: Read user config file
            // TODO: Use form to change

            // Tiles settings:
            this.axMap1.Tiles.AutodetectProxy();
            this.axMap1.Tiles.DoCaching[tkCacheType.Disk] = true;

            // probably better to turn if off otherwise on second run nothing will be downloaded (everything in cache)
            this.axMap1.Tiles.UseCache[tkCacheType.Disk] = false;
            this.axMap1.Tiles.UseServer = true;

            var gs = new GlobalSettingsClass
            {
                DefaultColorSchemeForGrids = PredefinedColorScheme.FallLeaves,
                GeometryEngine             = tkGeometryEngine.engineGeos,
                GridProxyFormat            = tkGridProxyFormat.gpfTiffProxy,
                GridProxyMode             = tkGridProxyMode.gpmAuto,
                RandomColorSchemeForGrids = true,
                RasterOverviewCreation    = tkRasterOverviewCreation.rocYes,
                RasterOverviewResampling  = tkGDALResamplingMethod.grmGauss,
                SaveGridColorSchemeToFile = true,
                ShapeInputValidationMode  = tkShapeValidationMode.TryFixProceedOnFailure,
                TiffCompression           = tkTiffCompression.tkmJPEG,
                ZoomToFirstLayer          = true,
                ImageDownsamplingMode     = tkInterpolationMode.imBilinear,
                ImageUpsamplingMode       = tkInterpolationMode.imHighQualityBilinear
            };

            this.statusStripProgressBar.Minimum = 0;
            this.statusStripProgressBar.Maximum = 100;

            // To enable coordinates in status strip:
            this.axMap1.SendMouseMove = true;

            // What to show on the map:
            this.axMap1.ShowCoordinates    = tkCoordinatesDisplay.cdmAuto;
            this.axMap1.ShowRedrawTime     = false;
            this.axMap1.ShowVersionNumber  = true;
            this.axMap1.ShowZoomBar        = true;
            this.axMap1.AnimationOnZooming = tkCustomState.csAuto;
            this.axMap1.InertiaOnPanning   = tkCustomState.csAuto;
        }
Example #2
0
        public DocumentsForm(PatientViewForm patientViewForm, PatientClass patientInfo, GlobalSettingsClass globalSettings)
        {
            InitializeComponent();

            _patientViewForm = patientViewForm;
            _patientInfo     = patientInfo;
            _globalSettings  = globalSettings;
            _patientViewForm.SelectedDocument = string.Empty;
            _additionalDocumentsFolderPath    = Path.Combine(Application.StartupPath, AdditionalDocumentsFolderName);
        }