示例#1
0
        static void Main(string[] args)
        {
            V3MainCollection test = new V3MainCollection();

            test.DataChanged += data_change;
            V3DataCollection vdc  = new V3DataCollection("first", new DateTime(2020, 1, 1));
            V3DataOnGrid     vdon = new V3DataOnGrid("second", new DateTime(2019, 2, 2), new Grid1D((float)0.25, 2), new Grid1D((float)0.3, 2));

            test.Add(vdc);
            Console.WriteLine(test.ToString());

            test.Add(vdon);
            Console.WriteLine(test.ToString());

            V3DataCollection vdc1 = new V3DataCollection("fourth", new DateTime(2018, 3, 3));

            test[1] = vdc1;
            Console.WriteLine(test.ToString());

            vdc.Info = "third";
            Console.WriteLine(test.ToString());

            test.Remove("fourth", new DateTime(2018, 3, 3));
            Console.WriteLine(test.ToString());
        }
示例#2
0
        public void AddDefaults()
        {
            Grid1D       x     = new Grid1D((float)0.2, 2);
            Grid1D       y     = new Grid1D((float)0.2, 2);
            V3DataOnGrid data1 = new V3DataOnGrid("", DateTime.Now, x, y);

            data1.InitRandom(0.25, 0.5);

            Grid1D       x1    = new Grid1D((float)0.0, 0);
            Grid1D       y1    = new Grid1D((float)0.0, 0);
            V3DataOnGrid data2 = new V3DataOnGrid("", DateTime.Now, x1, y1);

            V3DataCollection data3 = new V3DataCollection();

            data3.InitRandom(4, (float)0.4, (float)0.4, 1.25, 0.2);

            V3DataCollection data4 = new V3DataCollection();

            this.Add(data1);
            this.Add(data2);
            this.Add(data3);
            this.Add(data4);
        }