//导出皮肤 private void OutputToolStripMenuItem_Click(object sender, EventArgs e) { if (GlobalConfig.Project != null) { Form_OutPut outputForm = new Form_OutPut(GlobalConfig.Project.Developer, GlobalConfig.Project.GetDefaultOutputPath(), delegate() { Form_Progress form_Progress = new Form_Progress(100, true); form_Progress.Location = new Point((displayWidth - form_Progress.Width) / 2, (displayHeight - form_Progress.Height) / 2); form_Progress.Show(); string err = GlobalConfig.Controller.StartOutput( GlobalConfig.Project.CarConfig.outputs, GlobalConfig.Project.CarConfig.PropertyIdMapping, GlobalConfig.Project.GetDefaultOutputPath(), form_Progress); if (err != null) { Console.WriteLine("-------------------> result " + err); } }); outputForm.SetDesktopBounds(Form_Main.displayWidth / 4, 80, Form_Main.displayWidth / 2, Form_Main.displayHeight / 2 + 150); outputForm.Show(); } }
private void loadScene(TreeView treeview, CarConfig carConfig) { Form_Progress form_Progress = new Form_Progress(carConfig.GetTotalSceneNum(), false); form_Progress.Location = new Point((displayWidth - form_Progress.Width) / 2, (displayHeight - form_Progress.Height) / 2); form_Progress.Show(); GlobalConfig.Controller.HideCenterBoardPictureBox(); rightPanel.SuspendLayout(); treeview.BeginUpdate(); foreach (Scene scene in carConfig.Scenes) { TreeNode sceneNode = new TreeNode { Name = scene.Id.ToString(), Text = scene.Name }; GlobalConfig.Controller.InitScene(scene.Id, true); foreach (Scene childScene in scene.children) { sceneNode.Nodes.Add(new TreeNode { Name = childScene.Id.ToString(), Text = childScene.Name }); GlobalConfig.Controller.InitScene(childScene.Id, true); form_Progress.AddProgressValue(1, string.Format("场景 {0} 已加载", childScene.Name)); } form_Progress.AddProgressValue(1, string.Format("场景 {0} 已加载", scene.Name)); treeview.Nodes.Add(sceneNode); } treeview.EndUpdate(); rightPanel.ResumeLayout(); GlobalConfig.Controller.ShowCenterBoardPictureBox(); form_Progress.Close(); form_Progress.Dispose(); }