コード例 #1
0
        private void ViewGridfile()
        {
            this.BeginInvoke(new UpdateProgressBarDelegate(UpdateProgressBarToMarquee));
            MessageBox.Show("即将导入大数据,可能会出现界面无响应的情况,请耐心等待,点击确定键继续");
            GridBoundsAndFilenames temGrid = new GridBoundsAndFilenames();

            grd.Open((string)Map.Tag);

            temGrid.XMin          = grd.Extents.xMin;
            temGrid.XMax          = grd.Extents.xMax;
            temGrid.YMin          = grd.Extents.yMin;
            temGrid.YMax          = grd.Extents.yMax;
            temGrid.GridFileNames = grd.Filename;
            grdBndFilenames.Add(temGrid);
            Utils           u   = new Utils();
            GridColorScheme sch = new GridColorScheme();

            sch.UsePredefined(-200, 9000, PredefinedColorScheme.ReversedRainbow);
            sch.ApplyColoringType(ColoringType.Hillshade);



            //MessageBox.Show("即将导入大数据,可能会出现界面无响应的情况,请耐心等待,点击确定键继续");
            //GridImage = u.GridToImage(temThreadGrid, sch);
            //gridImages.Add(GridImage);
            this.BeginInvoke(new UpdateProgressBarDelegate(UpdateProgressBarToBlocks));
            MessageBox.Show("导入完成");
        }
コード例 #2
0
        public void Layers_LoadedGridConstructorTest()
        {
            GridColorScheme ColorScheme = null; // TODO: Initialize to an appropriate value
            Grid            Object      = null; // TODO: Initialize to an appropriate value

            Layers.LoadedGrid target = new Layers.LoadedGrid(ColorScheme, Object);
            Assert.Inconclusive("TODO: Implement code to verify target");
        }
コード例 #3
0
 internal RasterColorScheme(GridColorScheme scheme)
 {
     _scheme = scheme;
     if (scheme == null)
     {
         throw new NullReferenceException("Internal reference is null.");
     }
 }
