예제 #1
0
파일: Form1.cs 프로젝트: dalinhuang/tdcodes
 private void button2_Click(object sender, EventArgs e)
 {
     TCacheHost host = new TCacheHost();
     host.IpAddress = "127.0.0.1";
     host.Port = 10235;
     if (rp == null)
         rp = new RealProvider(host);
     rp.CheckComunication();
 }
예제 #2
0
파일: Form1.cs 프로젝트: dalinhuang/tdcodes
 private void button6_Click(object sender, EventArgs e)
 {
     TCacheHost host = new TCacheHost();
     host.IpAddress = "127.0.0.1";
     host.Port = 10235;
     if (cep == null)
         cep = new ConfirmEventProvider(host);
     cep.CheckComunication();
 }
예제 #3
0
파일: Form1.cs 프로젝트: dalinhuang/tdcodes
 private void button1_Click(object sender, EventArgs e)
 {
     TCacheHost host = new TCacheHost();
     host.IpAddress = "127.0.0.1";
     host.Port = 10235;
     if (hbp==null)
         hbp = new HeartBreakProvider(host);
     hbp.CheckHeart();
 }
예제 #4
0
 public HeartBreakProvider(TCacheHost pTCacheHost)
 {
     tCacheHost = pTCacheHost;            
     ReplyOverTimeInterval = 5000;
     ConnectServer();
     CheckBreakTimer.Elapsed += new ElapsedEventHandler(CheckBreakTimer_Elapsed);
     CheckSleepTimer.Elapsed += new ElapsedEventHandler(CheckSleepTimer_Elapsed);
     CheckBreakTimer.Start();
     CheckSleepTimer.Start();           
 }
예제 #5
0
파일: Form1.cs 프로젝트: dalinhuang/tdcodes
 private void button7_Click(object sender, EventArgs e)
 {
     TCacheHost host = new TCacheHost();
     host.IpAddress = "192.168.1.191";
     host.Port = 10235;
     if (cp == null)
     {
         cp = new CommandProvider(host);
         cp.CheckHeart();
     }
     //cp.CheckComunication();
 }
예제 #6
0
 public IList<TCacheHost> SelectAll()
 {
     IList<TCacheHost> returns = new List<TCacheHost>();
     DataTable dt= SqlDbAccess.GetInstance().GetTable("select * from TCacheHost");
     foreach (DataRow dr in dt.Rows)
     {
         TCacheHost tch = new TCacheHost();
         tch.FromDataRow(dr);
         returns.Add(tch);
     }
     return returns;
 }
예제 #7
0
  public ConfirmEventProvider(TCacheHost pTCacheHost)
     : base(pTCacheHost)
 {
 }
예제 #8
0
 public RealProvider(TCacheHost pTCacheHost)
     : base(pTCacheHost)
 {
 }
예제 #9
0
 public CommandProvider(TCacheHost pTCacheHost)
     : base(pTCacheHost)
 {
 }
예제 #10
0
 public MaskEventProvider(TCacheHost pTCacheHost)
     : base(pTCacheHost)
 {
 }