示例#1
0
        static void threadComsumeMemeTask()
        {
            byte[]bs;

            while (true)
            {
                bs = new byte[10000];
                sdata s1 = new sdata();
                sdata s2 = new sdata();
                System.Net.WebRequest req = System.Net.HttpWebRequest.Create(temp.Settings1.Default.TIMCC_uri);

                System.IO.Stream stream = req.GetResponse().GetResponseStream();
                System.IO.TextReader rd = new System.IO.StreamReader(stream);
                System.IO.TextWriter wr = new System.IO.StreamWriter(Util.CPath(AppDomain.CurrentDomain.BaseDirectory + "tmp.xml"));
                wr.Write(rd.ReadToEnd());
                wr.Flush();
                wr.Close();
                rd.Close();
                stream.Close();
                wr.Dispose();
                rd.Dispose();
                stream.Dispose();

                Ds ds = five_min_section_parser(Util.CPath(AppDomain.CurrentDomain.BaseDirectory + "tmp.xml"));
                // Curr5minSecDs.Dispose();
                Curr5minSecDs = ds;
                System.Threading.Thread.Sleep(1000);

            }
        }
示例#2
0
        // memtest();
        // VD_Ttest();
        //public static Ds RGSConfDs = new Ds();
        //public static Ds RMSConfDs = new Ds();
        static void memtest()
        {
            System.Threading.Thread th = new System.Threading.Thread(threadComsumeMemeTask);
            th.Start();
            while (true)
            {

                    sdata s1 = new sdata();
                    sdata s2 = new sdata();
                    s1.pt = s2;
                    s2.pt = s1;

               // temp.Ds ds = new Ds();

                System.Threading.Thread.Sleep(1000*60);

            }
        }