Exemple #1
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            simpleButton2.Enabled = false;
            if (this.lock_btn_create)
            {
                try
                {
                    if (!this.GetProperty())
                    {
                        return;
                    }
                    this.polyLine = Program.TE.IObjectManager51_CreatePolyline(null, 0x0000ff, HeightStyleCode.HS_ON_TERRAIN, 0, "newline");

                    this.list = new List <double[]>();

                    this.lock_onLbuttonDown = true;
                    this.lock_onRbuttonDown = true;

                    this.lock_btn_create = false;
                }
                catch (Exception)
                {
                }
            }
            else
            {
                MessageBox.Show("浏览路径已开始创建,请勿重复点击", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
Exemple #2
0
        //开始
        private void simpleButtonOK_Click(object sender, EventArgs e)
        {
            try
            {
                GroupID = this.SgWorld.ProjectTree.FindItem("TerrainModify");
                if (GroupID == 0)
                {
                    GroupID = this.SgWorld.ProjectTree.CreateGroup("TerrainModify", 0);
                    this.pITerrainPolyline = (this.TerraExplorer as IObjectManager51).CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");
                }
                else
                {
                    this.pITerrainPolyline = (this.TerraExplorer as IObjectManager51).CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");
                }

                (this.SgWorld as _ISGWorld61Events_Event).OnLButtonDown += new _ISGWorld61Events_OnLButtonDownEventHandler(sgworld_OnLButtonDown);
                (this.SgWorld as _ISGWorld61Events_Event).OnRButtonDown += new _ISGWorld61Events_OnRButtonDownEventHandler(sgworld_OnRButtonDown);

                this.LClickCount = 0;
                ListVerticsArray.Clear();
                (this.TerraExplorer as IRender5).SetMouseInputMode(MouseInputMode.MI_COM_CLIENT);
                pbhander = "modify";
            }
            catch
            {
                MessageBox.Show("开始绘制失败!");
            }
        }
Exemple #3
0
        //开始绘制
        private void simpleBtnDraw_Click(object sender, EventArgs e)
        {
            try
            {
                if (!StartDraw)
                {
                    //判断是否填写限高高度
                    //if (this.textEditLmtHeight.Text == "")
                    //    MessageBox.Show("请先填写限高高度");
                    //else
                    //{
                    StartDraw = true;
                    this.simpleBtnClear.Enabled = false;
                    Program.pRender.SetMouseInputMode(MouseInputMode.MI_COM_CLIENT);

                    GroupID = Program.sgworld.ProjectTree.FindItem("Temp");
                    if (GroupID == 0)
                    {
                        GroupID       = Program.sgworld.ProjectTree.CreateGroup("Temp");
                        this.polyLine = Program.TE.IObjectManager51_CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");
                    }
                    else
                    {
                        this.polyLine = Program.TE.IObjectManager51_CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");
                    }

                    Program.TE.OnLButtonDown += new TerraExplorerX._ITerraExplorerEvents5_OnLButtonDownEventHandler(TE_OnLButtonDown);
                    //Program.TE.OnFrame += new TerraExplorerX._ITerraExplorerEvents5_OnFrameEventHandler(TE_OnFrame);
                    Program.TE.OnRButtonDown += new TerraExplorerX._ITerraExplorerEvents5_OnRButtonDownEventHandler(TE_OnRButtonDown);
                    //clickIndex = 0;

                    //}
                }
            }
            catch
            {
                MessageBox.Show("开始绘制失败!", "", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }
Exemple #4
0
        private void simpleButton1_Click(object sender, EventArgs e)
        {
            simpleButton2.Enabled = false;
            if (this.lock_btn_create)
            {
                try
                {
                    if (!this.GetProperty())
                    {
                        return;
                    }
                    this.polyLine = Program.TE.IObjectManager51_CreatePolyline(null, 0x0000ff, HeightStyleCode.HS_ON_TERRAIN, 0, "newline");

                    this.list = new List<double[]>();

                    this.lock_onLbuttonDown = true;
                    this.lock_onRbuttonDown = true;

                    this.lock_btn_create = false;
                }
                catch (Exception)
                {

                }

            }
            else
            {
                MessageBox.Show("���·���ѿ�ʼ�����������ظ����", "��ʾ", MessageBoxButtons.OK, MessageBoxIcon.Information);

            }
        }
Exemple #5
0
        //开始
        private void simpleButtonOK_Click(object sender, EventArgs e)
        {
            try
            {
                GroupID = this.SgWorld.ProjectTree.FindItem("TerrainModify");
                if (GroupID == 0)
                {
                    GroupID = this.SgWorld.ProjectTree.CreateGroup("TerrainModify", 0);
                    this.pITerrainPolyline = (this.TerraExplorer as IObjectManager51).CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");
                }
                else
                    this.pITerrainPolyline = (this.TerraExplorer as IObjectManager51).CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");

                (this.SgWorld as _ISGWorld61Events_Event).OnLButtonDown += new _ISGWorld61Events_OnLButtonDownEventHandler(sgworld_OnLButtonDown);
                (this.SgWorld as _ISGWorld61Events_Event).OnRButtonDown += new _ISGWorld61Events_OnRButtonDownEventHandler(sgworld_OnRButtonDown);

                this.LClickCount = 0;
                ListVerticsArray.Clear();
                (this.TerraExplorer as IRender5).SetMouseInputMode(MouseInputMode.MI_COM_CLIENT);
                pbhander = "modify";
            }
            catch
            {
                MessageBox.Show("开始绘制失败!");
            }
        }
Exemple #6
0
        //开始绘制
        private void simpleBtnDraw_Click(object sender, EventArgs e)
        {
            try
            {
                if (!StartDraw)
                {
                    //判断是否填写限高高度
                    //if (this.textEditLmtHeight.Text == "")
                    //    MessageBox.Show("请先填写限高高度");
                    //else
                    //{
                    StartDraw = true;
                    this.simpleBtnClear.Enabled = false;
                    Program.pRender.SetMouseInputMode(MouseInputMode.MI_COM_CLIENT);

                    GroupID = Program.sgworld.ProjectTree.FindItem("Temp");
                    if (GroupID == 0)
                    {
                        GroupID = Program.sgworld.ProjectTree.CreateGroup("Temp");
                        this.polyLine = Program.TE.IObjectManager51_CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");
                    }
                    else
                        this.polyLine = Program.TE.IObjectManager51_CreatePolyline(null, 0x0000ff, HeightStyleCode.HSC_TERRAIN_RELATIVE, GroupID, "newline");

                    Program.TE.OnLButtonDown += new TerraExplorerX._ITerraExplorerEvents5_OnLButtonDownEventHandler(TE_OnLButtonDown);
                    //Program.TE.OnFrame += new TerraExplorerX._ITerraExplorerEvents5_OnFrameEventHandler(TE_OnFrame);
                    Program.TE.OnRButtonDown += new TerraExplorerX._ITerraExplorerEvents5_OnRButtonDownEventHandler(TE_OnRButtonDown);
                    //clickIndex = 0;

                    //}
                }
            }
            catch
            {
                MessageBox.Show("开始绘制失败!", "", MessageBoxButtons.OK, MessageBoxIcon.Stop);
            }
        }