Click here to Skip to main content
15,885,757 members
Articles / Programming Languages / C#

Scalar Data Visualization: Part 3

Rate me:
Please Sign up or sign in to vote.
4.69/5 (18 votes)
5 Jan 2007BSD4 min read 46.7K   906   34  
This article will descirbe in more detail the flooded contouring section.
//-----------------------------------------------------------------------------
// File: ScoOteRVisualizationStudio.cs
//
// DemolitiOn is My MissiOn
//
// Copyright (c) Ibrahim Hamed. All rights reserved.
//-----------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ScoOteRLoAdeR
{
	public partial class ScoOteRVisualizationStudio : Form
	{
		public ScoOteRVisualizationStudio()
		{
			InitializeComponent();
		}

		private void newToolStripMenuItem_Click(object sender, EventArgs e)
		{
			Form1 frm = new Form1();
			this.AddOwnedForm(frm);
			frm.MdiParent = this;
			frm.Show();
		}

		private void openToolStripMenuItem_Click(object sender, EventArgs e)
		{
			openFileDialog1.ShowDialog();
			if (ActiveMdiChild == null)
				newToolStripMenuItem_Click(sender, e);
			((Form1)this.ActiveMdiChild).OpenFile(openFileDialog1.FileName);
		}

		private void aboutToolStripMenuItem_Click(object sender, EventArgs e)
		{
			About dlg = new About();
			dlg.ShowDialog();
		}

		private void customizeToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (ActiveMdiChild != null)
				((Form1)this.ActiveMdiChild).InvNormals();
		}

		private void toggleWireFrameToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (ActiveMdiChild != null)
				((Form1)this.ActiveMdiChild).ToggleWireFrame();
		}

		private void colorPaletToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (ActiveMdiChild == null)
				return;
			PaletOptions dlg = new PaletOptions( ((Form1)this.ActiveMdiChild).GetVariables());
			dlg.ShowDialog();
			if(dlg.SelectedIndex != -1)
				((Form1)this.ActiveMdiChild).SetColorVariable(dlg.SelectedIndex);
		}

		private void contourToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (ActiveMdiChild == null)
				return;
			ContourOption dlg = new ContourOption(((Form1)this.ActiveMdiChild).GetVariables());
			dlg.ShowDialog();
			if(dlg.SelectedIndex != -1)
				((Form1)this.ActiveMdiChild).CreateContours(dlg.ContoursCount, dlg.SelectedIndex, dlg.Flood);
		}

		private void iSOSurfaceToolStripMenuItem_Click(object sender, EventArgs e)
		{
			if (ActiveMdiChild == null)
				return;
			ISOsurfaceOption dlg = new ISOsurfaceOption(((Form1)this.ActiveMdiChild).GetVariables());
			dlg.ShowDialog();
			if (dlg.SelectedIndex != -1)
				((Form1)this.ActiveMdiChild).CreateISOSurface(dlg.ContoursCount, dlg.SelectedIndex, dlg.Iterations);
		}

		private void optionsToolStripMenuItem_Click(object sender, EventArgs e)
		{
			RenderOptions dlg = new RenderOptions();
			dlg.ShowDialog();
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The BSD License


Written By
Other
Egypt Egypt
Nvidia Registered game developer.
Teaching Assistant,
Faculty of computer and information sciences,
Ain Shams University.
SmartLabZ QT Developer.
Have an experience of more than 2 years in c++(QT/MFC/ATL/Win32),c#, GDI,DirectX

Comments and Discussions