| | |
| | | { |
| | | try |
| | | { |
| | | this.SG.OnLoadFinished -= SG_OnLoadFinished; |
| | | //this.SG.OnLoadFinished -= SG_OnLoadFinished; |
| | | |
| | | string id = this.SG.ProjectTree.FindItem(startName); |
| | | if (string.IsNullOrEmpty(id)) return; |
| | |
| | | |
| | | public void InvokeByCode(int code) |
| | | { |
| | | LogOut.Info("InvokeByCode > 0x" + code.ToString("x")); |
| | | switch (code) |
| | | { |
| | | case 0xc0: // 重置鼠标模式 |
| | |
| | | #region 方案管理 |
| | | private void Save() |
| | | { |
| | | //SG.Command.Execute(1003, null); |
| | | SaveLocation(); |
| | | this.SG.Project.Save(); |
| | | this.SG.Command.Execute(1019, 0); // Capture Tree State |
| | | SG.Command.Execute(1003, null); // this.SG.Project.Save(); |
| | | } |
| | | |
| | | private void SaveAs(string flyPath) |
| | | { |
| | | SaveLocation(); |
| | | this.SG.Command.Execute(1019, 0); // Capture Tree State |
| | | this.SG.Project.SaveAs(flyPath); |
| | | } |
| | | |
| | | private void OpenPrj() |
| | | { |
| | | string flyPath = ReadPrjPath(); |
| | | if (String.IsNullOrEmpty(flyPath)) flyPath = Path.Combine(mainUrl, "see.fly"); |
| | | if (String.IsNullOrEmpty(flyPath)) flyPath = this.fly; // flyPath = Path.Combine(mainUrl, "see.fly"); |
| | | |
| | | if (!File.Exists(flyPath)) |
| | | { |
| | |
| | | try |
| | | { |
| | | string flyPath = ReadPrjPath(); |
| | | if (String.IsNullOrEmpty(flyPath)) flyPath = Path.Combine(mainUrl, "see.fly"); |
| | | if (String.IsNullOrEmpty(flyPath)) flyPath = this.fly; // flyPath = Path.Combine(mainUrl, "see.fly"); |
| | | |
| | | this.Save(); |
| | | //this.SG.Project.SaveAs(flyPath); |
| | |
| | | return null; |
| | | } |
| | | } |
| | | |
| | | private String GetSavePath() |
| | | { |
| | | string appData = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData); |
| | | string tePathName = ConfigurationManager.AppSettings["tePath"].Contains("SmartEarth") ? "SmartEarth" : "Skyline"; |
| | | |
| | | return Path.Combine(appData, tePathName, "TerraExplorer"); |
| | | } |
| | | #endregion |
| | | } |
| | | } |