コード例 #1
0
ファイル: MainFrm.cs プロジェクト: xiaojunbeyond/RGEOS
        private void tspDrawLine_Click(object sender, EventArgs e)
        {
            HookHelper mHook = HookHelper.Instance();
            ICommand   pCmd  = new DrawPolylineTool();

            pCmd.OnCreate(mHook);
            mHook.MapControl.CurrentTool = pCmd as ITool;
        }
コード例 #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            float    dx, dy;
            Graphics g = this.CreateGraphics();

            try
            {
                dx = g.DpiX;
                dy = g.DpiY;
            }
            finally
            {
                g.Dispose();
            }
            MessageBox.Show(string.Format("{0}/{1}", dx, dy));
            HookHelper mHook = HookHelper.Instance();
            ICommand   pCmd  = new DrawPolylineTool();

            pCmd.OnCreate(mHook);
            mHook.MapControl.CurrentTool = pCmd as ITool;
        }