Пример #1
0
        //SocketHelper.OnReceiveDataDelegate original;
        public WatchForm(SocketHelper sh, SocketState cs)
        {
            this.sh = sh;
            this.cs = cs;
            //this.original = sh.OnReceiveDataCallback;

            InitializeComponent();
        }
        public void Begin()
        {
            Settings = EOF.GetSettings();
            CommandHandlers = InitializeCommandHandlers();

            ch = new SocketHelper(Settings)
            {
                OnConnectCallback = OnConnect
            };
            ch.OnReceiveCommandCallback.Add(OnReceiveCommand);
        }
Пример #3
0
        public FileBrowser(SocketState cs, SocketHelper sh)
        {
            this.cs = cs;
            this.sh = sh;
            sh.OnReceiveCommandCallback.Add(OnReceiveCommand);

            upLabel = new Label()
            {
                Text = "..",
                ForeColor = Color.DarkRed,
                Tag = false,
            };
            upLabel.Click += upLabel_Click;

            InitializeComponent();
        }
Пример #4
0
 private void StopListening()
 {
     if (sh != null)
     {
         sh.Stop();
         sh = null;
         //this.UpdateToolstrip();
         System.Threading.Thread.Sleep(250);
     }
 }
Пример #5
0
        private void Listen()
        {
            this.StopListening();

            sh = new SocketHelper(8008)
            {
                //OnReceiveDataCallback = OnReceiveData,
                OnConnectCallback = OnClientConnected,
                OnDisconnectCallback = OnClientDisconnected
            };

            sh.OnReceiveCommandCallback.Add(OnReceiveCommand);
            //this.UpdateToolstrip();
        }