| | |
| | | public partial class FrmWin : Form |
| | | { |
| | | #region 成员变量+构造函数+事件 |
| | | string fly; |
| | | |
| | | FrmTree tree; |
| | | |
| | | FrmTool tool; |
| | |
| | | mainUrl = Application.StartupPath; |
| | | bool isTest = "1" == ConfigurationManager.AppSettings["isTest"]; |
| | | |
| | | string fly = isTest ? ConfigurationManager.AppSettings["testFly"] : Path.Combine(Application.StartupPath, "Resources\\sample.fly"); |
| | | if (!File.Exists(fly)) |
| | | this.fly = isTest ? ConfigurationManager.AppSettings["testFly"] : Path.Combine(Application.StartupPath, "Resources\\sample.fly"); |
| | | if (!File.Exists(this.fly)) |
| | | { |
| | | LogOut.Error("Fly文件不存在:" + fly); |
| | | LogOut.Error("Fly文件不存在:" + this.fly); |
| | | return; |
| | | } |
| | | |
| | | SG = new SGWorld74(); |
| | | SG.OnLoadFinished += SG_OnLoadFinished; |
| | | SG.Open(fly); |
| | | |
| | | tree = new FrmTree(); |
| | | tree.Show(this); |
| | |
| | | tree.FormBorderStyle = FormBorderStyle.Sizable; |
| | | tool = new FrmTool(this); |
| | | tool.Show(); |
| | | |
| | | SG.Open(this.fly); |
| | | } |
| | | else |
| | | { |
| | | this.WindowState = FormWindowState.Maximized; |
| | | tree.WindowState = FormWindowState.Maximized; |
| | | } |
| | | //else |
| | | //{ |
| | | // this.WindowState = FormWindowState.Maximized; |
| | | // tree.WindowState = FormWindowState.Maximized; |
| | | //} |
| | | |
| | | } |
| | | catch (Exception ex) |
| | |
| | | |
| | | void SG_OnLoadFinished(bool bSuccess) |
| | | { |
| | | // |
| | | this.SG.OnLoadFinished -= SG_OnLoadFinished; |
| | | } |
| | | |
| | | void FrmWin_FormClosed(object sender, FormClosedEventArgs e) |
| | |
| | | SG.Command.Execute(1028, null); break; |
| | | case 0xd6: // 传统4D产品派生(集成osgblab) |
| | | InvokeOsgbLab(); break; |
| | | case 0xd7: // 打开fly |
| | | SG.Open(this.fly); break; |
| | | } |
| | | } |
| | | |