Esempio n. 1
0
 private void SendBackBinaryData(int time)
 {
     try
     {
         IReView_Feed proxy = RPC_Manager.Instance.Get_Client_Proxy <RPC_Client_Proxy_IReView_Feed>();
         if (proxy != null && BinaryStorage != null)
         {
             // Collect all data entries and create a package to send
             List <BinaryData> dataEntries = BinaryStorage.GetData(time);
             List <long>       idList      = new List <long>();
             List <int>        timeList    = new List <int>();
             List <byte[]>     dataList    = new List <byte[]>();
             foreach (BinaryData data in dataEntries)
             {
                 idList.Add(data.Id);
                 timeList.Add(data.Time);
                 dataList.Add(data.Data);
             }
             proxy.SendBackBinaryData(idList.ToArray(), timeList.ToArray(), dataList.ToArray());
         }
     }
     catch (Exception e)
     {
         RPC_Manager.Instance.Close();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Someone clicks any of the user action buttons
        /// </summary>
        private void userAction_Clicked(object sender, EventArgs e)
        {
            UserCommand command   = null;
            bool        isChecked = false;

            if (sender is Button)
            {
                Button button = (Button)sender;
                command   = button.Tag as UserCommand;
                isChecked = true;
            }
            if (sender is CheckBox)
            {
                CheckBox cb = (CheckBox)sender;
                command   = cb.Tag as UserCommand;
                isChecked = cb.Checked;
                cb.Text   = cb.Checked ? "+ " + command.Name : "- " + command.Name;
            }

            if (command != null)
            {
                IReView_Feed proxy = RPC_Manager.Instance.Get_Client_Proxy <IReView_Feed>();
                if (proxy != null)
                {
                    proxy.DebugToggleChanged(command.Command, isChecked);
                }
            }
        }
Esempio n. 3
0
        protected void OnUpdateSequencerControlSelection(Track selectedTrack, Item selectedItem)
        {
            if (disableSendSelection)
            {
                // If disabled send selection then bail out (this done when receiving selection from the feed so that there is no endless ping-pong)
                return;
            }
            long selectedTrackId = selectedItem != null ? selectedItem.Parent.Id : selectedTrack != null ? selectedTrack.Id : -1;

            if (selectedTrackId >= 0)
            {
                IReView_Feed proxy = RPC_Manager.Instance.Get_Client_Proxy <IReView_Feed>();
                if (proxy != null)
                {
                    proxy.SelectionChanged(selectedTrackId);
                }
            }
        }