当前位置: 首页>>代码示例>>C#>>正文


C# DevExpress.SetWaitFormDescription方法代码示例

本文整理汇总了C#中DevExpress.SetWaitFormDescription方法的典型用法代码示例。如果您正苦于以下问题:C# DevExpress.SetWaitFormDescription方法的具体用法?C# DevExpress.SetWaitFormDescription怎么用?C# DevExpress.SetWaitFormDescription使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在DevExpress的用法示例。


在下文中一共展示了DevExpress.SetWaitFormDescription方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PHY_Card_all

        public void PHY_Card_all(out string[] List, DevExpress.XtraSplashScreen.SplashScreenManager Wait,out List<string> list1)
        {
            List = null;
            list1 = null;
            string t = "";

            if (tcpClient.Connected)
            {
                string strCMD = "sh cable modem phy\r\n";

                ASCIIEncoding encoder = new ASCIIEncoding();
                byte[] buffer = encoder.GetBytes(strCMD);
                NetworkStream clientStream = tcpClient.GetStream();
                clientStream.Write(buffer, 0, buffer.Length);
                Thread.Sleep(100);
                //Application.DoEvents();
                byte[] message = new byte[8192 * 30];

                do
                {
                    Thread.Sleep(20);
                } while (!clientStream.DataAvailable);

                if (clientStream.CanRead && clientStream.DataAvailable)
                {
                    //blocks until a client sends a message
                    try
                    {
                        //clientStream.Read(message, 0, (int)8192 * 30);
                       // Thread.Sleep(_Theard);
                        //t = encoder.GetString(message);
                        int bytesRead;
                        string result = "";
                        while (true)
                        {
                            try
                            {
                                bytesRead = 0;
                                //buffer = encoder.GetBytes(" ");
                                //clientStream.Write(buffer, 0, buffer.Length);
                                //Thread.Sleep(20);
                                bytesRead = clientStream.Read(message, 0, 8192 * 30);
                                if (bytesRead == 0)
                                {
                                    break;
                                }
                                t = encoder.GetString(message, 0, bytesRead);
                                t = t.Trim();
                                result += t;
                                if (t.EndsWith("--More--"))
                                {
                                    buffer = encoder.GetBytes(" ");
                                    clientStream.Write(buffer, 0, buffer.Length);
                                    Thread.Sleep(50);
                                   // Application.DoEvents();
                                    Class.App.Wait++;
                                }
                                if (t.EndsWith("MOT:7A#"))
                                {
                                    break;
                                }
                                if (Wait != null)
                                {
                                    if (Wait.IsSplashFormVisible)
                                    {
                                        Regex r2 = new Regex(@" (\d+)/(.*)L0 ");
                                        Match m2 = r2.Match(t);
                                        string location = "";
                                        if (m2.Success)
                                        {
                                            location = m2.Value.Trim();
                                        }
                                        Wait.SetWaitFormDescription("Đang tải PHY ( " + location + " )");
                                        Thread.Sleep(2);
                                    }
                                }
                            }
                            catch
                            {
                              //  MessageBox.Show(ex.Message);
                                break;
                            }
                        }

                      // List<string> list = new List<string>();
                        result = result.Replace("TDMA", "TDMA \n");
                        result = result.Replace("\r--More--\b\b\b\b\b\b\b\b\b[K", "");
                        result = result.Replace("\r", "");
                        List = result.Split('\n');

                        list1 = new List<string>();
                        //for (int i = 0; i < List.Length; i++)
                        //{

                        //    List[i] = List[i].ToString().Replace("\r--More-- \b\b\b\b\b\b\b\b\b[K", "");
                        //    List[i] = List[i].ToString().Replace("\r", "");
                        //    List[i] = List[i].ToString().Replace("--More--\b\b\b\b\b\b\b\b\b[K", "");

                        //    if (List[i].ToString().Trim().EndsWith("TDMA"))
                        //    {
//.........这里部分代码省略.........
开发者ID:tayeumi,项目名称:HFC,代码行数:101,代码来源:CMTS.cs

示例2: Remote_Card_all

        public void Remote_Card_all(out string[] List, DevExpress.XtraSplashScreen.SplashScreenManager Wait)
        {
            List = null;

            string t = "";

            if (tcpClient.Connected)
            {
                string strCMD = "sh cable modem remote\r\n";

                ASCIIEncoding encoder = new ASCIIEncoding();
                byte[] buffer = encoder.GetBytes(strCMD);
                NetworkStream clientStream = tcpClient.GetStream();
                clientStream.Write(buffer, 0, buffer.Length);
                Thread.Sleep(100);
               // Application.DoEvents();
                byte[] message = new byte[8192 * 30];

                do
                {
                    Thread.Sleep(20);
                } while (!clientStream.DataAvailable);

                if (clientStream.CanRead && clientStream.DataAvailable)
                {
                    //blocks until a client sends a message
                    try
                    {
                       // clientStream.Read(message, 0, (int)8192 * 30);
                       // Thread.Sleep(_Theard);
                      //  t = encoder.GetString(message);
                        int bytesRead;
                        string result = "";
                            while (true)
                            {
                                try
                                {
                                    bytesRead = 0;
                                    //buffer = encoder.GetBytes(" ");
                                    //clientStream.Write(buffer, 0, buffer.Length);
                                    //Thread.Sleep(20);
                                    bytesRead = clientStream.Read(message, 0, 8192 * 30);
                                    if (bytesRead == 0)
                                    {
                                        break;
                                    }
                                    t = encoder.GetString(message, 0, bytesRead);
                                    t=t.Trim();
                                    result += t;
                                    if (t.EndsWith("--More--"))
                                    {
                                        buffer = encoder.GetBytes(" ");
                                        clientStream.Write(buffer, 0, buffer.Length);
                                        Thread.Sleep(10);
                                       // Application.DoEvents();
                                    }
                                    if(t.EndsWith("MOT:7A#"))
                                    {
                                        break;
                                    }
                                    //
                                    if (Wait != null)
                                    {
                                        if (Wait.IsSplashFormVisible)
                                        {
                                            Regex r2 = new Regex(@"(\d+)/(.*)L0 ");
                                            Match m2 = r2.Match(t);
                                            string location="";
                                            if (m2.Success)
                                            {
                                               location = m2.Value.Trim();
                                            }
                                            Wait.SetWaitFormDescription("Đang tải Remote ( " + location+" )");
                                        }
                                    }
                                }
                                catch
                                {
                                    break;
                                }
                            }
                        result = result.Replace("line", "line \n");
                        List = result.Split('\n');
                        for (int i = 0; i < List.Length; i++)
                        {
                            List[i] = List[i].ToString().Replace("\r--More-- \b\b\b\b\b\b\b\b\b[K", "");
                            List[i] = List[i].ToString().Replace("\r", "");
                        }

                    }
                    catch { }

                }

            }
        }
开发者ID:tayeumi,项目名称:HFC,代码行数:96,代码来源:CMTS.cs


注:本文中的DevExpress.SetWaitFormDescription方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。