Exemplo n.º 1
0
        /// <summary>
        /// Trägt zusätzliche Konfigurationeinstellung ein.
        /// </summary>
        public override void FillOptions()
        {
            // Forward
            base.FillOptions();

            // Configure general replay keys
            FileAdaptor.RegisterReplayKeys(Adaptor.Parent, this);

            // Configure private keys
            Adaptor.Parent.SetKeyHandler(Keys.Multiply, () => Adaptor.StartWatch(m_OriginalName));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Aktiviert den Datenstrom leicht zeitverzögert, so dass der Viewer in jedem Fall
        /// angezeigt wird.
        /// </summary>
        /// <param name="sender">Wird ignoriert.</param>
        /// <param name="e">Wird ignoriert.</param>
        private void tickStart_Tick( object sender, EventArgs e )
        {
            // Once only
            tickStart.Enabled = false;

            // Remember
            string oldText = Text, newText = oldText + Properties.Resources.Connecting;

            // Show progress
            Text = newText;

            // Make sure that text is shown
            Application.DoEvents();

            // The adaptor to use
            Adaptor adaptor;

            // Check mode
            switch (m_Mode)
            {
                case StartupModes.LocalDVB: adaptor = new DeviceAdpator( Profile, theViewer ); break;
                case StartupModes.RemoteVCR: adaptor = new VCRAdaptor( theViewer ); break;
                case StartupModes.ConnectTCP: adaptor = new SlaveAdaptor( theViewer, m_Arguments[0] ); break;
                case StartupModes.PlayLocalFile: adaptor = new FileAdaptor( theViewer, m_Arguments[0] ); break;
                case StartupModes.PlayRemoteFile: m_FixedServer = m_Arguments[1]; adaptor = new VCRAdaptor( theViewer, m_Arguments[0] ); break;
                case StartupModes.WatchOrTimeshift: adaptor = CreateWatch( m_Arguments[0].Split( '/' ) ); break;
                default: throw new ArgumentException( m_Mode.ToString(), "m_Mode" );
            }

            // Startup control
            theViewer.Initialize( adaptor );

            // Create configuration list
            ResetOptions();

            // Reset title
            if (Equals( Text, newText ))
                Text = oldText;

            // Up and running
            m_Starting = false;
        }