Esempio n. 1
0
        private void toolStripButtonCreateVideo_Click(object sender, EventArgs e)
        {
            tmpTV = new VideoObject();
            tmpTV.Create();
            if (tmpTV.TerrainVideoObject == null)
            {
                MessageBox.Show("TerrainVideo create failed!");
                return;
            }
            tmpTV.Update();

            pf = new PropertyFrm(tmpTV);
            pf.Text = tmpTV.GUIDString + "的属性";
            pf.Owner = this;        
            pf.Show();

            this.axRenderControl1.InteractMode = gviInteractMode.gviInteractSelect;
            this.axRenderControl1.MouseSelectMode = gviMouseSelectMode.gviMouseSelectClick | gviMouseSelectMode.gviMouseSelectMove;
            this.axRenderControl1.MouseSelectObjectMask = gviMouseSelectObjectMask.gviSelectTileLayer;
            this.axRenderControl1.RcMouseClickSelect += new _IRenderControlEvents_RcMouseClickSelectEventHandler(axRenderControl1_RcMouseClickSelect);
        }
Esempio n. 2
0
        private void dataGridView1_MouseClick(object sender, MouseEventArgs e)
        {
            if ((sender as DataGridView).CurrentRow == null)
                return;

            curRowIndex = (sender as DataGridView).CurrentRow.Index;
            tmpTV = (sender as DataGridView).CurrentRow.Cells[2].Value as VideoObject;

            if (pf.hasClosed())
            {
                pf = new PropertyFrm(tmpTV);
                pf.Text = tmpTV.GUIDString + "的属性";
                pf.Owner = this;
                pf.Show();
            }
            else
            {
                pf.Text = tmpTV.GUIDString + "的属性";
                pf.SetSource(tmpTV);
            }

            cp = (sender as DataGridView).CurrentRow.Cells[1].Value as CameraProperty;
            curVideoIndex = cp.index;
        }