C#:通用方法总结—第11集
创始人
2024-11-11 18:37:28
0

大家好,今天继续分享我们的通用方法系列。

下面是今天要分享的通用方法:

(1)这个通用方法为Ug’校验选中体的个数:

  ///

    ///输出选中体个数

    ///

    publicint CheckOneBody()

    {

        int selcount = 0;      

        theUFSession.Ui.AskGlobalSelObjectList(out selcount, out objs);

        if (selcount < 1)

        {

            theUI.NXMessageBox.Show("提示", NXMessageBox.DialogType.Information, "一个体都没有被选中");

            return selcount;

        }

        elseif (selcount > 1)

        {

            theUI.NXMessageBox.Show("提示", NXMessageBox.DialogType.Information, "选中了”+ selcount +”个体");

            ok_cb();

            return selcount;

        }

        return selcount;

    }

(2)这个通用方法为判断是公制还是英制:

///

    ///判断是公制还是英制

    ///

    publicvoid GetPartUnit()

    {

        int returnvalue = 0;

        theUFSession.Part.AskUnits(workPart.Tag, out returnvalue);

        if(returnvalue!=1)

        {

            ism = false;

        }

    }

(3)这个通用方法为datagridview判断是否选中单元格:

///

        /// datagridview判断是否选中单元格

        ///

        ///

        ///

        privatevoid dataGridView2_CellDoubleClick(object sender, DataGridViewCellEventArgs e)

        {

int  rows=0

            if (e.RowIndex != -1 && e.ColumnIndex != -1)

            {

                if (dataGridView2.CurrentCell != null)

                {

                    Rows=1;

                   

                }

            }

         

        }

今天要分享的通用方法就是这么多,我们下篇文章再见。

相关内容

热门资讯

透视法门!hhpoker哪个俱... 透视法门!hhpoker哪个俱乐部靠谱,hhpoker买挂(透视)都是有脚本app(哔哩哔哩)1、透...
透视技法!pokermaste... 透视技法!pokermaster修改器,菠萝德普辅助器免费版在哪里(透视)确实是有挂(哔哩哔哩)1、...
透视手段!wepokerplu... 透视手段!wepokerplus透视脚本免费,wepoker私人局透视插件(透视)切实真的有透视挂(...
透视演示!wepoker公共底... 透视演示!wepoker公共底牌,hhpoker一直输有挂吗(透视)确实真的是有挂(哔哩哔哩)1.h...
透视妙计!德扑之心免费透视,德... 透视妙计!德扑之心免费透视,德普之星透视辅助(透视)真是是有脚本app(哔哩哔哩)德扑之心免费透视脚...
透视办法!hhpoker德州有... 透视办法!hhpoker德州有挂吗,hhpoker有辅助吗(透视)果然是有挂(哔哩哔哩)hhpoke...
透视学习!德普之星私人局辅助免... 透视学习!德普之星私人局辅助免费,德普软件(透视)都是真的是有透视软件(哔哩哔哩)德普之星私人局辅助...
透视教程书!aapoker怎么... 透视教程书!aapoker怎么设置抽水,佛手在线大菠萝辅助(透视)竟然真的是有挂(哔哩哔哩)1、这是...
透视阶段!hhpkoer辅助挂... 透视阶段!hhpkoer辅助挂是真的吗,hhpoker辅助软件(透视)好像真的是有脚本方法(哔哩哔哩...
透视烘培!wepoker轻量版... 透视烘培!wepoker轻量版有透视吗,佛手在线大菠萝为什么都输(透视)确实有挂(哔哩哔哩)亲,关键...