예제 #1
0
        /// <summary>
        /// Aktiviert den Empfang einer Quelle.
        /// </summary>
        /// <param name="sender">Wird ignoriert.</param>
        /// <param name="e">Wird ignoriert.</param>
        private void cmdReceive_Click(object sender, EventArgs e)
        {
            // Attach to source
            SourceItem item = (SourceItem)selStation.SelectedItem;

            if (null == item)
            {
                return;
            }

            // Be safe
            try
            {
                // Ask user what to do
                using (StartRecording dlg = new StartRecording())
                {
                    // Load it
                    dlg.LoadItems(selStation.Items, item);

                    // Show up
                    if (DialogResult.OK != dlg.ShowDialog(this))
                    {
                        return;
                    }

                    // Forward
                    CurrentRequest = CurrentServer.BeginAddSources(dlg.GetSources(txDir.Text));

                    // Add result processor
                    m_ResultProcessor = ProcessNewStream;
                }
            }
            catch (Exception ex)
            {
                // Report
                MessageBox.Show(this, ex.Message, Text);
            }

            // Update GUI
            UpdateGUI();
        }
예제 #2
0
        /// <summary>
        /// Aktiviert den Empfang einer Quelle.
        /// </summary>
        /// <param name="sender">Wird ignoriert.</param>
        /// <param name="e">Wird ignoriert.</param>
        private void cmdReceive_Click( object sender, EventArgs e )
        {
            // Attach to source
            SourceItem item = (SourceItem) selStation.SelectedItem;
            if (null == item)
                return;

            // Be safe
            try
            {
                // Ask user what to do
                using (StartRecording dlg = new StartRecording())
                {
                    // Load it
                    dlg.LoadItems( selStation.Items, item );

                    // Show up
                    if (DialogResult.OK != dlg.ShowDialog( this ))
                        return;

                    // Forward
                    CurrentRequest = CurrentServer.BeginAddSources( dlg.GetSources( txDir.Text ) );

                    // Add result processor
                    m_ResultProcessor = ProcessNewStream;
                }
            }
            catch (Exception ex)
            {
                // Report
                MessageBox.Show( this, ex.Message, Text );
            }

            // Update GUI
            UpdateGUI();
        }