private void btnCreateLocationStep_Click(object sender, EventArgs e) { if (_presentation != null) { this.axRenderControl1.Camera.GetCamera(out position, out angle); IPosition _pos = new Position(); _pos.X = position.X; _pos.Y = position.Y; _pos.Altitude = position.Z; _pos.Heading = angle.Heading; _pos.Tilt = angle.Tilt; _pos.Roll = angle.Roll; IPresentationStep _step = _presentation.CreateLocationStep(gviPresentationStepContinue.gviPresentationStepContinueWait, 0, "", _pos, _presentation.Steps.Count); //将值写入表格 DataRow dr = dt.NewRow(); dr[0] = _presentation.Steps.Count - 1; dr[1] = position.X; dr[2] = position.Y; dr[3] = position.Z; dr[4] = angle.Heading; dr[5] = angle.Tilt; dr[6] = angle.Roll; dr[7] = GviPresentationStepType2String(_step.Type); dt.Rows.Add(dr); this.dataGridView1.Update(); } }
private void btnReplaceLocationStep_Click(object sender, EventArgs e) { if (_presentation != null && selectPointIndex != -1) { _presentation.DeleteStep(indexInPresentation); this.axRenderControl1.Camera.GetCamera(out position, out angle); IPosition _pos = new Position(); _pos.X = position.X; _pos.Y = position.Y; _pos.Altitude = position.Z; _pos.Heading = angle.Heading; _pos.Tilt = angle.Tilt; _pos.Roll = angle.Roll; IPresentationStep _step = _presentation.CreateLocationStep(gviPresentationStepContinue.gviPresentationStepContinueWait, 0, "", _pos, indexInPresentation); //更新表格 DataRow newDr = dt.Rows[selectPointIndex]; newDr[0] = indexInPresentation; newDr[1] = position.X; newDr[2] = position.Y; newDr[3] = position.Z; newDr[4] = angle.Heading; newDr[5] = angle.Tilt; newDr[6] = angle.Roll; newDr[7] = GviPresentationStepType2String(_step.Type); this.dataGridView1.Update(); } }
void axRenderControl1_RcBeforePresentationItemActivation(string PresentationID, IPresentationStep Step) { this.Text = Step.Index + "/" + Step.Type.ToString() + ": Activation"; }