private void вставитьToolStripMenuItem_Click(object sender, EventArgs e) { var data = BufferClass.getInstance().currentCopyObject; if (data.GetType() == typeof(MatrixGrid)) { MatrixController <int> .Insert(this, (MatrixGrid)data); } }
/// <summary> /// Standard constructor of MainWindow /// </summary> public MainWindow() { InitializeComponent(); buffer = new BufferClass(); this.Background = buffer.getBackgroundBrush(); // Sets the background getBuildingSurfaces(); // Build the roofs of the buildings getBuildingWalls(); // Build the walls of the buildings getLanduseSurfaces(); // Build the landuses getGrassSurface(); getCameraAndLight(); // Set up the camera and the light (same direction) // Set up the trackball (rotate, zoom and translate the camera) // This class is downloaded from: http://3dtools.codeplex.com/SourceControl/latest#3DTools/3DTools/Trackball.cs var trackball = new Trackball(); trackball.EventSource = viewportGrid; myViewport3D.Camera.Transform = trackball.Transform; }
private void копироватьToolStripMenuItem_Click(object sender, EventArgs e) { BufferClass.getInstance().currentCopyObject = this; }