几个简单的输出信息和弹出winform窗口

 2个简单的输出信息和2个弹出winform窗口

   #region 输出字符串
        /// <summary>
        /// 输出字符串
        /// </summary>
        /// <param name="msg"></param>
        public static void WriteMessage(string msg)
        {
            Editor ed = Autodesk.AutoCAD.ApplicationServices.Application.DocumentManager.MdiActiveDocument.Editor;
            ed.WriteMessage(msg);
        }
        #endregion

        #region autocad弹出信息
        /// <summary>
        /// autocad弹出信息
        /// </summary>
        /// <param name="msg"></param>
        public static void ShowAlertDialog(string msg)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.ShowAlertDialog(msg);
        }
        #endregion

        #region 弹出windowsForm窗口
        /// <summary>
        /// 通过autocad函数弹出windowsForm窗口,该方法是将窗口置前,锁住当前窗口
        /// </summary>
        /// <param name="frm"></param>
        public static void ShowModalDialog(System.Windows.Forms.Form frm)
        {
             Autodesk.AutoCAD.ApplicationServices.Application.ShowModalDialog(frm);
        }
        
        /// <summary>
        /// 通过autocad函数弹出windowsForm窗口,该弹出窗口没有被锁定
        /// </summary>
        /// <param name="frm"></param>
        public static void ShowModelessDialog(System.Windows.Forms.Form frm)
        {
            Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessDialog(frm);
        }
        #endregion

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值