private void MainForm_Load(object sender, EventArgs e) { asc.controllInitializeSize(this); sgworld.OnLoadFinished += new _ISGWorld61Events_OnLoadFinishedEventHandler(OnProjectLoadFinished); //string flyFile = "http://www.skylineglobe.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly"; string flyFile = Application.StartupPath + "\\elta.fly"; //ITE.LoadEx(Application.StartupPath + @"\elta.fly", "", "", 0); sgworld.Project.Open(flyFile, true, null, null); CoTE = new TerraExplorerClass(); ITE = (TerraExplorerX.ITerraExplorer5)CoTE; IInfoTree = (TerraExplorerX.IInformationTree5)CoTE; IRender = (IRender5)CoTE; IObjectManager = (IObjectManager5)CoTE; this.CoTE.OnLButtonDown += new _ITerraExplorerEvents5_OnLButtonDownEventHandler(OnLButtonDown); numObjs = 0; currObj = 0; objArray = new object[2000]; sx = new double[2000]; sy = new double[2000]; xx = new double[2000]; yy = new double[2000]; InitArray(); }
private void button1_Click(object sender, EventArgs e) { string path = textBox5.Text; string s1 = textBox1.Text; string s2 = textBox2.Text; string s3 = textBox3.Text; string s4 = textBox4.Text; string mes = String.Empty; IPosition61 dztpos = null; TECoClass = new TerraExplorerClass(); ITerraExplorer = (ITerraExplorer5)TECoClass; IInfoTree = (IInformationTree5)TECoClass; IObjectManager = (IObjectManager5)TECoClass; try { double dxcoord = double.Parse(s1); double dycoord = double.Parse(s2); double altitude = double.Parse(s3); AltitudeTypeCode ealit = AltitudeTypeCode.ATC_TERRAIN_RELATIVE; dztpos = MainForm.sgworld.Creator.CreatePosition(dxcoord, dycoord, altitude, ealit, 0, 90, 100.0, 1000); dzt = MainForm.sgworld.Creator.CreateModel(dztpos, path, 1, ModelTypeCode.MT_NORMAL, 0, s4); } catch (Exception ex) { mes = String.Format("CreateLabelButton_Click Exception :{0}", ex.Message); Log4NetHelper.WriteLog(typeof(AddgeologicbodyForm), ex); MessageBox.Show(mes); } }
public AddbuildingForm() { InitializeComponent(); TECoClass = new TerraExplorerClass(); ITerraExplorer = (ITerraExplorer5)TECoClass; IInfoTree = (IInformationTree5)TECoClass; IObjectManager = (IObjectManager5)TECoClass; }
public MainForm() { InitializeComponent(); asc.controllInitializeSize(this); this.CoTE = new TerraExplorerClass(); this.ITE = (ITerraExplorer51)CoTE; this.IInfoTree = (IInformationTree5)CoTE; this.IPlane = (IPlane5)CoTE; this.Ita = (ITerrain5)CoTE; sgworld = new SGWorld61(); CoTE.OnFrame += new _ITerraExplorerEvents5_OnFrameEventHandler(TE_OnFrame); }