Ejemplo n.º 1
0
        public void AddDefaults()
        {
            Grid1D Ox = new Grid1D(10, 3);
            Grid1D Oy = new Grid1D(10, 3);

            v2Datas = new List <V2Data>();
            V2DataOnGrid[]     grid        = new V2DataOnGrid[4];
            V2DataCollection[] collections = new V2DataCollection[4];

            for (int i = 0; i < 3; i++)
            {
                grid[i]        = new V2DataOnGrid("data info2" /*+ i.ToString()*/, 2, Ox, Oy); // test i = 2
                collections[i] = new V2DataCollection("collection info" + i.ToString(), i);
            }

            for (int i = 0; i < 3; i++)
            {
                grid[i].initRandom(0, 100);
                collections[i].initRandom(4, 100, 100, 0, 100);
                this.Add(grid[i]);
                this.Add(collections[i]);
            }

            Grid1D nullOx = new Grid1D(0, 0);
            Grid1D nullOy = new Grid1D(0, 0);

            grid[3]        = new V2DataOnGrid("null", 100, nullOx, nullOy);
            collections[3] = new V2DataCollection("null", 100);

            grid[3].initRandom(0, 100);
            collections[3].initRandom(0, 100, 100, 0, 100);
            this.Add(grid[3]);
            this.Add(collections[3]);
        }
Ejemplo n.º 2
0
        public void AddDefaults()
        {
            Grid1D Ox = new Grid1D(1, 3);
            Grid1D Oy = new Grid1D(1, 3);

            v2Datas = new List <V2Data>();
            V2DataOnGrid[]     mag         = new V2DataOnGrid[4];
            V2DataCollection[] collections = new V2DataCollection[4];
            for (int i = 0; i < 4; i++)
            {
                //mag[i] = new V2DataOnGrid("Data", 123, Ox, Oy);
                //collections[i] = new V2DataCollection("Data", 123);
                mag[i]         = new V2DataOnGrid("Data " + i.ToString(), i, Ox, Oy);
                collections[i] = new V2DataCollection("Collection number: " + i.ToString(), i);
            }
            for (int i = 0; i < 4; i++)
            {
                mag[i].initRandom(0, 10);
                collections[i].initRandom(4, 10, 10, 0, 100);
                this.Add(mag[i]);
                this.Add(collections[i]);
            }

            Grid1D NULLOX = new Grid1D(0, 0);
            Grid1D NULLOY = new Grid1D(0, 0);

            mag[3]         = new V2DataOnGrid("NULL", 10, NULLOX, NULLOY);
            collections[3] = new V2DataCollection("NULL", 10);

            mag[3].initRandom(0, 10);
            collections[3].initRandom(0, 10, 10, 0, 10);
            this.Add(mag[3]);
            this.Add(collections[3]);
        }
Ejemplo n.º 3
0
        public void AddDefaultDataOnGrid()
        {
            Grid1D       Ox   = new Grid1D(10, 3);
            Grid1D       Oy   = new Grid1D(10, 3);
            V2DataOnGrid grid = new V2DataOnGrid("data info ", 2, Ox, Oy);

            grid.initRandom(0, 100);
            this.Add(grid);
        }
Ejemplo n.º 4
0
 public void AddElementFromFile(string filename)
 {
     try
     {
         V2DataOnGrid datas = new V2DataOnGrid(filename);
         this.Add(datas);
     }
     catch (Exception ex)
     {
         this.ErrorMessage = "Add failed:  " + ex.Message;
     }
 }
Ejemplo n.º 5
0
 public void AddElementFromFile(string filename)
 {
     try
     {
         V2DataOnGrid datas = new V2DataOnGrid(filename);
         this.Add(datas);
     }
     catch (Exception ex)
     {
         this.ErrorMessage = "Add Element from file: " + ex.Message;
         //OnPropertyChanged("ErrorMessage");
     }
 }
Ejemplo n.º 6
0
        public void AddDefaults()
        {
            for (int i = 0; i < 2; ++i)
            {
                V2DataOnGrid v2_data_on_grid = new V2DataOnGrid(0.0, "Default info", new double[] { 0.01, 0.01 }, new int[] { 3, 3 });
                v2_data_on_grid.InitRandom(-10.0f, 10.0f);
                ListData.Add(v2_data_on_grid);
                V2DataCollection v2_data_collection = new V2DataCollection(0.0, "Default info");
                v2_data_collection.InitRandom(3, 10.0f, 10.0f, -10.0f, 10.0f);
                ListData.Add(v2_data_collection);
            }

            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("Averege"));
            CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Add, ListData));
        }
Ejemplo n.º 7
0
        public void AddTest()
        {
            Grid1D Ox = new Grid1D(10, 3);
            Grid1D Oy = new Grid1D(10, 3);

            //v2Datas = new List<V2Data>();
            V2DataOnGrid[]     grid        = new V2DataOnGrid[4];
            V2DataCollection[] collections = new V2DataCollection[4];


            for (int i = 0; i < 3; i++)
            {
                grid[i]        = new V2DataOnGrid("TEST", 2, Ox, Oy);
                collections[i] = new V2DataCollection("sklnskvjzdfbjnsk" + i.ToString(), i);
            }

            for (int i = 0; i < 3; i++)
            {
                grid[i].initRandom(0, 100);
                collections[i].initTest(4, 100, 100, 0, 100);
                this.Add(grid[i]);
                this.Add(collections[i]);
            }
        }