Beispiel #1
0
		public ResGroupEditor(IEditorEnvironment editorEnvironment, ICommandHistory history)
		{
			this.editorEnvironment = editorEnvironment;
			this.history = history;
			this.AutoSize = true;
			this.Padding = new Padding(10);

			this.SuspendLayout();

			this.split = new SplitContainer { Dock = DockStyle.Fill };
			this.split.Panel2Collapsed = true;
			this.Controls.Add(this.split);

			var sp = new StackPanel { Dock = DockStyle.Fill, AutoSize = true };
			this.split.Panel1.Controls.Add(sp);

			var collectionView = new CollectionView<IResourceFile>(a => editorEnvironment.EditorFor(a, history))
				{ AutoSize = true };
			collectionView.ItemsPanel.AutoSize = true;
			collectionView.ItemsPanel.AutoScroll = false;
			new PropertyBinding<ResGroup, IList<IResourceFile>>(collectionView, this.dataContext, m => m.ExternalResources, null);
			sp.Controls.Add(collectionView);

			var embCollectionView = new CollectionView<Managed>(a => this.CreateButtonForResource(a)) { AutoSize = true };
			embCollectionView.ItemsPanel.AutoSize = true;
			embCollectionView.ItemsPanel.AutoScroll = false;
			new PropertyBinding<ResGroup, IList<Managed>>(embCollectionView, this.dataContext, m => m.EmbeddedResources, null);
			sp.Controls.Add(embCollectionView);

			this.ResumeLayout();
			this.PerformLayout();
		}
