public HXMEditor(EditorHXMFile datafile, StandardUI host, SaveHandler saveHandler) { InitializeComponent(); robotPanel = new EditorPanels.RobotPanel(transactionManager, 0); robotPanel.Dock = DockStyle.Fill; RobotTabPage.Controls.Add(robotPanel); components.Add(robotPanel); polymodelPanel = new EditorPanels.PolymodelPanel(transactionManager, 1, host.DefaultPigFile, host.DefaultPalette, datafile); polymodelPanel.Dock = DockStyle.Fill; ModelTabPage.Controls.Add(polymodelPanel); components.Add(polymodelPanel); this.datafile = datafile; this.host = host; palette = host.DefaultPalette; modelRenderer = new ModelRenderer(datafile.BaseHAM, host.DefaultPigFile, palette); string currentFilename = "Untitled"; if (saveHandler != null) { currentFilename = saveHandler.GetUIName(); } this.saveHandler = saveHandler; this.Text = string.Format("{0} - HXM Editor", currentFilename); transactionManager.undoEvent += DoUndoEvent; }
public HXMEditor(EditorHXMFile datafile, StandardUI host, string filename) { InitializeComponent(); //can't use GLControls with designer? eh? glControl1 = new GLControl(); glControl1.Location = new System.Drawing.Point(pictureBox3.Location.X, pictureBox3.Location.Y); glControl1.Size = pictureBox3.Size; glControl1.Load += glControl1_Load; glControl1.Paint += glControl1_Paint; glControl1.Visible = true; glControl1.Enabled = true; tabPage7.Controls.Add(glControl1); tabPage7.PerformLayout(); pictureBox3.Enabled = false; pictureBox3.Visible = false; robotPanel = new EditorPanels.RobotPanel(); robotPanel.Dock = DockStyle.Fill; RobotTabPage.Controls.Add(robotPanel); components.Add(robotPanel); this.datafile = datafile; this.host = host; palette = host.DefaultPalette; modelRenderer = new ModelRenderer(datafile.BaseHAM, host.DefaultPigFile, palette); this.Text = string.Format("{0} - HXM Editor", currentFilename); }
public PolymodelPanel(TransactionManager transactionManager, int tabPage, PIGFile piggyFile, Palette palette, EditorHXMFile datafile) { InitializeComponent(); this.transactionManager = transactionManager; this.tabPage = tabPage; //Create the model viewer baround the template control ModelViewControl = new OpenTK.GLControl(); ModelViewControl.BackColor = System.Drawing.Color.Black; ModelViewControl.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; ModelViewControl.Location = new System.Drawing.Point(452, 61); ModelViewControl.Anchor = GLControlStandin.Anchor; ModelViewControl.Name = "glControl1"; ModelViewControl.Size = new System.Drawing.Size(256, 256); ModelViewControl.TabIndex = 0; ModelViewControl.VSync = false; ModelViewControl.Load += new System.EventHandler(this.ModelViewControl_Load); ModelViewControl.Paint += new System.Windows.Forms.PaintEventHandler(this.ModelViewControl_Paint); Controls.Add(ModelViewControl); modelRenderer = new ModelRenderer(datafile.BaseHAM, piggyFile, palette); TextureGroupBox.Visible = true; hxmFile = datafile; }
public void InitHXM(EditorHXMFile hxmFile) { this.hxmFile = hxmFile; HXMGroupBox.Visible = true; }