public void btnRequestFromRemotecomponent_Click(System.Object sender, System.EventArgs e)
        {
            try
            {
                if (this.txtDataNameToRequest.Text.Length <= 0)
                {
                    throw (new Exception("No data name specified to request"));
                }

                if (this.txtRemoteComponentToRequestData.Text.Length <= 0)
                {
                    throw (new Exception("No selected component to request data"));
                }

                CommunicationsDataRequest datarequest = new CommunicationsDataRequest(this.txtRemoteComponentToRequestData.Text, this.ComponentName, this.txtDataNameToRequest.Text);
                CommunicationsData        data        = default(CommunicationsData);
                data = ((IUseCNDCommunicationsScheme)this).RequestDataFromRemoteComponent(datarequest);
                this._dataRequestedDataDisplayCtrl.ShowData(data.Value);
            }
            catch (Exception ex)
            {
                string err = ex.Message + " -> " + ex.StackTrace + " -> " + ex.TargetSite.ToString();
                MessageBox.Show(ex.Message);
            }
            finally
            {
                this.Cursor = System.Windows.Forms.Cursors.Default;
            }
        }
 public CommunicationsData RetrieveDataToRemoteComponent(CommunicationsDataRequest dataRequest)
 {
     if (this._dataToRetrieveBackFromRequestContainer.ContainsData(System.Convert.ToString(dataRequest.RequestedDataName)))
     {
         Data data = this._dataToRetrieveBackFromRequestContainer.DataItem(System.Convert.ToString(dataRequest.RequestedDataName));
         CommunicationsData dataToRetrieve = default(CommunicationsData);
         dataToRetrieve = CommunicationsData.GetCommunicationsDataObject(dataRequest.SenderComponentName, this.ComponentName, data.DataName, data.data);
         return(dataToRetrieve);
     }
     else
     {
         throw (new Exception("The component \'" + this.ComponentName + "\' can retrieve the data \'" + dataRequest.RequestedDataName + "\' becuase it doesn\'t handle it"));
     }
 }
 public CommunicationsData RequestDataFromRemoteComponent(CommunicationsDataRequest dataRequest)
 {
     return(CommunicationsManager.GetInstance().RequestDataFromRemoteComponent(dataRequest));
 }