コード例 #1
0
        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();
            }
        }