コード例 #4
0
        public void InitializeControlTest()
        {
            ColoringSchemeViewer target         = new ColoringSchemeViewer(); // TODO: Initialize to an appropriate value
            GridColorScheme      ColoringScheme = null;                       // TODO: Initialize to an appropriate value

            target.InitializeControl(ColoringScheme);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #5
0
        public void ColoringSchemesAreEqualTest()
        {
            GridColorScheme LoadedScheme = null;         // TODO: Initialize to an appropriate value
            string          DiskScheme   = string.Empty; // TODO: Initialize to an appropriate value
            bool            expected     = false;        // TODO: Initialize to an appropriate value
            bool            actual;

            actual = ColoringSchemeTools.ColoringSchemesAreEqual(LoadedScheme, DiskScheme);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #6
0
        public void ExportSchemeTest2()
        {
            GridColorScheme Scheme   = null;  // TODO: Initialize to an appropriate value
            XmlDocument     RootDoc  = null;  // TODO: Initialize to an appropriate value
            XmlElement      Parent   = null;  // TODO: Initialize to an appropriate value
            bool            expected = false; // TODO: Initialize to an appropriate value
            bool            actual;

            actual = ColoringSchemeTools_Accessor.ExportScheme(Scheme, RootDoc, Parent);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #7
0
        public void GenerateGridColorSchemeTest()
        {
            Layers_Accessor target                 = new Layers_Accessor(); // TODO: Initialize to an appropriate value
            Grid            newGrid                = null;                  // TODO: Initialize to an appropriate value
            Grid            newGridExpected        = null;                  // TODO: Initialize to an appropriate value
            GridColorScheme GrdColorScheme         = null;                  // TODO: Initialize to an appropriate value
            GridColorScheme GrdColorSchemeExpected = null;                  // TODO: Initialize to an appropriate value

            target.GenerateGridColorScheme(ref newGrid, ref GrdColorScheme);
            Assert.AreEqual(newGridExpected, newGrid);
            Assert.AreEqual(GrdColorSchemeExpected, GrdColorScheme);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #8
0
        public void RebuildGridLayerTest()
        {
            Layers          target      = new Layers(); // TODO: Initialize to an appropriate value
            int             LayerHandle = 0;            // TODO: Initialize to an appropriate value
            Grid            GridObject  = null;         // TODO: Initialize to an appropriate value
            GridColorScheme ColorScheme = null;         // TODO: Initialize to an appropriate value
            bool            expected    = false;        // TODO: Initialize to an appropriate value
            bool            actual;

            actual = target.RebuildGridLayer(LayerHandle, GridObject, ColorScheme);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #9
0
        public void ImportSchemeTest2()
        {
            GridColorScheme sch         = null;  // TODO: Initialize to an appropriate value
            GridColorScheme schExpected = null;  // TODO: Initialize to an appropriate value
            XmlElement      e           = null;  // TODO: Initialize to an appropriate value
            bool            expected    = false; // TODO: Initialize to an appropriate value
            bool            actual;

            actual = ColoringSchemeTools.ImportScheme(ref sch, e);
            Assert.AreEqual(schExpected, sch);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #10
0
        public void AddTest8()
        {
            Layers          target             = new Layers(); // TODO: Initialize to an appropriate value
            Grid            GridObject         = null;         // TODO: Initialize to an appropriate value
            Grid            GridObjectExpected = null;         // TODO: Initialize to an appropriate value
            GridColorScheme ColorScheme        = null;         // TODO: Initialize to an appropriate value

            MapWindow.Interfaces.Layer expected = null;        // TODO: Initialize to an appropriate value
            MapWindow.Interfaces.Layer actual;
            actual = target.Add(ref GridObject, ColorScheme);
            Assert.AreEqual(GridObjectExpected, GridObject);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #11
0
        public void ImportSchemeTest()
        {
            GridColorScheme gsh               = null;         // TODO: Initialize to an appropriate value
            GridColorScheme gshExpected       = null;         // TODO: Initialize to an appropriate value
            string          Filename          = string.Empty; // TODO: Initialize to an appropriate value
            string          GridName          = string.Empty; // TODO: Initialize to an appropriate value
            string          GridNameExpected  = string.Empty; // TODO: Initialize to an appropriate value
            string          GroupName         = string.Empty; // TODO: Initialize to an appropriate value
            string          GroupNameExpected = string.Empty; // TODO: Initialize to an appropriate value
            object          expected          = null;         // TODO: Initialize to an appropriate value
            object          actual;

            actual = ColoringSchemeTools.ImportScheme(ref gsh, Filename, ref GridName, ref GroupName);
            Assert.AreEqual(gshExpected, gsh);
            Assert.AreEqual(GridNameExpected, GridName);
            Assert.AreEqual(GroupNameExpected, GroupName);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #12
0
        public void GetImageRepTest()
        {
            Layers target   = new Layers();                // TODO: Initialize to an appropriate value
            string filename = string.Empty;                // TODO: Initialize to an appropriate value

            MapWinGIS.Image newImage               = null; // TODO: Initialize to an appropriate value
            MapWinGIS.Image newImageExpected       = null; // TODO: Initialize to an appropriate value
            Grid            newGrid                = null; // TODO: Initialize to an appropriate value
            Grid            newGridExpected        = null; // TODO: Initialize to an appropriate value
            GridColorScheme GrdColorScheme         = null; // TODO: Initialize to an appropriate value
            GridColorScheme GrdColorSchemeExpected = null; // TODO: Initialize to an appropriate value
            ICallback       cb         = null;             // TODO: Initialize to an appropriate value
            ICallback       cbExpected = null;             // TODO: Initialize to an appropriate value

            target.GetImageRep(filename, ref newImage, ref newGrid, ref GrdColorScheme, ref cb);
            Assert.AreEqual(newImageExpected, newImage);
            Assert.AreEqual(newGridExpected, newGrid);
            Assert.AreEqual(GrdColorSchemeExpected, GrdColorScheme);
            Assert.AreEqual(cbExpected, cb);
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
コード例 #13
0
        protected override void Initialize()
        {
            InitializeComponent();
            gridControl1.Controller = GetController <OnlineMarketViewController>();
            var colorScheme = new GridColorScheme()
            {
                ColumnIndex = gridControl1.Columns["ColumnOrder"].Index,
                Scope       = ColorSchemeScope.RowBackColor,
                Colors      = new[] { Color.Orange }
            }.WithEquityCondition();

            gridControl1.Hightlighter.AddScheme(colorScheme);

            var priceScheme = new GridColorScheme()
            {
                ColumnIndex = gridControl1.Columns["ColumnPrice"].Index,
                Scope       = ColorSchemeScope.RowForeColor,
                Colors      = new[] { System.Drawing.SystemColors.Window, Color.Blue }
            }.WithDefaultCondition();

            gridControl1.Hightlighter.AddScheme(priceScheme);
        }
コード例 #14
0
        public void AddLayerTest()
        {
            MapWindow.Layers target              = new MapWindow.Layers(); // TODO: Initialize to an appropriate value
            object           ObjectOrFilename    = null;                   // TODO: Initialize to an appropriate value
            string           LayerName           = string.Empty;           // TODO: Initialize to an appropriate value
            int             Group                = 0;                      // TODO: Initialize to an appropriate value
            bool            LayerVisible         = false;                  // TODO: Initialize to an appropriate value
            int             Color                = 0;                      // TODO: Initialize to an appropriate value
            int             OutlineColor         = 0;                      // TODO: Initialize to an appropriate value
            bool            DrawFill             = false;                  // TODO: Initialize to an appropriate value
            float           LineOrPointSize      = 0F;                     // TODO: Initialize to an appropriate value
            tkPointType     PointType            = new tkPointType();      // TODO: Initialize to an appropriate value
            GridColorScheme GrdColorScheme       = null;                   // TODO: Initialize to an appropriate value
            bool            LegendVisible        = false;                  // TODO: Initialize to an appropriate value
            bool            PositionFromSelected = false;                  // TODO: Initialize to an appropriate value

            MapWindow.Interfaces.Layer[] expected = null;                  // TODO: Initialize to an appropriate value
            MapWindow.Interfaces.Layer[] actual;
            actual = target.AddLayer(ObjectOrFilename, LayerName, Group, LayerVisible, Color, OutlineColor, DrawFill, LineOrPointSize, PointType, GrdColorScheme, LegendVisible, PositionFromSelected);
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }
コード例 #15
0
 public RasterColorScheme()
 {
     _scheme = new GridColorScheme();
 }
コード例 #16
0
ファイル: Utils.cs プロジェクト: swimm86/MapWinGIS
 /// <summary>
 /// Creates an image proxy for grid visualization.
 /// </summary>
 /// <param name="Grid">Grid to create proxy for.</param>
 /// <param name="ci">Color scheme which defines the mapping of values to colors.</param>
 /// <param name="imageFormat">The format of output image.</param>
 /// <param name="InRam">True in case in-memory image should be created, otherwise it will saved to the drive.</param>
 /// <param name="cBack">Callback interface.</param>
 /// <returns>Resulting image.</returns>
 /// <remarks>The filename of the resulting image (inRam = false) is set automatically: for example, grid.asc -> grid_proxy.bmp.
 /// In case of multi-band grids an image will be created for the active band, determined from Grid.ActiveBandIndex property.
 /// For bmp output format a world file will be written along with resulting file. For GTiff format the same values
 /// will be embedded in the file itself.</remarks>
 /// \new491 Added in version 4.9.1
 public Image GridToImage2(Grid Grid, GridColorScheme ci, tkGridProxyFormat imageFormat, bool InRam, ICallback cBack)
 {
     throw new NotImplementedException();
 }
コード例 #17
0
ファイル: Utils.cs プロジェクト: swimm86/MapWinGIS
 /// <summary>
 /// Creates an image from the grid using the given grid color scheme.
 /// </summary>
 /// <param name="Grid">The grid to use to create the image. </param>
 /// <param name="cScheme">The grid color scheme to use to create an image from the grid.</param>
 /// <param name="cBack">The ICallback object which will receive progress and error messages while
 /// the image is being created from the grid.</param>
 /// <returns>The image created from the grid.</returns>
 public Image GridToImage(Grid Grid, GridColorScheme cScheme, ICallback cBack)
 {
     throw new NotImplementedException();
 }
コード例 #18
0
 /// <summary>
 /// Opens grid as image.
 /// </summary>
 /// <param name="Scheme">Colour scheme which specifies how grid will be visualized.</param>
 /// <param name="proxyMode">Proxy mode to be used.</param>
 /// <param name="cBack">Callback interface.</param>
 /// <returns>Resulting image object or null if the operation failed.</returns>
 /// <remarks>Depending on the proxy mode, grid datasource can be opened directly, or a proxy file can be created.</remarks>
 /// \new491 Added in version 4.9.1
 public Image OpenAsImage(GridColorScheme Scheme, tkGridProxyMode proxyMode = tkGridProxyMode.gpmAuto, ICallback cBack = null)
 {
     throw new NotImplementedException();
 }
コード例 #19
0
 /// <summary>
 /// Creates a proxy image file to display grid data.
 /// </summary>
 /// <param name="ColorScheme">Colour scheme which specified how the data will be visualized.</param>
 /// <returns>Created image proxy or null if the operation failed.</returns>
 /// <remarks>The format of proxy can be changed in GlobalSettings.GridProxyFormat.</remarks>
 /// \new491 Added in version 4.9.1
 public Image CreateImageProxy(GridColorScheme ColorScheme)
 {
     throw new NotImplementedException();
 }