Exemplo n.º 1
0
		public void CreateAndInitChartControl()
		{
			c1Chart = (Control)Assembly.LoadWithPartialName("C1.Win.C1Chart3D, Culture=neutral, PublicKeyToken=a22e16972c085838").CreateInstance("C1.Win.C1Chart3D.C1Chart3D");
			((System.ComponentModel.ISupportInitialize)(this.c1Chart)).BeginInit();
			c1Chart.Location = new System.Drawing.Point(8, 8);
			c1Chart.Name = "c1Chart1";
		
			c1Chart.GetType().InvokeMember("PropBag", BindingFlags.SetProperty,
				null, c1Chart, new object[]{"<?xml version=\"1.0\"?><Chart3DPropBag Version=\"\"><View IsInteractive=\"True\" /><Cha" +
											   "rtGroupsCollection><Chart3DGroup><Elevation IsMeshed=\"False\" /><Contour IsContou" +
											   "red=\"True\" IsZoned=\"True\" /><ChartData><Set type=\"Chart3DDataSetGrid\" RowCount=\"" +
											   "11\" ColumnCount=\"11\" RowDelta=\"1\" ColumnDelta=\"1\" RowOrigin=\"0\" ColumnOrigin=\"0\"" +
											   " Hole=\"3.4028234663852886E+38\"><Data>4.499999888241291 3.599999874830246 2.89999" +
											   "98643994331 2.3999998569488525 2.0999998524785042 1.9999998509883881 2.099999852" +
											   "4785042 2.3999998569488525 2.8999998643994331 3.599999874830246 4.49999988824129" +
											   "1 8.0999999418854713 7.1999999284744263 6.4999999180436134 5.9999999105930328 5." +
											   "6999999061226845 5.5999999046325684 5.6999999061226845 5.9999999105930328 6.4999" +
											   "999180436134 7.1999999284744263 8.0999999418854713 10.899999983608723 9.99999997" +
											   "01976776 9.2999999597668648 8.7999999523162842 8.4999999478459358 8.399999946355" +
											   "82 8.4999999478459358 8.7999999523162842 9.2999999597668648 9.9999999701976776 1" +
											   "0.899999983608723 12.900000013411045 12 11.299999989569187 10.799999982118607 10" +
											   ".499999977648258 10.399999976158142 10.499999977648258 10.799999982118607 11.299" +
											   "999989569187 12 12.900000013411045 14.100000031292439 13.200000017881393 12.5000" +
											   "00007450581 12 11.699999995529652 11.599999994039536 11.699999995529652 12 12.50" +
											   "0000007450581 13.200000017881393 14.100000031292439 14.500000037252903 13.600000" +
											   "023841858 12.900000013411045 12.400000005960465 12.100000001490116 12 12.1000000" +
											   "01490116 12.400000005960465 12.900000013411045 13.600000023841858 14.50000003725" +
											   "2903 14.100000031292439 13.200000017881393 12.500000007450581 12 11.699999995529" +
											   "652 11.599999994039536 11.699999995529652 12 12.500000007450581 13.2000000178813" +
											   "93 14.100000031292439 12.900000013411045 12 11.299999989569187 10.79999998211860" +
											   "7 10.499999977648258 10.399999976158142 10.499999977648258 10.799999982118607 11" +
											   ".299999989569187 12 12.900000013411045 10.899999983608723 9.9999999701976776 9.2" +
											   "999999597668648 8.7999999523162842 8.4999999478459358 8.39999994635582 8.4999999" +
											   "478459358 8.7999999523162842 9.2999999597668648 9.9999999701976776 10.8999999836" +
											   "08723 8.0999999418854713 7.1999999284744263 6.4999999180436134 5.999999910593032" +
											   "8 5.6999999061226845 5.5999999046325684 5.6999999061226845 5.9999999105930328 6." +
											   "4999999180436134 7.1999999284744263 8.0999999418854713 4.499999888241291 3.59999" +
											   "9874830246 2.8999998643994331 2.3999998569488525 2.0999998524785042 1.9999998509" +
											   "883881 2.0999998524785042 2.3999998569488525 2.8999998643994331 3.59999987483024" +
											   "6 4.499999888241291</Data></Set></ChartData></Chart3DGroup></ChartGroupsCollecti" +
											   "on><StyleCollection><NamedStyle Name=\"Legend\" ParentName=\"Legend.default\" /><Nam" +
											   "edStyle Name=\"Footer\" ParentName=\"Control\" /><NamedStyle Name=\"Area\" ParentName=" +
											   "\"Area.default\" /><NamedStyle Name=\"Control\" ParentName=\"Control.default\" /><Name" +
											   "dStyle Name=\"LabelStyleDefault\" ParentName=\"Control\" StyleData=\"BackColor=Transp" +
											   "arent;\" /><NamedStyle Name=\"Legend.default\" ParentName=\"Control\" StyleData=\"Wrap" +
											   "=False;AlignVert=Top;\" /><NamedStyle Name=\"Header\" ParentName=\"Control\" /><Named" +
											   "Style Name=\"Control.default\" ParentName=\"\" StyleData=\"ForeColor=ControlText;Bord" +
											   "er=None,Black,1;BackColor=Control;\" /><NamedStyle Name=\"Area.default\" ParentName" +
											   "=\"Control\" StyleData=\"AlignVert=Top;\" /></StyleCollection><LegendData Compass=\"E" +
											   "ast\" /><FooterData Visible=\"True\" Compass=\"South\" /><HeaderData Visible=\"True\" C" +
											   "ompass=\"North\" /></Chart3DPropBag>"});



			//				object area = c1Chart.GetType().InvokeMember("ChartArea", BindingFlags.GetProperty,
			//					null, c1Chart, null);
			//
			//				
			//				object axes = area.GetType().InvokeMember("Axes", BindingFlags.GetProperty,
			//					null, area, null);
			//
			//				foreach(object o in (ICollection)axes)
			//				{
			//					o.GetType().InvokeMember("AutoMax", BindingFlags.SetProperty,
			//						null, o, new object[]{true});
			//					o.GetType().InvokeMember("AutoMin", BindingFlags.SetProperty,
			//						null, o, new object[]{true});
			//				}

			((System.ComponentModel.ISupportInitialize)(this.c1Chart)).EndInit();

			panel2.Controls.Add(c1Chart);
			c1Chart.Dock = DockStyle.Fill;
			this.components = new System.ComponentModel.Container();
			this.nugenCCalcComponent1 = new Genetibase.MathX.NugenCCalc.NugenCCalc3D(this.components);
            nugenCCalcComponent1.Owner = this;
			nugenCCalcComponent1.ChartControl = c1Chart;
			this.Refresh();
			this.Update();
            
		}