Beispiel #2
0
		private void InitializeEditor()
		{
			this.SuspendLayout();

			this.AutoSize = true;
			this.Padding = new Padding(10);
			this.formPreviewSplit.Panel1MinSize = 200;

			this.stackPanel = new TableLayoutPanel { ColumnCount = 2, Dock = DockStyle.Fill, AutoSize = true };
			this.stackPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50.0f));
			this.stackPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50.0f));
			var sp = new StackPanel { Dock = DockStyle.Fill, AutoSize = true, AutoScroll = true };

			sp.Controls.Add(this.stackPanel);
			this.formPreviewSplit.Panel1.Controls.Add(sp);

			//var preview = new PictureBox { Image = Resources.material, Dock = DockStyle.Fill, AutoSize = true };
			var preview = this.context.Resolve<MaterialPreview>(new Parameter[] { TypedParameter.From(this) });
			preview.Dock = DockStyle.Fill;
			this.formPreviewSplit.Panel2.Controls.Add(preview);
			this.dataContext.DataContextChanged += (s, a) => preview.RefreshScene();
			this.dataContext.PropertyChanged += (s, a) => preview.RefreshScene();

			int row = 0;
			{
				this.stackPanel.Controls.Add(new StringView { Text = "Material name", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditNameView(this.history) { Margin = new Padding(4), Dock = DockStyle.Fill };
				new DataContextBinding(valueCtrl, this.dataContext, false);
				//var valueCtrl = new EditStringView() { Margin = new Padding(4) };
				//Expression<Func<Material, string>> expression = mtl => mtl.Name;
				//Action<Material, string> updateValue = (mtl, value) => history.SetValue(mtl, mtl.Name, value, (a, b) => { a.Name = b; });
				//new PropertyBinding<Material, string>(valueCtrl, this.dataContext, expression, updateValue);

				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
			}
			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Specify texture for stage 0 (diffuse map)", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditResourceReferenceView(
					this.editorEnvironment, this.resourceManager, this.history, this.context, true)
					{ Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				new PropertyBinding<Material, ResourceReference>(valueCtrl, this.dataContext, mtl => mtl.Texture0, null);
				++row;
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Specify texture for stage 1", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditResourceReferenceView(
					this.editorEnvironment, this.resourceManager, this.history, this.context, true)
					{ Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ResourceReference>(valueCtrl, this.dataContext, mtl => mtl.Texture1, null);
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Specify texture for stage 2", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditResourceReferenceView(
					this.editorEnvironment, this.resourceManager, this.history, this.context, true)
					{ Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ResourceReference>(valueCtrl, this.dataContext, mtl => mtl.Texture2, null);
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Specify texture for stage 3", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditResourceReferenceView(
					this.editorEnvironment, this.resourceManager, this.history, this.context, true)
					{ Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ResourceReference>(valueCtrl, this.dataContext, mtl => mtl.Texture3, null);
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Specify vertex shader to use", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditStringView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				Expression<Func<Material, string>> expression = mtl => mtl.VertexShader;
				Action<Material, string> updateValue = (mtl, value) => mtl.VertexShader = value;
				new PropertyBinding<Material, string>(valueCtrl, this.dataContext, expression, updateValue);
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Emissive colour", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditColorView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				Expression<Func<Material, Color>> expression = mtl => mtl.ColEmissive;
				Action<Material, Color> updateValue =
					(mtl, value) => this.history.SetValue(mtl, mtl.ColEmissive, value, (a, b) => { a.ColEmissive = b; });
				new PropertyBinding<Material, Color>(valueCtrl, this.dataContext, expression, updateValue);
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Ambient colour", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditColorView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, Color>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ColAmbient,
					(mtl, value) => this.history.SetValue(mtl, mtl.ColAmbient, value, (a, b) => { a.ColAmbient = b; }));
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Diffuse colour", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditColorView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, Color>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ColDiffuse,
					(mtl, value) => this.history.SetValue(mtl, mtl.ColDiffuse, value, (a, b) => { a.ColDiffuse = b; }));
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Specular colour", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditColorView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, Color>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ColSpecular,
					(mtl, value) => this.history.SetValue(mtl, mtl.ColSpecular, value, (a, b) => { a.ColSpecular = b; }));
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "The specular cosine power", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditByteView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, byte>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.SpecularPower,
					(mtl, value) => this.history.SetValue(mtl, mtl.SpecularPower, value, (a, b) => { a.SpecularPower = b; }));
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Shading mode", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditEnumView { Margin = new Padding(4), WellKnownValues = MaterialEnumsValues.ShadeModeValues };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ShadeMode>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ShadeMode,
					(mtl, value) => this.history.SetValue(mtl, mtl.ShadeMode, value, (a, b) => { a.ShadeMode = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Modulation mode (of texel by vertex colour)", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), Dock = DockStyle.Fill, WellKnownValues = MaterialEnumsValues.ModulateModeValues };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ModulateMode>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ModulateMode,
					(mtl, value) => this.history.SetValue(mtl, mtl.ModulateMode, value, (a, b) => { a.ModulateMode = b; }));
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Backface culling mode", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), Dock = DockStyle.Fill, WellKnownValues = MaterialEnumsValues.CullModeValues };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, CullMode>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.CullMode,
					(mtl, value) => this.history.SetValue(mtl, mtl.CullMode, value, (a, b) => { a.CullMode = b; }));
			}

			{
				this.stackPanel.Controls.Add(new StringView { Text = "Transparency (alpha) mode", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), Dock = DockStyle.Fill, WellKnownValues = MaterialEnumsValues.AlphaModeValues };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, AlphaMode>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.AlphaMode,
					(mtl, value) => this.history.SetValue(mtl, mtl.AlphaMode, value, (a, b) => { a.AlphaMode = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Blend mode between texture stages 0 and 1", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), Dock = DockStyle.Fill, WellKnownValues = MaterialEnumsValues.BlendModeValues };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, BlendMode>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.BlendMode,
					(mtl, value) => this.history.SetValue(mtl, mtl.BlendMode, value, (a, b) => { a.BlendMode = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Preset multi-texturing effect", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), WellKnownValues = MaterialEnumsValues.EffectPresetValues, Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, EffectPreset>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.EffectPreset,
					(mtl, value) => this.history.SetValue(mtl, mtl.EffectPreset, value, (a, b) => { a.EffectPreset = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Specify the alpha test function", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), WellKnownValues = MaterialEnumsValues.AlphaTestModeValues, Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, AlphaTestMode>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.AlphaTestMode,
					(mtl, value) => this.history.SetValue(mtl, mtl.AlphaTestMode, value, (a, b) => { a.AlphaTestMode = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Specify the alpha test reference value", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditByteView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, byte>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.AlphaTestValue,
					(mtl, value) => this.history.SetValue(mtl, mtl.AlphaTestValue, value, (a, b) => { a.AlphaTestValue = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Depth offset to apply when using SW rasterisation", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditIntView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, int>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ZDepthOfs,
					(mtl, value) => this.history.SetValue(mtl, mtl.ZDepthOfs, value, (a, b) => { a.ZDepthOfs = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Depth offset to apply when using HW rasterisation", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditIntView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, int>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ZDepthOfsHW,
					(mtl, value) => this.history.SetValue(mtl, mtl.ZDepthOfsHW, value, (a, b) => { a.ZDepthOfsHW = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Checked only if the material should not be rendered", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditBoolView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, bool>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.Invisible,
					(mtl, value) => this.history.SetValue(mtl, mtl.Invisible, value, (a, b) => { a.Invisible = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView
						{ Text = "Checked only if the material's textures should use bilinear filtering", Dock = DockStyle.Fill },
					0,
					row);
				var valueCtrl = new EditBoolView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, bool>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.Filtering,
					(mtl, value) => this.history.SetValue(mtl, mtl.Filtering, value, (a, b) => { a.Filtering = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = " Enable writing to depth buffer. Only affects HW rasterisation", Dock = DockStyle.Fill },
					0,
					row);
				var valueCtrl = new EditBoolView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, bool>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.DepthWriteEnable,
					(mtl, value) => this.history.SetValue(mtl, mtl.DepthWriteEnable, value, (a, b) => { a.DepthWriteEnable = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Enable geometry merging for this material", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditBoolView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, bool>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.MergeGeom,
					(mtl, value) => this.history.SetValue(mtl, mtl.MergeGeom, value, (a, b) => { a.MergeGeom = b; }));
			}
			/*
			celW  0 .. 255  UV animation: width of cel (U delta to apply at each update).  celW 4 
 
	celH  0 .. 255  UV animation: height of cel (V delta to apply when a "row" of cels is complete).  celH 16 
 
	celNum  0 .. n  UV animation: total number of cels before animation restarts.  celNum 32 
 
	celNumU  0 .. n  UV animation: total number of cels in a "row", i.e. before applying a V delta.  celNumU 8 
 
	celPeriod  0 .. n  UV animation: number of application updates before each UV animation update.  celPeriod 1 	 
			 */

			{
				this.stackPanel.Controls.Add(
					new StringView
						{
							Text = "Specify a format to convert the image to, before uploading for SW rasterisation",
							Dock = DockStyle.Fill
						},
					0,
					row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), WellKnownValues = MaterialEnumsValues.ImageFormatValues, Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ImageFormat>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.FormatSW,
					(mtl, value) => this.history.SetValue(mtl, mtl.FormatSW, value, (a, b) => { a.FormatSW = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView
						{
							Text = "Specify a format to convert the image to, before uploading for HW rasterisation",
							Dock = DockStyle.Fill
						},
					0,
					row);
				var valueCtrl = new EditEnumView
					{ Margin = new Padding(4), WellKnownValues = MaterialEnumsValues.ImageFormatValues, Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ImageFormat>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.FormatHW,
					(mtl, value) => this.history.SetValue(mtl, mtl.FormatHW, value, (a, b) => { a.FormatHW = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Keep the contents of the texture after upload", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditBoolView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, bool>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.KeepAfterUpload,
					(mtl, value) => this.history.SetValue(mtl, mtl.KeepAfterUpload, value, (a, b) => { a.KeepAfterUpload = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "If true the texture UV coordinates are clamped", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditBoolView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, bool>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.ClampUV,
					(mtl, value) => this.history.SetValue(mtl, mtl.ClampUV, value, (a, b) => { a.ClampUV = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Disable fogging for this material", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditBoolView { Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, bool>(
					valueCtrl,
					this.dataContext,
					mtl => mtl.NoFog,
					(mtl, value) => this.history.SetValue(mtl, mtl.NoFog, value, (a, b) => { a.NoFog = b; }));
			}

			{
				this.stackPanel.Controls.Add(
					new StringView { Text = "Attach the specified shader to this material", Dock = DockStyle.Fill }, 0, row);
				var valueCtrl = new EditResourceReferenceView(
					this.editorEnvironment, this.resourceManager, this.history, this.context, true)
					{ Margin = new Padding(4), Dock = DockStyle.Fill };
				this.stackPanel.Controls.Add(valueCtrl, 1, row);
				++row;
				new PropertyBinding<Material, ResourceReference>(valueCtrl, this.dataContext, mtl => mtl.ShaderTechnique, null);
			}
			this.ResumeLayout();
		}
Beispiel #3
0
		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Base3DEditor));
			this.toolStrip1 = new System.Windows.Forms.ToolStrip();
			this.lightingButton = new System.Windows.Forms.ToolStripButton();
			this.glControl = new OpenTK.GLControl();
			this.errPanel = new Toe.Editors.Interfaces.Panels.StackPanel();
			this.errButton = new System.Windows.Forms.Button();
			this.errMessage = new System.Windows.Forms.Label();
			this.coordinateSystemButton = new System.Windows.Forms.ToolStripDropDownButton();
			this.zUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.yUpToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.renderWireButton = new System.Windows.Forms.ToolStripDropDownButton();
			this.renderWireframeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.hideWireframeMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.renderNormalsButton = new System.Windows.Forms.ToolStripDropDownButton();
			this.renderNormalsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.hideNormalsMenuItem = new System.Windows.Forms.ToolStripMenuItem();
			this.btnScreenShot = new System.Windows.Forms.ToolStripButton();
			this.toolStrip1.SuspendLayout();
			this.errPanel.SuspendLayout();
			this.SuspendLayout();
			// 
			// toolStrip1
			// 
			this.toolStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.coordinateSystemButton,
            this.lightingButton,
            this.renderWireButton,
            this.renderNormalsButton,
            this.btnScreenShot});
			this.toolStrip1.Location = new System.Drawing.Point(0, 0);
			this.toolStrip1.Name = "toolStrip1";
			this.toolStrip1.Size = new System.Drawing.Size(550, 25);
			this.toolStrip1.TabIndex = 0;
			this.toolStrip1.Text = "toolStrip1";
			// 
			// lightingButton
			// 
			this.lightingButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.lightingButton.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.lightingButton.Name = "lightingButton";
			this.lightingButton.Size = new System.Drawing.Size(23, 22);
			this.lightingButton.Text = "Toggle Lights";
			this.lightingButton.Click += new System.EventHandler(this.ToggleLightingClick);
			// 
			// glControl
			// 
			this.glControl.BackColor = System.Drawing.Color.Black;
			this.glControl.Dock = System.Windows.Forms.DockStyle.Fill;
			this.glControl.Location = new System.Drawing.Point(0, 25);
			this.glControl.Name = "glControl";
			this.glControl.Size = new System.Drawing.Size(550, 425);
			this.glControl.TabIndex = 1;
			this.glControl.VSync = false;
			// 
			// errPanel
			// 
			this.errPanel.AutoScroll = true;
			this.errPanel.Controls.Add(this.errButton);
			this.errPanel.Controls.Add(this.errMessage);
			this.errPanel.Dock = System.Windows.Forms.DockStyle.Fill;
			this.errPanel.Location = new System.Drawing.Point(0, 25);
			this.errPanel.Name = "errPanel";
			this.errPanel.Size = new System.Drawing.Size(550, 425);
			this.errPanel.TabIndex = 2;
			this.errPanel.Visible = false;
			// 
			// errButton
			// 
			this.errButton.Location = new System.Drawing.Point(3, 3);
			this.errButton.Name = "errButton";
			this.errButton.Size = new System.Drawing.Size(550, 23);
			this.errButton.TabIndex = 1;
			this.errButton.Text = "Retry";
			this.errButton.UseVisualStyleBackColor = true;
			// 
			// errMessage
			// 
			this.errMessage.AutoSize = true;
			this.errMessage.Location = new System.Drawing.Point(3, 29);
			this.errMessage.Name = "errMessage";
			this.errMessage.Size = new System.Drawing.Size(550, 13);
			this.errMessage.TabIndex = 0;
			this.errMessage.Text = "Render error";
			// 
			// coordinateSystemButton
			// 
			this.coordinateSystemButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.coordinateSystemButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.zUpToolStripMenuItem,
            this.yUpToolStripMenuItem});
			this.coordinateSystemButton.Image = global::Toe.Editors.Properties.Resources.zup;
			this.coordinateSystemButton.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.coordinateSystemButton.Name = "coordinateSystemButton";
			this.coordinateSystemButton.Size = new System.Drawing.Size(29, 22);
			this.coordinateSystemButton.Text = "Up";
			// 
			// zUpToolStripMenuItem
			// 
			this.zUpToolStripMenuItem.Image = global::Toe.Editors.Properties.Resources.zup;
			this.zUpToolStripMenuItem.Name = "zUpToolStripMenuItem";
			this.zUpToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
			this.zUpToolStripMenuItem.Text = "Z-Up";
			// 
			// yUpToolStripMenuItem
			// 
			this.yUpToolStripMenuItem.Image = global::Toe.Editors.Properties.Resources.yup;
			this.yUpToolStripMenuItem.Name = "yUpToolStripMenuItem";
			this.yUpToolStripMenuItem.Size = new System.Drawing.Size(101, 22);
			this.yUpToolStripMenuItem.Text = "Y-Up";
			// 
			// renderWireButton
			// 
			this.renderWireButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.renderWireButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.renderWireframeMenuItem,
            this.hideWireframeMenuItem});
			this.renderWireButton.Image = global::Toe.Editors.Properties.Resources.wireframe_on;
			this.renderWireButton.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.renderWireButton.Name = "renderWireButton";
			this.renderWireButton.Size = new System.Drawing.Size(29, 22);
			this.renderWireButton.Text = "Toggle Wireframe";
			// 
			// renderWireframeMenuItem
			// 
			this.renderWireframeMenuItem.Image = global::Toe.Editors.Properties.Resources.wireframe_on;
			this.renderWireframeMenuItem.Name = "renderWireframeMenuItem";
			this.renderWireframeMenuItem.Size = new System.Drawing.Size(169, 22);
			this.renderWireframeMenuItem.Text = "Render Wireframe";
			this.renderWireframeMenuItem.Click += new System.EventHandler(this.SelectWireframeOn);
			// 
			// hideWireframeMenuItem
			// 
			this.hideWireframeMenuItem.Image = global::Toe.Editors.Properties.Resources.wireframe_off;
			this.hideWireframeMenuItem.Name = "hideWireframeMenuItem";
			this.hideWireframeMenuItem.Size = new System.Drawing.Size(169, 22);
			this.hideWireframeMenuItem.Text = "Hide Wireframe";
			this.hideWireframeMenuItem.Click += new System.EventHandler(this.SelectWireframeOff);
			// 
			// renderNormalsButton
			// 
			this.renderNormalsButton.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.renderNormalsButton.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.renderNormalsMenuItem,
            this.hideNormalsMenuItem});
			this.renderNormalsButton.Image = global::Toe.Editors.Properties.Resources.normal_on;
			this.renderNormalsButton.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.renderNormalsButton.Name = "renderNormalsButton";
			this.renderNormalsButton.Size = new System.Drawing.Size(29, 22);
			this.renderNormalsButton.Text = "Toggle Normals";
			this.renderNormalsButton.Click += new System.EventHandler(this.SelectNormalsOn);
			// 
			// renderNormalsMenuItem
			// 
			this.renderNormalsMenuItem.Image = global::Toe.Editors.Properties.Resources.normal_on;
			this.renderNormalsMenuItem.Name = "renderNormalsMenuItem";
			this.renderNormalsMenuItem.Size = new System.Drawing.Size(157, 22);
			this.renderNormalsMenuItem.Text = "Render normals";
			this.renderNormalsMenuItem.Click += new System.EventHandler(this.SelectNormalsOn);
			// 
			// hideNormalsMenuItem
			// 
			this.hideNormalsMenuItem.Image = global::Toe.Editors.Properties.Resources.normal_off;
			this.hideNormalsMenuItem.Name = "hideNormalsMenuItem";
			this.hideNormalsMenuItem.Size = new System.Drawing.Size(157, 22);
			this.hideNormalsMenuItem.Text = "Hide normals";
			this.hideNormalsMenuItem.Click += new System.EventHandler(this.SelectNormalsOff);
			// 
			// btnScreenShot
			// 
			this.btnScreenShot.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
			this.btnScreenShot.Image = ((System.Drawing.Image)(resources.GetObject("btnScreenShot.Image")));
			this.btnScreenShot.ImageTransparentColor = System.Drawing.Color.Magenta;
			this.btnScreenShot.Name = "btnScreenShot";
			this.btnScreenShot.Size = new System.Drawing.Size(23, 22);
			this.btnScreenShot.Text = "Take Screenshot";
			this.btnScreenShot.Click += new System.EventHandler(this.TakeScreenshot);
			// 
			// Base3DEditor
			// 
			this.Controls.Add(this.errPanel);
			this.Controls.Add(this.glControl);
			this.Controls.Add(this.toolStrip1);
			this.Name = "Base3DEditor";
			this.Size = new System.Drawing.Size(550, 450);
			this.PreviewKeyDown += new System.Windows.Forms.PreviewKeyDownEventHandler(this.OnPreviewKeyDown);
			this.toolStrip1.ResumeLayout(false);
			this.toolStrip1.PerformLayout();
			this.errPanel.ResumeLayout(false);
			this.errPanel.PerformLayout();
			this.ResumeLayout(false);
			this.PerformLayout();

		}
Beispiel #4
0
		private void InitializeComponent()
		{
			this.split = new SplitContainer();
			this.stackPanel1 = new StackPanel();
			this.tableLayoutPanel1 = new TableLayoutPanel();
			var i = this.split as ISupportInitialize;
			if (i != null)
			{
				i.BeginInit();
			}
			this.split.Panel1.SuspendLayout();
			this.split.SuspendLayout();
			this.stackPanel1.SuspendLayout();
			this.tableLayoutPanel1.SuspendLayout();
			this.SuspendLayout();
			// 
			// split
			// 
			this.split.Dock = DockStyle.Fill;
			this.split.Location = new Point(0, 0);
			this.split.Name = "split";
			// 
			// split.Panel1
			// 
			this.split.Panel1.Controls.Add(this.stackPanel1);
			this.split.Size = new Size(550, 150);
			this.split.SplitterDistance = 183;
			this.split.TabIndex = 0;
			// 
			// stackPanel1
			// 
			this.stackPanel1.AutoScroll = true;
			this.stackPanel1.Controls.Add(this.tableLayoutPanel1);
			this.stackPanel1.Dock = DockStyle.Fill;
			this.stackPanel1.Location = new Point(0, 0);
			this.stackPanel1.Name = "stackPanel1";
			this.stackPanel1.Size = new Size(183, 150);
			this.stackPanel1.TabIndex = 0;
			// 
			// tableLayoutPanel1
			// 
			this.tableLayoutPanel1.ColumnCount = 2;
			this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
			this.tableLayoutPanel1.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 50F));
			this.tableLayoutPanel1.Location = new Point(3, 3);
			this.tableLayoutPanel1.Name = "tableLayoutPanel1";
			this.tableLayoutPanel1.RowCount = 1;
			this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Percent, 50F));
			this.tableLayoutPanel1.Size = new Size(183, 100);
			this.tableLayoutPanel1.TabIndex = 0;

			// 
			// ModelEditor
			// 
			this.Controls.Add(this.split);
			this.Name = "ModelEditor";
			this.Size = new Size(550, 150);
			this.split.Panel1.ResumeLayout(false);
			if (i != null)
			{
				i.EndInit();
			}
			this.split.ResumeLayout(false);
			this.stackPanel1.ResumeLayout(false);
			this.tableLayoutPanel1.ResumeLayout(false);
			this.tableLayoutPanel1.PerformLayout();
			this.ResumeLayout(false);
		}
Beispiel #5
0
		private void InitializeComponent()
		{
			ComponentResourceManager resources = new ComponentResourceManager(typeof(SkinEditor));
			this.split = new SplitContainer();
			this.stackPanel1 = new StackPanel();
			this.base3DEditor1 = new Base3DEditor(
				this.context,
				this.context.Resolve<IEditorOptions<Base3DEditorOptions>>(),
				this.context.Resolve<Base3DEditorContent>());
			var i = this.split as ISupportInitialize;
			if (i != null)
			{
				i.BeginInit();
			}
			this.split.Panel1.SuspendLayout();
			this.split.Panel2.SuspendLayout();
			this.split.SuspendLayout();
			this.SuspendLayout();
			// 
			// split
			// 
			this.split.Dock = DockStyle.Fill;
			this.split.Location = new Point(0, 0);
			this.split.Name = "split";
			// 
			// split.Panel1
			// 
			this.split.Panel1.Controls.Add(this.stackPanel1);
			// 
			// split.Panel2
			// 
			this.split.Panel2.Controls.Add(this.base3DEditor1);
			this.split.Size = new Size(750, 550);
			this.split.SplitterDistance = 250;
			this.split.TabIndex = 0;
			// 
			// stackPanel1
			// 
			this.stackPanel1.AutoScroll = true;
			this.stackPanel1.Dock = DockStyle.Fill;
			this.stackPanel1.Location = new Point(0, 0);
			this.stackPanel1.Name = "stackPanel1";
			this.stackPanel1.Size = new Size(250, 550);
			this.stackPanel1.TabIndex = 0;
			// 
			// base3DEditor1
			// 
			this.base3DEditor1.Dock = DockStyle.Fill;
			this.base3DEditor1.Location = new Point(0, 0);
			this.base3DEditor1.Name = "base3DEditor1";
			this.base3DEditor1.Size = new Size(496, 550);
			this.base3DEditor1.TabIndex = 0;
			// 
			// SkinEditor
			// 
			this.Controls.Add(this.split);
			this.Name = "SkinEditor";
			this.Size = new Size(750, 550);
			this.split.Panel1.ResumeLayout(false);
			this.split.Panel2.ResumeLayout(false);
			if (i != null)
			{
				i.EndInit();
			}
			this.split.ResumeLayout(false);
			this.ResumeLayout(false);
		}