Exemple #1
0
        public uint Invoke(IUnknown pAsyncResult)
        {
            int hr;

            mediaSession.EndGetEvent(pAsyncResult, out IMFMediaEvent pEvent);
            pEvent.GetType(out uint eventtype);
            pEvent = null;
            if (eventtype == MESessionClosed)
            {
                VideoWnd.Hide();
            }
            else
            {
                mediaSession.BeginGetEvent(this, null);
            }
            switch (eventtype)
            {
            case MESessionEnded:
                VideoWnd.Hide();
                state = "Ended";
                break;

            case MESessionTopologyStatus:
                TopologyPrepared = true;
                break;
            }
            return(0);
        }
Exemple #2
0
        public MainWnd()
        {
            //IntPtr SaveFilter = SetUnhandledExceptionFilter(IntPtr.Zero);
            InitializeComponent();
            //SetUnhandledExceptionFilter(SaveFilter);

            //m_Player = new PlayManager();

            m_PlayList  = new PlayList(this);
            m_PriceList = new PriceList(this);
            m_TopTen    = new TopTen(this, Properties.Settings.Default.MenuShowDelaySec);
            s_VideoWnd  = new VideoWnd();


            if (m_UseBillValidator)
            {
                BillValidatorManager.Instance.Start();
            }


            //===================================
#if FULL
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState     = FormWindowState.Maximized;
            this.AutoScroll      = false;
#endif
#if !DEBUG
            Cursor.Hide();
#endif
            //======================

            this.Load += delegate
            {
#if WW
                s_VideoWnd.Show();
#endif
            };
            this.Shown       += new EventHandler(MainWnd_Shown);
            this.FormClosing += new FormClosingEventHandler(MainWnd_FormClosing);

            axShockwaveFlash1.LoadMovie(0, Path.Combine(Directory.GetCurrentDirectory(), "top.swf"));

            /*MenuSettings.Instance.MenuInitDelayChanged += delegate
             * {
             *  m_TopTen.WaitDelaySec = MenuSettings.Instance.MenuInitDelay;
             * };*/
            //m_TopTen.SetItems(songInfoManager.GetTopTen());
            m_TopTen.Delay += new EventHandler(m_TopTen_Delay);
            pbOrder.Click  += new EventHandler(pbOrder_Click);
        }
Exemple #3
0
        public void Play()
        {
            PropVariant prop = new PropVariant()
            {
                vt          = VT_I8,
                unionmember = 0,
            };

            if (HasVideo)
            {
                VideoWnd.Show();
            }
            mediaSession.Start(Guid.Empty, prop);
            state = "Playing";
        }