Exemplo n.º 2
0
        public void CreateAndInitChartControl()
        {
            c1Chart = (Control)Assembly.LoadWithPartialName("C1.Win.C1Chart3D, Culture=neutral, PublicKeyToken=a22e16972c085838").CreateInstance("C1.Win.C1Chart3D.C1Chart3D");
            ((System.ComponentModel.ISupportInitialize)(this.c1Chart)).BeginInit();
            c1Chart.Location = new System.Drawing.Point(8, 8);
            c1Chart.Name     = "c1Chart1";

            c1Chart.GetType().InvokeMember("PropBag", BindingFlags.SetProperty,
                                           null, c1Chart, new object[] { "<?xml version=\"1.0\"?><Chart3DPropBag Version=\"\"><View IsInteractive=\"True\" /><Cha" +
                                                                         "rtGroupsCollection><Chart3DGroup><Elevation IsMeshed=\"False\" /><Contour IsContou" +
                                                                         "red=\"True\" IsZoned=\"True\" /><ChartData><Set type=\"Chart3DDataSetGrid\" RowCount=\"" +
                                                                         "11\" ColumnCount=\"11\" RowDelta=\"1\" ColumnDelta=\"1\" RowOrigin=\"0\" ColumnOrigin=\"0\"" +
                                                                         " Hole=\"3.4028234663852886E+38\"><Data>4.499999888241291 3.599999874830246 2.89999" +
                                                                         "98643994331 2.3999998569488525 2.0999998524785042 1.9999998509883881 2.099999852" +
                                                                         "4785042 2.3999998569488525 2.8999998643994331 3.599999874830246 4.49999988824129" +
                                                                         "1 8.0999999418854713 7.1999999284744263 6.4999999180436134 5.9999999105930328 5." +
                                                                         "6999999061226845 5.5999999046325684 5.6999999061226845 5.9999999105930328 6.4999" +
                                                                         "999180436134 7.1999999284744263 8.0999999418854713 10.899999983608723 9.99999997" +
                                                                         "01976776 9.2999999597668648 8.7999999523162842 8.4999999478459358 8.399999946355" +
                                                                         "82 8.4999999478459358 8.7999999523162842 9.2999999597668648 9.9999999701976776 1" +
                                                                         "0.899999983608723 12.900000013411045 12 11.299999989569187 10.799999982118607 10" +
                                                                         ".499999977648258 10.399999976158142 10.499999977648258 10.799999982118607 11.299" +
                                                                         "999989569187 12 12.900000013411045 14.100000031292439 13.200000017881393 12.5000" +
                                                                         "00007450581 12 11.699999995529652 11.599999994039536 11.699999995529652 12 12.50" +
                                                                         "0000007450581 13.200000017881393 14.100000031292439 14.500000037252903 13.600000" +
                                                                         "023841858 12.900000013411045 12.400000005960465 12.100000001490116 12 12.1000000" +
                                                                         "01490116 12.400000005960465 12.900000013411045 13.600000023841858 14.50000003725" +
                                                                         "2903 14.100000031292439 13.200000017881393 12.500000007450581 12 11.699999995529" +
                                                                         "652 11.599999994039536 11.699999995529652 12 12.500000007450581 13.2000000178813" +
                                                                         "93 14.100000031292439 12.900000013411045 12 11.299999989569187 10.79999998211860" +
                                                                         "7 10.499999977648258 10.399999976158142 10.499999977648258 10.799999982118607 11" +
                                                                         ".299999989569187 12 12.900000013411045 10.899999983608723 9.9999999701976776 9.2" +
                                                                         "999999597668648 8.7999999523162842 8.4999999478459358 8.39999994635582 8.4999999" +
                                                                         "478459358 8.7999999523162842 9.2999999597668648 9.9999999701976776 10.8999999836" +
                                                                         "08723 8.0999999418854713 7.1999999284744263 6.4999999180436134 5.999999910593032" +
                                                                         "8 5.6999999061226845 5.5999999046325684 5.6999999061226845 5.9999999105930328 6." +
                                                                         "4999999180436134 7.1999999284744263 8.0999999418854713 4.499999888241291 3.59999" +
                                                                         "9874830246 2.8999998643994331 2.3999998569488525 2.0999998524785042 1.9999998509" +
                                                                         "883881 2.0999998524785042 2.3999998569488525 2.8999998643994331 3.59999987483024" +
                                                                         "6 4.499999888241291</Data></Set></ChartData></Chart3DGroup></ChartGroupsCollecti" +
                                                                         "on><StyleCollection><NamedStyle Name=\"Legend\" ParentName=\"Legend.default\" /><Nam" +
                                                                         "edStyle Name=\"Footer\" ParentName=\"Control\" /><NamedStyle Name=\"Area\" ParentName=" +
                                                                         "\"Area.default\" /><NamedStyle Name=\"Control\" ParentName=\"Control.default\" /><Name" +
                                                                         "dStyle Name=\"LabelStyleDefault\" ParentName=\"Control\" StyleData=\"BackColor=Transp" +
                                                                         "arent;\" /><NamedStyle Name=\"Legend.default\" ParentName=\"Control\" StyleData=\"Wrap" +
                                                                         "=False;AlignVert=Top;\" /><NamedStyle Name=\"Header\" ParentName=\"Control\" /><Named" +
                                                                         "Style Name=\"Control.default\" ParentName=\"\" StyleData=\"ForeColor=ControlText;Bord" +
                                                                         "er=None,Black,1;BackColor=Control;\" /><NamedStyle Name=\"Area.default\" ParentName" +
                                                                         "=\"Control\" StyleData=\"AlignVert=Top;\" /></StyleCollection><LegendData Compass=\"E" +
                                                                         "ast\" /><FooterData Visible=\"True\" Compass=\"South\" /><HeaderData Visible=\"True\" C" +
                                                                         "ompass=\"North\" /></Chart3DPropBag>" });



            //				object area = c1Chart.GetType().InvokeMember("ChartArea", BindingFlags.GetProperty,
            //					null, c1Chart, null);
            //
            //
            //				object axes = area.GetType().InvokeMember("Axes", BindingFlags.GetProperty,
            //					null, area, null);
            //
            //				foreach(object o in (ICollection)axes)
            //				{
            //					o.GetType().InvokeMember("AutoMax", BindingFlags.SetProperty,
            //						null, o, new object[]{true});
            //					o.GetType().InvokeMember("AutoMin", BindingFlags.SetProperty,
            //						null, o, new object[]{true});
            //				}

            ((System.ComponentModel.ISupportInitialize)(this.c1Chart)).EndInit();

            panel2.Controls.Add(c1Chart);
            c1Chart.Dock                      = DockStyle.Fill;
            this.components                   = new System.ComponentModel.Container();
            this.nugenCCalcComponent1         = new Genetibase.MathX.NugenCCalc.NugenCCalc3D(this.components);
            nugenCCalcComponent1.Owner        = this;
            nugenCCalcComponent1.ChartControl = c1Chart;
            this.Refresh();
            this.Update();
        }