Пример #1
0
        } // Response

        protected override UiDvbStpBaseDownloadResponse ShowDialog(IWin32Window owner)
        {
            using (var dlg = new DvbStpEnhancedDownloadDialog(Request))
            {
                dlg.ShowDialog(owner);
                TelemetryScreenName = dlg.TelemetryScreenName;
                Response            = dlg.Response;
                return(Response);
            } // using
        }     // ShowDialog
Пример #2
0
        } // constructor

        #region Dialog events

        private void Dialog_Load(object sender, EventArgs e)
        {
            if (Request == null)
            {
                throw new ArgumentNullException();
            }

            TelemetryScreenName = string.Format("{0}: {1}:{2}", this.GetType().Name, Request.MulticastAddress, Request.MulticastPort);

            if (!string.IsNullOrEmpty(Request.Description))
            {
                labelDownloadingPayloadName.Text = Request.Description;
            } // if
            labelDownloadSource.Text = string.Format(labelDownloadSource.Text, Request.MulticastAddress, Request.MulticastPort);
            FormatProgressPercentage = labelProgressPct.Text;
            FormatEllapsedTime       = labelEllapsedTime.Text;
            DataReceptionSymbol      = labelDataReception.Text[0];

            labelProgressPct.Text   = null;
            labelDataReception.Text = null;
            labelReceiving.Visible  = false;
            labelEllapsedTime.Text  = null;

            foreach (var segment in Request.Payloads)
            {
                var displayName = segment.DisplayName ?? string.Format("Payload 0x{0:X2}", segment.PayloadId);
                var item        = new ListViewItem(displayName);
                item.SubItems.Add("-");
                item.SubItems.Add("-");
                item.ImageKey = "Waiting";
                item.Tag      = segment;
                listViewPayloads.Items.Add(item);
            } // foreach

            PayloadProgress = new double[Request.Payloads.Count];

            Response = new UiDvbStpEnhancedDownloadResponse();
        }  // Dialog_Load