Form1.cs 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows.Forms;
  10. using HslCommunication;
  11. using HslCommunication.Enthernet;
  12. namespace GarnetClient
  13. {
  14. public partial class Form1 : Form
  15. {
  16. public Form1()
  17. {
  18. InitializeComponent();
  19. }
  20. NetSimplifyClient client;
  21. private void button1_Click(object sender, EventArgs e)
  22. {
  23. client = new NetSimplifyClient();
  24. client.IpAddress = "127.0.0.1";
  25. client.Port = 6379;
  26. var rev = client.ConnectServer();
  27. if (!rev.IsSuccess)
  28. {
  29. MessageBox.Show($"{rev.Message}");
  30. }
  31. }
  32. private void button2_Click(object sender, EventArgs e)
  33. {
  34. }
  35. private void button4_Click(object sender, EventArgs e)
  36. {
  37. NetHandle netHandle = new NetHandle();
  38. }
  39. }
  40. }