예제 #1
0
        void basicNoUIObj_Synchronizing(object sender, WinWrap.Basic.Classic.SynchronizingEventArgs e)
        {
            string data = Convert.ToBase64String(Encoding.UTF8.GetBytes(e.Param)) + "\r\n";

            if (e.Id >= 0)
            {
                // response for a specific remote
                ApplicationQueue response = null;
                if (!responses_.TryGetValue(e.Id, out response))
                {
                    response = ApplicationQueue.Create("responses", LabelTarget.Text, e.Id.ToString());
                    responses_.Add(e.Id, response);
                }

                response.Append(data);
            }
            else
            {
                // response for all remotes
                foreach (ApplicationQueue response in responses_.Values)
                {
                    response.Append(data);
                }
            }
        }
예제 #2
0
        private void basicIdeCtl1_Synchronizing(object sender, WinWrap.Basic.Classic.SynchronizingEventArgs e)
        {
            log_.Append(" >> " + e.Param);
            string command = Convert.ToBase64String(Encoding.UTF8.GetBytes(e.Param)) + "\r\n";

            conn_.Send(command);
        }
예제 #3
0
        private void basicIdeCtl1_Synchronizing(object sender, WinWrap.Basic.Classic.SynchronizingEventArgs e)
        {
            // BasicIdeCtl's id can be ignored
            log_.Append(" >> " + e.Param);
            string command = sync_id_ + " " + Convert.ToBase64String(Encoding.UTF8.GetBytes(e.Param)) + "\r\n";

            lock (lock_)
                commands_.Append(command);
        }
예제 #4
0
        void basicNoUIObj_Synchronizing(object sender, WinWrap.Basic.Classic.SynchronizingEventArgs e)
        {
            string response = Convert.ToBase64String(Encoding.UTF8.GetBytes(e.Param)) + "\r\n";

            conns_.ForEachConnection(conn =>
            {
                if (e.Id < 0 || e.Id == conn.Id)
                {
                    conn.Send(response);
                }
            });
        }