private void drawGraph_Click(object sender, RoutedEventArgs e) { var x = new ResultGraph(new int[] { 20, 100, 200, 300, 400 }, new int[] { 20, 200, 100, 300, 200 }); x.DrawGraph(); containetCtrl.Content = x; }
/// <summary> /// Disposes of the underlying resources. /// </summary> public void Dispose() { if (ResultGraph != null) { ResultGraph.Dispose(); ResultGraph = null; } if (ResultSet != null) { ResultSet.Dispose(); ResultSet = null; } }
void RunningProcessExited(object sender, EventArgs e) { Dispatcher.Invoke(() => { Grid1.IsEnabled = true; Grid2.IsEnabled = true; if (File.Exists(_targetFile)) { try { var runtimeWrap = new RuntimeWrap(); var fileInfo = new Dictionary <string, string>(); var response = runtimeWrap.GetFileResponse(_targetFile, ref fileInfo); var responseConvert = response.Select( tuple => new PointF((float)tuple.Item1, (float)Math.Log(tuple.Item2))) .ToArray(); ResultGraph.SetPoints(0, responseConvert, Colors.DarkSalmon, "Result"); var points = SourceGraph.GetPoints(0); ResultGraph.SetPoints(1, (PointF[])points.Item1.Clone(), points.Item2, "Source"); } catch { Dispatcher.InvokeAsync(() => MyAnimations.AnimateOpacity(TargetInfoError, 0, 1.0, 300)); } } if (TargetInfoError.Opacity > 0) { MyAnimations.AnimateOpacity(TargetInfoError, 1.0, 0, 300); } MyAnimations.AnimateOpacity(ImageProcessingInfo, 1.0, 0, 300); MyAnimations.AnimateOpacity(Image3, 0, 1.0, 300); }); }
public void DoLightMap() { ResultGraph.Root = LightNode((Entity3D)Graph.Root); Texture.Texture2D lm_tex = FinalMap.GetMap(); void E_SetTex(Node3D node) { Entity3D ge = node as Entity3D; foreach (Data.Mesh3D m in ge.Meshes) { m.Material.ColorMap = lm_tex; } // ge.Renderer = new Visuals.VRLightMap ( ); } ResultGraph.EditGraph(E_SetTex); ResultGraph.Root.SetLightmap(); // ResultGraph.Root.SetMultiPass ( ); }