public DeletePlaylist(Form1 form, DataSet1 dataset, AxWindowsMediaPlayer mp)
        {
            InitializeComponent();

            this.otherForm = form;
            this.dataset = dataset;
            manager = new PlayListManager(dataset);
            this.mp = mp;
        }
        public override bool Play(string strFile)
        {
            Log.Instance.Info("WMPVideoPlayer.Play '{0}'", strFile);

            currentFile = strFile;

            wmpCtrl = new AxWindowsMediaPlayer();
            GUIGraphicsContext.form.Controls.Add(wmpCtrl);
            wmpCtrl.Enabled = false;
            wmpCtrl.uiMode = "none";
            wmpCtrl.windowlessVideo = true;
            wmpCtrl.enableContextMenu = false;
            wmpCtrl.Ctlenabled = false;
            wmpCtrl.Visible = false;
            wmpCtrl.stretchToFit = true;

            wmpCtrl.PlayStateChange += WMP_OnPlayStateChange;
            wmpCtrl.Buffering += WMP_OnBuffering;
            wmpCtrl.ErrorEvent += WMP_OnError;
            
            wmpCtrl.URL = strFile;
            wmpCtrl.network.bufferingTime = PluginConfiguration.Instance.wmpbuffer;
            wmpCtrl.Ctlcontrols.play();

            GUIPropertyManager.SetProperty("#TV.Record.percent3", 0.0f.ToString()); // set to 0, as this player doesn't support download progress reporting

            GUIWindowManager.OnNewAction += GUIWindowManager_OnNewAction;
            
            GUIWaitCursor.Init(); GUIWaitCursor.Show(); // init and show the wait cursor while buffering
            return true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.hostWinForms = ((System.Windows.Forms.Integration.WindowsFormsHost)(target));
                return;

            case 2:
                this.activeXMediaPlayer = ((AxWMPLib.AxWindowsMediaPlayer)(target));
                return;

            case 3:
                this.txt_nombreElemento = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.pb_transcurrido = ((System.Windows.Controls.ProgressBar)(target));
                return;

            case 5:
                this.txt_estatus = ((System.Windows.Controls.TextBlock)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 4
0
        //Constructor
        public SoundEffects(ref AxWindowsMediaPlayer axMedia, ref Semaphore soundSem, ref Semaphore mediaSem, ref Boolean stop)
        {
            //Assign variables
            soundSemaphore = soundSem;
            mediaSemaphore = mediaSem;
            media = axMedia;
            media.settings.setMode("loop", false);
            stopped = stop;

            //Determine if sound folder already exists
            if (!Directory.Exists(currentDirectory))
            {
                try
                {
                    Directory.CreateDirectory(currentDirectory); //if not, create it
                } catch { }
            }
            //Get the length of every sound file
            MaxTurboLength = GetSoundLength(currentDirectory + "\\MaxTurbo.wav") + 1000;
            Start1Length = GetSoundLength(currentDirectory + "\\Start1.wav") + 1000;
            Start2Length = GetSoundLength(currentDirectory + "\\Start2.wav") + 1000;
            LoopLength = GetSoundLength(currentDirectory + "\\Loop.wav") + 1000;
            StopLength = GetSoundLength(currentDirectory + "\\Stop.wav") + 1000;
            sound = new System.Media.SoundPlayer(currentDirectory + "\\MaxTurbo.wav");
        }
Esempio n. 5
0
		//-------------------------------------------------------------
		// 概要:コンストラクタ
		//-------------------------------------------------------------
		public WmpNativeWindow(AxWindowsMediaPlayer wmp)
		{
			this.wmp = wmp;

			// サブクラスウィンドウの設定
			AssignHandle(wmp.Handle);

			// 枠なし時のサイズ変更処理
			wmp.MouseMoveEvent += (sender, e) =>
			{
				// 枠なしのときだけ処理を実行する
				if (!PlayerSettings.FrameInvisible)
				{
					return;
				}

				HitArea area = GetHitArea(frameSize, e.fX, e.fY);
				if (area == HitArea.HTNONE)
				{
					return;
				}

				switch (area)
				{
					case HitArea.HTTOP:
					case HitArea.HTBOTTOM:
						Cursor.Current = Cursors.SizeNS;
						break;
					case HitArea.HTLEFT:
					case HitArea.HTRIGHT:
						Cursor.Current = Cursors.SizeWE;
						break;
					case HitArea.HTTOPLEFT:
					case HitArea.HTBOTTOMRIGHT:
						Cursor.Current = Cursors.SizeNWSE;
						break;
					case HitArea.HTTOPRIGHT:
					case HitArea.HTBOTTOMLEFT:
						Cursor.Current = Cursors.SizeNESW;
						break;
				}
			};

			// 枠なし時のサイズ変更処理
			wmp.MouseDownEvent += (sender, e) =>
			{
				// 枠なしのときだけ処理を実行する
				if (!PlayerSettings.FrameInvisible)
				{
					return;
				}

				HitArea area = GetHitArea(frameSize, e.fX, e.fY);
				if (area != HitArea.HTNONE)
				{
					Win32API.SendMessage(wmp.Parent.Parent.Handle, (int)WindowsMessage.WM_NCLBUTTONDOWN, new IntPtr((int)area), new IntPtr(0));
				}
			};
		}
Esempio n. 6
0
        public static void ODialog(AxWMPLib.AxWindowsMediaPlayer Player)
        {
            OpenFileDialog od = new OpenFileDialog();

            if (od.ShowDialog() == DialogResult.OK)
            {
                OpenMedia(od.FileName, Player);
            }
        }
 /// <summary>
 /// Create the media player
 /// </summary>
 private void CreateMediaPlayer()
 {
     if (mediaPlayer == null)
     {
         mediaPlayer = new AxWindowsMediaPlayer();
         mediaPlayer.CreateControl();
         mediaPlayer.Visible = false;
     }
 }
Esempio n. 8
0
 public VideoSync(VideoForm form, ref AxWindowsMediaPlayer vf, int pollingInterval)
 {
     this.Player = vf;
     this.Player.PlayStateChange += OnPlayStateChanged;
     this.SyncPollingInterval = pollingInterval;
     this.SyncTimer = new Timer();
     this.SyncTimer.Interval = SyncPollingInterval;
     this.SyncTimer.Tick += Sync;
     this.VideoForm = form;
 }
 public QueuingMachine()
 {
     InitializeComponent();
     if (mediaPlayer == null)
     {
         mediaPlayer = new AxWindowsMediaPlayer();
         mediaPlayer.CreateControl();
         mediaPlayer.Visible = false;
     }
 }
Esempio n. 10
0
 public MediaPlayer(AxWMPLib.AxWindowsMediaPlayer wmpTune, AxWMPLib.AxWindowsMediaPlayer wmpMotif, PlayList playlist)
 {
     this.wmpTune  = wmpTune;
     this.wmpMotif = wmpMotif;
     this.wmpTune.PlayStateChange += wmpTune_PlayStateChange;
     this.playlist = playlist;
     this.synchronizationContext = SynchronizationContext.Current;
     this.currentTime            = 0;
     this.abort = false;
 }
Esempio n. 11
0
    private static void CreateInstance()
    {
      // disable auto windows mediaplayer auto cd-play
      if (_wmp10Player != null)
      {
        return;
      }
      try
      {
        UInt32 dwValue = (UInt32)0;
        using (RegistryKey subkey = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\MediaPlayer\Preferences", true)
          )
        {
          subkey.SetValue("CDAutoPlay", (Int32)dwValue);

          // enable metadata lookup for CD's
          dwValue = (UInt32)Convert.ToInt32(subkey.GetValue("MetadataRetrieval"));
          dwValue |= 1;
          subkey.SetValue("MetadataRetrieval", (Int32)dwValue);
        }
      }
      catch (Exception) {}

      _wmp10Player = new AxWindowsMediaPlayer();


      _wmp10Player.BeginInit();
      GUIGraphicsContext.form.SuspendLayout();
      _wmp10Player.Enabled = true;

      ComponentResourceManager resources = new ComponentResourceManager(typeof (Resource1));
      _wmp10Player.Location = new Point(8, 16);
      _wmp10Player.Name = "axWindowsMediaPlayer1";
      _wmp10Player.OcxState = ((AxHost.State)(resources.GetObject("axWindowsMediaPlayer1.OcxState")));
      _wmp10Player.Size = new Size(264, 240);
      _wmp10Player.TabIndex = 0;

      GUIGraphicsContext.form.Controls.Add(_wmp10Player);

      try
      {
        _wmp10Player.EndInit();
      }
      catch (COMException) {}

      _wmp10Player.uiMode = "none";
      _wmp10Player.windowlessVideo = true;

      _wmp10Player.enableContextMenu = false;
      _wmp10Player.Ctlenabled = false;
      _wmp10Player.ClientSize = new Size(0, 0);
      _wmp10Player.Visible = false;
      GUIGraphicsContext.form.ResumeLayout(false);
    }
Esempio n. 12
0
 void InitMediaPlayer()
 {
     player        = formsHost.Child as AxWMPLib.AxWindowsMediaPlayer;
     player.uiMode = "full";
     player.settings.setMode("loop", false);
     player.stretchToFit      = true;
     player.enableContextMenu = false;
     player.ErrorEvent       += new EventHandler(player_ErrorEvent);
     player.PlayStateChange  += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(player_PlayStateChange);
     player.ClickEvent       += new AxWMPLib._WMPOCXEvents_ClickEventHandler(player_ClickEvent);
 }
Esempio n. 13
0
 void InitMediaPlayer()
 {
     player = formsHost.Child as AxWMPLib.AxWindowsMediaPlayer;
     player.uiMode = "full";
     player.settings.setMode("loop", false);
     player.stretchToFit = true;
     player.enableContextMenu = false;
     player.ErrorEvent += new EventHandler(player_ErrorEvent);
     player.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(player_PlayStateChange);
     player.ClickEvent += new AxWMPLib._WMPOCXEvents_ClickEventHandler(player_ClickEvent);
 }
Esempio n. 14
0
 public static void TogglePlayPause(AxWMPLib.AxWindowsMediaPlayer player)
 {
     if (player.playState == WMPLib.WMPPlayState.wmppsPlaying)
     {
         player.Ctlcontrols.pause();
     }
     else if (player.playState == WMPLib.WMPPlayState.wmppsPaused)
     {
         player.Ctlcontrols.play();
     }
 }
Esempio n. 15
0
 public static void OpenMedia(string MediaAddress, AxWMPLib.AxWindowsMediaPlayer Player)
 {
     if (MediaAddress != null)
     {
         Player.Visible = true;
         Player.URL     = MediaAddress;
         Player.Ctlcontrols.play();
     }
     else
     {
         MessageBox.Show("No Media To Play");
     }
 }
        public WindowsMediaPlayerControl()
        {
            InitializeComponent();

            // let GenericPlayerControl catch the exception

            wmPlayer = new AxWMPLib.AxWindowsMediaPlayer();

            ((System.ComponentModel.ISupportInitialize)(wmPlayer)).BeginInit();
            this.wmPlayer.Name = "wmPlayer";
            this.wmPlayer.Enabled = true;
            this.wmPlayer.Dock = System.Windows.Forms.DockStyle.Fill;
            this.wmPlayer.TabIndex = 0;
            this.wmPlayer.OpenStateChange += new AxWMPLib._WMPOCXEvents_OpenStateChangeEventHandler(this.wmPlayer_OpenStateChange);
            this.wmPlayer.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(this.wmPlayer_PlayStateChange);
            this.wmPlayer.ErrorEvent += new System.EventHandler(this.wmPlayer_ErrorEvent);
            this.wmPlayer.MediaChange += new AxWMPLib._WMPOCXEvents_MediaChangeEventHandler(this.wmPlayer_MediaChange);
            this.wmPlayer.MediaError += new AxWMPLib._WMPOCXEvents_MediaErrorEventHandler(this.wmPlayer_MediaError);

            this.Controls.Add(wmPlayer);
            ((System.ComponentModel.ISupportInitialize)(wmPlayer)).EndInit();

            wmPlayer.uiMode = "none"; // this must come after EndInit()
            wmPlayer.stretchToFit = true; // this must come after EndInit()

            this.Dock = System.Windows.Forms.DockStyle.Fill;
            this.Name = "wmPlayer";
            this.Enabled = true;
            this.TabIndex = 0;

            /*
            ((System.ComponentModel.ISupportInitialize)(wmPlayer)).BeginInit();
            this.wmPlayer.Name = "wmPlayer";
            this.wmPlayer.Enabled = true;
            this.wmPlayer.Dock = System.Windows.Forms.DockStyle.Fill;
            this.wmPlayer.Location = new System.Drawing.Point(0, 0);
            this.wmPlayer.Size = new System.Drawing.Size(489, 271);
            this.wmPlayer.TabIndex = 0;
            this.wmPlayer.OpenStateChanged += new AxWMPLib._WMPOCXEvents_OpenStateChangeEventHandler(this.wmPlayer_OpenStateChange);
            this.wmPlayer.PlayStateChanged += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(this.wmPlayer_PlayStateChange);
            this.wmPlayer.ErrorEvent += new System.EventHandler(this.wmPlayer_ErrorEvent);
            this.wmPlayer.MediaChange += new AxWMPLib._WMPOCXEvents_MediaChangeEventHandler(this.wmPlayer_MediaChange);
            this.wmPlayer.PlayerError += new AxWMPLib._WMPOCXEvents_MediaErrorEventHandler(this.wmPlayer_PlayerError);

            wmPlayer.uiMode = "none";

            this.Controls.Add(wmPlayer);
            ((System.ComponentModel.ISupportInitialize)(wmPlayer)).EndInit();
            */
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((VideoPanel.VideoConsole3)(target));
                return;

            case 2:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.AXWMP_VPlayer = ((AxWMPLib.AxWindowsMediaPlayer)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 18
0
		public WindowsMediaPlayer(AxWindowsMediaPlayer player)
		{
			_player = player;
			_player.uiMode = "full";
			_player.enableContextMenu = false;
			_player.StatusChange += (sender, e) =>
										{
											Status = _player.status;
											OnPropertyChanged("Status");
										};
			_player.PlayStateChange += (sender, e) =>
										{
											State = (PlayState)e.newState;
											OnPropertyChanged("State");
										};
			_player.PositionChange += (sender, e) =>
										{
											Position = e.newPosition;
											OnPropertyChanged("Position");
										};
			_player.CurrentItemChange += (sender, e) => OnPropertyChanged("Media");
			_player.Buffering += (sender, e) => OnPropertyChanged("BufferingProgress");
		}
Esempio n. 19
0
 private void InitializeComponent()
 {
     this.components = new Container();
     ComponentResourceManager componentResourceManager = new ComponentResourceManager(typeof(Form1));
     this.tb_showstuff = new TextBox();
     this.timer1 = new Timer(this.components);
     this.wmp_do_eet = new AxWindowsMediaPlayer();
     ((ISupportInitialize)this.wmp_do_eet).BeginInit();
     base.SuspendLayout();
     this.tb_showstuff.BackColor = Color.Black;
     this.tb_showstuff.Font = new Font("Courier New", 14.5f);
     this.tb_showstuff.ForeColor = Color.White;
     this.tb_showstuff.Location = new Point(1, -3);
     this.tb_showstuff.Multiline = true;
     this.tb_showstuff.Name = "tb_showstuff";
     this.tb_showstuff.Size = new Size(1560, 277);
     this.tb_showstuff.TabIndex = 1;
     this.tb_showstuff.TextAlign = HorizontalAlignment.Center;
     this.tb_showstuff.Visible = false;
     this.timer1.Tick += new EventHandler(this.timer1_Tick);
     this.wmp_do_eet.Enabled = true;
     this.wmp_do_eet.Location = new Point(455, -30);
     this.wmp_do_eet.Name = "wmp_do_eet";
     this.wmp_do_eet.OcxState = (AxHost.State)componentResourceManager.GetObject("wmp_do_eet.OcxState");
     this.wmp_do_eet.Size = new Size(588, 409);
     this.wmp_do_eet.TabIndex = 0;
     this.wmp_do_eet.Visible = false;
     base.AutoScaleDimensions = new SizeF(6f, 13f);
     base.AutoScaleMode = AutoScaleMode.Font;
     base.ClientSize = new Size(1552, 273);
     base.Controls.Add(this.tb_showstuff);
     base.Controls.Add(this.wmp_do_eet);
     base.Name = "Form1";
     this.Text = "Form1";
     ((ISupportInitialize)this.wmp_do_eet).EndInit();
     base.ResumeLayout(false);
     base.PerformLayout();
 }
Esempio n. 20
0
        public AfterLogin(User x)
        {
            ListofListBox    = new List <System.Windows.Controls.ListBox>();
            afterLoginWindow = this;
            var newBox = new System.Windows.Controls.ListBox();


            objectUser    = new User();
            mediaFileList = new List <Song>();
            InitializeComponent();
            username.Content = x.mUsername;
            ax =
                winsFormHost.Child as AxWMPLib.AxWindowsMediaPlayer;
            objectUser     = x;
            profile.Source = new BitmapImage(new Uri("pack://application:,,,/Images/" + x.mUsername + ".png"));

            /*
             * DirectoryInfo dir = new DirectoryInfo(mediaFolder);
             *
             * foreach (FileInfo file in dir.GetFiles("*.*", SearchOption.AllDirectories))
             * {
             *  if (file.Extension == ".mp3" || file.Extension == ".mp4")
             *      mediaFileList.Add(file.Name);
             * }
             */
            foreach (var b in LoginScreen.allSongs.mSongs)
            {
                mediaFileList.Add(b);
            }

            /*if (mediaFileList != null)
            *  {
            *   newBox.ItemsSource = mediaFileList;
            *   ax.URL = mediaFolder + "\\" + mediaFileList[0];
            *  }
            *  var newstackPanel = new StackPanel { Name = "NewExpanderStackPanel" };
            *  newstackPanel.Children.Add(newBox);
            *  Expander exp = new Expander();
            *  exp.Content = newstackPanel;
            *  exp.Header = "Available Songs";
            *  exp.Foreground = Brushes.LightGray;
            *  allPlaylist.Children.Add(exp);
            *  newBox.Background = Brushes.Black;
            *  newBox.Foreground = Brushes.LightGray;
            *  foreach (var b in objectUser.mPlaylists)
            *  {
            *   Expander exp1 = new Expander();
            *   var newStack = new StackPanel { Name = "NewExpanderStackPanel" };
            *   var newListBox = new System.Windows.Controls.ListBox();
            *   newListBox.Background = Brushes.Black;
            *   newListBox.Foreground = Brushes.LightGray;
            *   var newMediaFileList = new List<string>();
            *   foreach (var d in b.mSongs)
            *       newMediaFileList.Add(d.mArtist + "-" + d.mTitle + d.mExtension);
            *   newListBox.ItemsSource = newMediaFileList;
            *   newStack.Children.Add(newListBox);
            *   exp1.Content = newStack;
            *   exp1.Header = b.mName;
            *   exp1.Foreground = Brushes.LightGray;
            *   allPlaylist.Children.Add(exp1);
            *
            *  }
            *  AllPLaylist = allPlaylist;*/
            AllPLaylist = new StackPanel();
            reloadPlaylists();
        }
Esempio n. 21
0
        /// <summary>
        /// Plays the thread.
        /// </summary>
        /// <remarks>Documented by Dev02, 2008-02-22</remarks>
        private void PlayThread()
        {
            stopThread = false;

            while (true)
            {
                try
                {
                    string filename = null;

                    lock (playQueue)
                    {
                        while (playQueue.Count == 0 && !stopThread)
                            Monitor.Wait(playQueue);
                        if (playQueue.Count > 0 && !stopCurrentPlay)
                            filename = playQueue.Dequeue();
                    }

                    if (stopThread && filename == null)
                        break;

                    //play video file
                    stopCurrentPlay = false;
                    if (video != null)
                    {
                        video.Ctlcontrols.stop();
                        video = null;
                    }

                    if (filename != null)
                    {
            #if debug_output
                        Trace.WriteLine("Fetching video object for " + filename);
            #endif
                        Owner.Invoke((Action)delegate()
                        {
                            video = new AxWindowsMediaPlayer();
                            video.BeginInit();
                            video.Location = new System.Drawing.Point(0, 0);
                            video.Size = Owner.Size;
                            Owner.Controls.Add(video);
                            video.PlayStateChange += (s, e) =>
                                {
                                    if (video.playState == WMPPlayState.wmppsStopped)
                                        OnStopping(EventArgs.Empty);
                                };
                            video.EndInit();
                        });

                        video.URL = filename;
            #if debug_output
                        Trace.WriteLine(string.Format("Starting playing {0}. Duration: {1}.", filename, video.currentMedia.duration.ToString()));
            #endif
                        video.Ctlcontrols.play();
                        while (video.playState == WMPPlayState.wmppsTransitioning || video.playState == WMPPlayState.wmppsBuffering)
                            Thread.Sleep(25);

                        //wait for completion
                        while (video.Ctlcontrols.currentPosition < video.currentMedia.duration &&
                            (video.playState == WMPPlayState.wmppsPlaying || video.playState == WMPPlayState.wmppsBuffering))
                        {
                            System.Threading.Thread.Sleep(100);
                            if (stopCurrentPlay && (video.currentMedia.duration - video.Ctlcontrols.currentPosition) > 1) //don't stop short sounds
                                break;
                        }
                        if (video.playState == WMPPlayState.wmppsPlaying)
                            video.Ctlcontrols.stop();
                        else
                            OnEnding(EventArgs.Empty);
            #if debug_output
                        Trace.WriteLine("Finished/Stopped playing " + filename);
            #endif
                    }
                }
                catch (Exception exp)
                {
                    if (exp is FileNotFoundException)
                    {
                        //Display a message and terminate player thread
                        //[ML-724] On-Stick-Mode: Audioplayer thread crashes when the stick is pulled off and plugged back in (DAC, 2008-03-05)
                        System.Windows.Forms.MessageBox.Show(Resources.AUDIOPLAYER_CRASHED_TEXT, Resources.AUDIOPLAYER_CRASHED_CAPTION,
                            System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Error);
                        break;
                    }
                    if (exp is ThreadAbortException)
                    {
                        Trace.WriteLine("AudioPlayer Thread terminated.");
                    }
                    else
                    {
                        try
                        {
                            Trace.WriteLine("AudioPlayer crashed: " + exp.ToString());
                        }
                        catch { Trace.WriteLine("AudioPlayer crashed with unreadable exception!"); }
                        break;
                    }
                }
            }
        }
        public override void Dispose()
        {
            GUIWindowManager.OnNewAction -= GUIWindowManager_OnNewAction;

            if (!bufferCompleted) GUIWaitCursor.Hide();

            try { if (osd != null) { osd.Dispose(); osd = null; } }
            catch (Exception ex) { Log.Instance.Warn(ex.ToString()); }

            try { if (wmpCtrl != null) { wmpCtrl.Dispose(); wmpCtrl = null; } }
            catch (Exception ex) { Log.Instance.Warn(ex.ToString()); }

            GC.Collect();
            GC.WaitForPendingFinalizers();
        }
 public DeletePlaylist(Form1 form, DataSet1 dataset, AxWindowsMediaPlayer mp, string currentPlaylist)
     : this(form, dataset, mp)
 {
     this.currentPlaylist = currentPlaylist;
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 11 "..\..\..\Views\MainWindow.xaml"
                ((MyJukeboxWMPDapper.MainWindow)(target)).MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.Move_Window);

            #line default
            #line hidden

            #line 11 "..\..\..\Views\MainWindow.xaml"
                ((MyJukeboxWMPDapper.MainWindow)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.Window_SizeChanged);

            #line default
            #line hidden

            #line 11 "..\..\..\Views\MainWindow.xaml"
                ((MyJukeboxWMPDapper.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden

            #line 11 "..\..\..\Views\MainWindow.xaml"
                ((MyJukeboxWMPDapper.MainWindow)(target)).KeyUp += new System.Windows.Input.KeyEventHandler(this.Window_KeyUp);

            #line default
            #line hidden
                return;

            case 2:

            #line 17 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuDatagridCopyCell_Click);

            #line default
            #line hidden
                return;

            case 3:

            #line 19 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuDatagridOpenEditor_Click);

            #line default
            #line hidden
                return;

            case 4:

            #line 22 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuDatagridOpenBrowser_Click);

            #line default
            #line hidden
                return;

            case 5:

            #line 25 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuPlaylistAdd_Click);

            #line default
            #line hidden
                return;

            case 6:

            #line 26 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.ContextmenuPlaylistRename_Click);

            #line default
            #line hidden
                return;

            case 7:

            #line 27 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.contextmenuPlaylistRemove_Click);

            #line default
            #line hidden
                return;

            case 8:

            #line 31 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Play_CanExecute);

            #line default
            #line hidden

            #line 31 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Play_Executed);

            #line default
            #line hidden
                return;

            case 9:

            #line 32 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Pause_CanExecute);

            #line default
            #line hidden

            #line 32 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Pause_Executed);

            #line default
            #line hidden
                return;

            case 10:

            #line 33 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.Stop_CanExecute);

            #line default
            #line hidden

            #line 33 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.Stop_Executed);

            #line default
            #line hidden
                return;

            case 11:

            #line 34 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.OpenFolder_CanExecute);

            #line default
            #line hidden

            #line 34 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.OpenFolder_Executed);

            #line default
            #line hidden
                return;

            case 12:
                this.CopyDataRow = ((System.Windows.Input.CommandBinding)(target));

            #line 36 "..\..\..\Views\MainWindow.xaml"
                this.CopyDataRow.CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.CopyDataRowCanExecute);

            #line default
            #line hidden

            #line 37 "..\..\..\Views\MainWindow.xaml"
                this.CopyDataRow.Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.CopyDataRowExecuted);

            #line default
            #line hidden
                return;

            case 13:

            #line 39 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.PlaybackLoop_CanExecute);

            #line default
            #line hidden

            #line 40 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.PlaybackLoop_Executed);

            #line default
            #line hidden
                return;

            case 14:

            #line 42 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).CanExecute += new System.Windows.Input.CanExecuteRoutedEventHandler(this.PlaybackShuffle_CanExecute);

            #line default
            #line hidden

            #line 43 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Input.CommandBinding)(target)).Executed += new System.Windows.Input.ExecutedRoutedEventHandler(this.PlaybackShuffle_Execute);

            #line default
            #line hidden
                return;

            case 15:
                this.sbaudio = ((System.Windows.Controls.Primitives.StatusBar)(target));
                return;

            case 16:
                this.statusGenre = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 17:
                this.statusCatalog = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 18:
                this.statusAlbum = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 19:
                this.statusArtist = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 20:
                this.sbplaylist = ((System.Windows.Controls.Primitives.StatusBar)(target));
                return;

            case 21:
                this.textblockPlaylist = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 22:
                this.sbquery = ((System.Windows.Controls.Primitives.StatusBar)(target));
                return;

            case 23:
                this.textblockQuery = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 24:
                this.statusSelected = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 25:
                this.statusCount = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 26:
                this.textblockRowSelected = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 27:
                this.statusDuration = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 28:
                this.statusProgress = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 29:
                this.statusVersion = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 30:
                this.textblockHeader = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 31:
                this.textblockCurrentSong = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 32:
                this.buttonMaximize = ((System.Windows.Controls.Primitives.ToggleButton)(target));

            #line 189 "..\..\..\Views\MainWindow.xaml"
                this.buttonMaximize.Checked += new System.Windows.RoutedEventHandler(this.buttonMaximize_Checked);

            #line default
            #line hidden

            #line 189 "..\..\..\Views\MainWindow.xaml"
                this.buttonMaximize.Unchecked += new System.Windows.RoutedEventHandler(this.buttonMaximize_Unchecked);

            #line default
            #line hidden
                return;

            case 33:
                this.buttonMinimize = ((System.Windows.Controls.Button)(target));

            #line 192 "..\..\..\Views\MainWindow.xaml"
                this.buttonMinimize.Click += new System.Windows.RoutedEventHandler(this.buttonMinimize_Click);

            #line default
            #line hidden
                return;

            case 34:
                this.buttonClose = ((System.Windows.Controls.Button)(target));

            #line 197 "..\..\..\Views\MainWindow.xaml"
                this.buttonClose.Click += new System.Windows.RoutedEventHandler(this.buttonClose_Click);

            #line default
            #line hidden
                return;

            case 35:
                this.menuMain = ((System.Windows.Controls.Menu)(target));
                return;

            case 36:
                this.menuExit = ((System.Windows.Controls.MenuItem)(target));

            #line 229 "..\..\..\Views\MainWindow.xaml"
                this.menuExit.Click += new System.Windows.RoutedEventHandler(this.menuExit_Click);

            #line default
            #line hidden
                return;

            case 37:

            #line 256 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.menuEditMultiline_Click);

            #line default
            #line hidden
                return;

            case 38:

            #line 262 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.menuToolsTest1_Click);

            #line default
            #line hidden
                return;

            case 39:

            #line 263 "..\..\..\Views\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.menuToolsTest2_Click);

            #line default
            #line hidden
                return;

            case 40:
                this.menuSettings = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 41:
                this.menuEditRecordLocation = ((System.Windows.Controls.MenuItem)(target));

            #line 269 "..\..\..\Views\MainWindow.xaml"
                this.menuEditRecordLocation.Click += new System.Windows.RoutedEventHandler(this.menuEditRecordLocation_Click);

            #line default
            #line hidden
                return;

            case 42:
                this.menuDatabaseCheckPath = ((System.Windows.Controls.MenuItem)(target));

            #line 275 "..\..\..\Views\MainWindow.xaml"
                this.menuDatabaseCheckPath.Click += new System.Windows.RoutedEventHandler(this.menuDatabaseCheckPath_Click);

            #line default
            #line hidden
                return;

            case 43:
                this.expanderLeftPanel = ((System.Windows.Controls.Expander)(target));
                return;

            case 44:
                this.tabcontrol = ((System.Windows.Controls.TabControl)(target));

            #line 287 "..\..\..\Views\MainWindow.xaml"
                this.tabcontrol.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.tabcontrol_SelectionChanged);

            #line default
            #line hidden
                return;

            case 45:
                this.tabitemAudio = ((System.Windows.Controls.TabItem)(target));
                return;

            case 46:
                this.rdgenre = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 47:
                this.rdcatalog = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 48:
                this.rdalbum = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 49:
                this.rdartist = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 50:
                this.expanderGenre = ((System.Windows.Controls.Expander)(target));

            #line 299 "..\..\..\Views\MainWindow.xaml"
                this.expanderGenre.Expanded += new System.Windows.RoutedEventHandler(this.expanderGenre_Expanded);

            #line default
            #line hidden

            #line 299 "..\..\..\Views\MainWindow.xaml"
                this.expanderGenre.Collapsed += new System.Windows.RoutedEventHandler(this.expanderGenre_Collapsed);

            #line default
            #line hidden
                return;

            case 51:
                this.listboxGenres = ((System.Windows.Controls.ListBox)(target));

            #line 301 "..\..\..\Views\MainWindow.xaml"
                this.listboxGenres.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxGenres_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 52:
                this.expanderCatalog = ((System.Windows.Controls.Expander)(target));

            #line 314 "..\..\..\Views\MainWindow.xaml"
                this.expanderCatalog.Expanded += new System.Windows.RoutedEventHandler(this.expanderCatalog_Expanded);

            #line default
            #line hidden

            #line 314 "..\..\..\Views\MainWindow.xaml"
                this.expanderCatalog.Collapsed += new System.Windows.RoutedEventHandler(this.expanderCatalog_Collapsed);

            #line default
            #line hidden
                return;

            case 53:
                this.listboxCatalogs = ((System.Windows.Controls.ListBox)(target));

            #line 316 "..\..\..\Views\MainWindow.xaml"
                this.listboxCatalogs.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxCatalogs_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 54:
                this.expanderAlbum = ((System.Windows.Controls.Expander)(target));

            #line 330 "..\..\..\Views\MainWindow.xaml"
                this.expanderAlbum.Expanded += new System.Windows.RoutedEventHandler(this.expanderAlbum_Expanded);

            #line default
            #line hidden

            #line 330 "..\..\..\Views\MainWindow.xaml"
                this.expanderAlbum.Collapsed += new System.Windows.RoutedEventHandler(this.expanderAlbum_Collapsed);

            #line default
            #line hidden
                return;

            case 55:
                this.listboxAlbums = ((System.Windows.Controls.ListBox)(target));

            #line 332 "..\..\..\Views\MainWindow.xaml"
                this.listboxAlbums.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxAlbums_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 56:
                this.expanderArtist = ((System.Windows.Controls.Expander)(target));

            #line 346 "..\..\..\Views\MainWindow.xaml"
                this.expanderArtist.Expanded += new System.Windows.RoutedEventHandler(this.expanderArtist_Expanded);

            #line default
            #line hidden

            #line 346 "..\..\..\Views\MainWindow.xaml"
                this.expanderArtist.Collapsed += new System.Windows.RoutedEventHandler(this.expanderArtist_Collapsed);

            #line default
            #line hidden
                return;

            case 57:
                this.listboxArtists = ((System.Windows.Controls.ListBox)(target));

            #line 348 "..\..\..\Views\MainWindow.xaml"
                this.listboxArtists.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxArtists_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 58:
                this.tabitemPlaylist = ((System.Windows.Controls.TabItem)(target));
                return;

            case 59:
                this.listboxPlaylists = ((System.Windows.Controls.ListBox)(target));

            #line 366 "..\..\..\Views\MainWindow.xaml"
                this.listboxPlaylists.MouseLeftButtonUp += new System.Windows.Input.MouseButtonEventHandler(this.listboxPlaylists_MouseLeftButtonUp);

            #line default
            #line hidden
                return;

            case 60:
                this.formsHost = ((System.Windows.Forms.Integration.WindowsFormsHost)(target));
                return;

            case 61:
                this.axWmp = ((AxWMPLib.AxWindowsMediaPlayer)(target));
                return;

            case 62:
                this.imageArtist = ((System.Windows.Controls.Image)(target));
                return;

            case 63:
                this.buttonPlay = ((System.Windows.Controls.Button)(target));
                return;

            case 64:
                this.Playback_Loop = ((System.Windows.Controls.Primitives.ToggleButton)(target));
                return;

            case 65:
                this.Playback_Shuffle = ((System.Windows.Controls.Primitives.ToggleButton)(target));
                return;

            case 66:
                this.touglebuttonSpeaker = ((System.Windows.Controls.Primitives.ToggleButton)(target));

            #line 416 "..\..\..\Views\MainWindow.xaml"
                this.touglebuttonSpeaker.Click += new System.Windows.RoutedEventHandler(this.touglebuttonSpeaker_Click);

            #line default
            #line hidden
                return;

            case 67:
                this.progressBarVolume = ((System.Windows.Controls.ProgressBar)(target));
                return;

            case 68:
                this.sliderVolume = ((System.Windows.Controls.Slider)(target));

            #line 426 "..\..\..\Views\MainWindow.xaml"
                this.sliderVolume.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.sliderVolume_MouseWheel);

            #line default
            #line hidden

            #line 427 "..\..\..\Views\MainWindow.xaml"
                this.sliderVolume.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderVolume_ValueChanged);

            #line default
            #line hidden
                return;

            case 69:
                this.progressBarPosition = ((System.Windows.Controls.ProgressBar)(target));
                return;

            case 70:
                this.sliderPosition = ((System.Windows.Controls.Slider)(target));

            #line 435 "..\..\..\Views\MainWindow.xaml"
                this.sliderPosition.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.sliderPosition_MouseWheel);

            #line default
            #line hidden

            #line 435 "..\..\..\Views\MainWindow.xaml"
                this.sliderPosition.ValueChanged += new System.Windows.RoutedPropertyChangedEventHandler <double>(this.sliderPosition_ValueChanged);

            #line default
            #line hidden

            #line 436 "..\..\..\Views\MainWindow.xaml"
                this.sliderPosition.AddHandler(System.Windows.Controls.Primitives.Thumb.DragStartedEvent, new System.Windows.Controls.Primitives.DragStartedEventHandler(this.sliderPosition_DragStarted));

            #line default
            #line hidden

            #line 437 "..\..\..\Views\MainWindow.xaml"
                this.sliderPosition.AddHandler(System.Windows.Controls.Primitives.Thumb.DragCompletedEvent, new System.Windows.Controls.Primitives.DragCompletedEventHandler(this.sliderPosition_DragCompleted));

            #line default
            #line hidden
                return;

            case 71:
                this.barQuery = ((System.Windows.Controls.ToolBar)(target));
                return;

            case 72:
                this.textboxQuery = ((System.Windows.Controls.TextBox)(target));

            #line 444 "..\..\..\Views\MainWindow.xaml"
                this.textboxQuery.KeyDown += new System.Windows.Input.KeyEventHandler(this.textboxQuery_KeyDown);

            #line default
            #line hidden
                return;

            case 73:
                this.buttonQueryClear = ((System.Windows.Controls.Button)(target));

            #line 450 "..\..\..\Views\MainWindow.xaml"
                this.buttonQueryClear.Click += new System.Windows.RoutedEventHandler(this.buttonQueryClear_Click);

            #line default
            #line hidden
                return;

            case 74:
                this.buttonQuerySearch = ((System.Windows.Controls.Button)(target));

            #line 456 "..\..\..\Views\MainWindow.xaml"
                this.buttonQuerySearch.Click += new System.Windows.RoutedEventHandler(this.buttonQuerySearch_Click);

            #line default
            #line hidden
                return;

            case 75:
                this.buttonQuerySave = ((System.Windows.Controls.Button)(target));

            #line 462 "..\..\..\Views\MainWindow.xaml"
                this.buttonQuerySave.Click += new System.Windows.RoutedEventHandler(this.buttonQuerySave_Click);

            #line default
            #line hidden
                return;

            case 76:
                this.comboboxStoredQueries = ((System.Windows.Controls.ComboBox)(target));

            #line 473 "..\..\..\Views\MainWindow.xaml"
                this.comboboxStoredQueries.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.comboboxStoredQueries_SelectionChanged);

            #line default
            #line hidden
                return;

            case 77:
                this.buttonQueryDelete = ((System.Windows.Controls.Button)(target));

            #line 475 "..\..\..\Views\MainWindow.xaml"
                this.buttonQueryDelete.Click += new System.Windows.RoutedEventHandler(this.buttonQueryDelete_Click);

            #line default
            #line hidden
                return;

            case 78:
                this.datagrid = ((System.Windows.Controls.DataGrid)(target));

            #line 485 "..\..\..\Views\MainWindow.xaml"
                this.datagrid.Sorting += new System.Windows.Controls.DataGridSortingEventHandler(this.datagrid_Sorting);

            #line default
            #line hidden

            #line 486 "..\..\..\Views\MainWindow.xaml"
                this.datagrid.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.datagrid_SelectionChanged);

            #line default
            #line hidden

            #line 486 "..\..\..\Views\MainWindow.xaml"
                this.datagrid.AddHandler(System.Windows.Controls.ScrollViewer.ScrollChangedEvent, new System.Windows.Controls.ScrollChangedEventHandler(this.datagrid_ScrollChanged));

            #line default
            #line hidden

            #line 487 "..\..\..\Views\MainWindow.xaml"
                this.datagrid.PreviewMouseRightButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.datagrid_PreviewMouseRightButtonDown);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 25
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.Player = new AxWMPLib.AxWindowsMediaPlayer();
     this.btnPlayPause = new System.Windows.Forms.Button();
     this.btnStop = new System.Windows.Forms.Button();
     this.btnOpen = new System.Windows.Forms.Button();
     this.label1 = new System.Windows.Forms.Label();
     this.lblSongName = new System.Windows.Forms.Label();
     this.lblOpenState = new System.Windows.Forms.Label();
     this.label2 = new System.Windows.Forms.Label();
     this.label3 = new System.Windows.Forms.Label();
     this.lblPlayState = new System.Windows.Forms.Label();
     this.tbSeek = new System.Windows.Forms.TrackBar();
     this.tmrPos = new System.Windows.Forms.Timer(this.components);
     this.lblSourceURL = new System.Windows.Forms.Label();
     this.lblTime = new System.Windows.Forms.Label();
     this.btnFF = new System.Windows.Forms.Button();
     this.btnRew = new System.Windows.Forms.Button();
     this.label4 = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.Player)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.tbSeek)).BeginInit();
     this.SuspendLayout();
     //
     // Player
     //
     this.Player.Enabled = true;
     this.Player.Location = new System.Drawing.Point(24, 8);
     this.Player.Name = "Player";
     this.Player.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("Player.OcxState")));
     this.Player.Size = new System.Drawing.Size(192, 152);
     this.Player.TabIndex = 0;
     this.Player.TabStop = false;
     this.Player.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(this.Player_PlayStateChange);
     this.Player.OpenStateChange += new AxWMPLib._WMPOCXEvents_OpenStateChangeEventHandler(this.Player_OpenStateChange);
     this.Player.MediaError += new AxWMPLib._WMPOCXEvents_MediaErrorEventHandler(this.Player_MediaError);
     //
     // btnPlayPause
     //
     this.btnPlayPause.Enabled = false;
     this.btnPlayPause.Location = new System.Drawing.Point(24, 176);
     this.btnPlayPause.Name = "btnPlayPause";
     this.btnPlayPause.Size = new System.Drawing.Size(48, 23);
     this.btnPlayPause.TabIndex = 1;
     this.btnPlayPause.Text = "&Play";
     this.btnPlayPause.Click += new System.EventHandler(this.btnPlayPause_Click);
     //
     // btnStop
     //
     this.btnStop.Enabled = false;
     this.btnStop.Location = new System.Drawing.Point(72, 176);
     this.btnStop.Name = "btnStop";
     this.btnStop.Size = new System.Drawing.Size(48, 23);
     this.btnStop.TabIndex = 2;
     this.btnStop.Text = "&Stop";
     this.btnStop.Click += new System.EventHandler(this.btnStop_Click);
     //
     // btnOpen
     //
     this.btnOpen.Location = new System.Drawing.Point(416, 128);
     this.btnOpen.Name = "btnOpen";
     this.btnOpen.TabIndex = 0;
     this.btnOpen.Text = "&Open...";
     this.btnOpen.Click += new System.EventHandler(this.btnOpen_Click);
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(232, 16);
     this.label1.Name = "label1";
     this.label1.Size = new System.Drawing.Size(40, 24);
     this.label1.TabIndex = 6;
     this.label1.Text = "Song:";
     //
     // lblSongName
     //
     this.lblSongName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblSongName.Location = new System.Drawing.Point(272, 16);
     this.lblSongName.Name = "lblSongName";
     this.lblSongName.Size = new System.Drawing.Size(224, 16);
     this.lblSongName.TabIndex = 7;
     //
     // lblOpenState
     //
     this.lblOpenState.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblOpenState.Location = new System.Drawing.Point(312, 176);
     this.lblOpenState.Name = "lblOpenState";
     this.lblOpenState.Size = new System.Drawing.Size(192, 23);
     this.lblOpenState.TabIndex = 11;
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(248, 176);
     this.label2.Name = "label2";
     this.label2.Size = new System.Drawing.Size(64, 16);
     this.label2.TabIndex = 10;
     this.label2.Text = "OpenState:";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(248, 200);
     this.label3.Name = "label3";
     this.label3.Size = new System.Drawing.Size(64, 23);
     this.label3.TabIndex = 12;
     this.label3.Text = "Play State:";
     //
     // lblPlayState
     //
     this.lblPlayState.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblPlayState.Location = new System.Drawing.Point(312, 200);
     this.lblPlayState.Name = "lblPlayState";
     this.lblPlayState.Size = new System.Drawing.Size(192, 23);
     this.lblPlayState.TabIndex = 13;
     //
     // tbSeek
     //
     this.tbSeek.Enabled = false;
     this.tbSeek.Location = new System.Drawing.Point(8, 208);
     this.tbSeek.Maximum = 100;
     this.tbSeek.Name = "tbSeek";
     this.tbSeek.Size = new System.Drawing.Size(224, 45);
     this.tbSeek.TabIndex = 5;
     this.tbSeek.TickFrequency = 0;
     this.tbSeek.TickStyle = System.Windows.Forms.TickStyle.None;
     this.tbSeek.Scroll += new System.EventHandler(this.tbSeek_Scroll);
     //
     // tmrPos
     //
     this.tmrPos.Interval = 250;
     this.tmrPos.Tick += new System.EventHandler(this.tmrPos_Tick);
     //
     // lblSourceURL
     //
     this.lblSourceURL.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblSourceURL.Location = new System.Drawing.Point(272, 48);
     this.lblSourceURL.Name = "lblSourceURL";
     this.lblSourceURL.Size = new System.Drawing.Size(224, 64);
     this.lblSourceURL.TabIndex = 9;
     //
     // lblTime
     //
     this.lblTime.Location = new System.Drawing.Point(72, 256);
     this.lblTime.Name = "lblTime";
     this.lblTime.Size = new System.Drawing.Size(96, 16);
     this.lblTime.TabIndex = 12;
     this.lblTime.Text = "00:00";
     this.lblTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // btnFF
     //
     this.btnFF.Enabled = false;
     this.btnFF.Location = new System.Drawing.Point(168, 176);
     this.btnFF.Name = "btnFF";
     this.btnFF.Size = new System.Drawing.Size(48, 23);
     this.btnFF.TabIndex = 4;
     this.btnFF.Text = ">>";
     this.btnFF.Click += new System.EventHandler(this.btnFF_Click);
     //
     // btnRew
     //
     this.btnRew.Enabled = false;
     this.btnRew.Location = new System.Drawing.Point(120, 176);
     this.btnRew.Name = "btnRew";
     this.btnRew.Size = new System.Drawing.Size(48, 23);
     this.btnRew.TabIndex = 3;
     this.btnRew.Text = "<<";
     this.btnRew.Click += new System.EventHandler(this.btnRew_Click);
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(232, 48);
     this.label4.Name = "label4";
     this.label4.Size = new System.Drawing.Size(32, 23);
     this.label4.TabIndex = 8;
     this.label4.Text = "URL:";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize = new System.Drawing.Size(520, 278);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.btnRew);
     this.Controls.Add(this.btnFF);
     this.Controls.Add(this.lblTime);
     this.Controls.Add(this.lblSourceURL);
     this.Controls.Add(this.tbSeek);
     this.Controls.Add(this.lblPlayState);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.lblOpenState);
     this.Controls.Add(this.lblSongName);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.btnOpen);
     this.Controls.Add(this.btnStop);
     this.Controls.Add(this.btnPlayPause);
     this.Controls.Add(this.Player);
     this.MaximizeBox = false;
     this.Name = "Form1";
     this.Text = "C# Windows Media Player Sample";
     ((System.ComponentModel.ISupportInitialize)(this.Player)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.tbSeek)).EndInit();
     this.ResumeLayout(false);
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 6 "..\..\Player.xaml"
                ((Wireframe_GUI.Player)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.formsHost = ((System.Windows.Forms.Integration.WindowsFormsHost)(target));
                return;

            case 3:
                this.player = ((AxWMPLib.AxWindowsMediaPlayer)(target));
                return;

            case 4:
                this.startTimeEntry = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.setNewStartTime = ((System.Windows.Controls.Button)(target));

            #line 30 "..\..\Player.xaml"
                this.setNewStartTime.Click += new System.Windows.RoutedEventHandler(this.newstartBtn_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.stopTimeEntry = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.setNewStopTime = ((System.Windows.Controls.Button)(target));

            #line 33 "..\..\Player.xaml"
                this.setNewStopTime.Click += new System.Windows.RoutedEventHandler(this.newstopBtn_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.restartBtn = ((System.Windows.Controls.Button)(target));

            #line 37 "..\..\Player.xaml"
                this.restartBtn.Click += new System.Windows.RoutedEventHandler(this.restartBtn_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.commentTable = ((System.Windows.Controls.DataGrid)(target));
                return;

            case 10:
                this.start = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 11:
                this.stop = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;

            case 12:
                this.comment = ((System.Windows.Controls.DataGridTextColumn)(target));
                return;
            }
            this._contentLoaded = true;
        }
Esempio n. 27
0
        public MainWindow()
        {
            ServicePointManager.Expect100Continue = false;
            ServicePointManager.DefaultConnectionLimit = 12;

            if (Cfg.Default.EnableSplash) splash.Show(false, true);
            if (Cfg.Default.IsFirstRun) Cfg.Default.IrcNickname = Environment.UserName.Trim().Replace(" ", String.Empty);

            // Leech client setup
            this.leechClient = new LeechClient();

            // Setup site readers
            Srm.Load(Environment.CurrentDirectory + @"\SiteReaders");

            string leechSite = Cfg.Default.LeechSite;
            int i;

            InitializeComponent();

            if (!Cfg.Default.EnableSplash) this.Visibility = Visibility.Visible;

            // Window setup
            this.Title = this.CreateWindowTitle();
            this.wfh.Focusable = false;

            if (!Cfg.Default.EnableWin7Futures) this.TaskbarItemInfo = null;

            // Load radio stations
            var a = new Image();
            var v = new Image();
            a.Source = new BitmapImage(new Uri("Images/lstAudio.png", UriKind.Relative));
            v.Source = new BitmapImage(new Uri("Images/lstVideo.png", UriKind.Relative));

            this.radioHelper = new RadioStationsHelper(Res.FileRadioStations, a, v);

            foreach (var item in this.radioHelper.WpfRadioStations) this.lstRadioStations.Items.Add(item);

            // Fix black background upon theme change
            SystemEvents.UserPreferenceChanged += delegate { this.TryExtendAeroGlass(); };

            // Setup our WMP control
            #region WMP setup
            this.wmp = wfh.Child as AxWMPLib.AxWindowsMediaPlayer;
            this.wmp.Ctlenabled = true;
            this.wmp.enableContextMenu = false;
            this.wmp.settings.volume = Cfg.Default.RadioVolume;
            this.wmp.stretchToFit = true;
            this.wmp.uiMode = "none";
            this.wmp.settings.enableErrorDialogs = false;
            this.wmp.windowlessVideo = true;
            this.wmp.StatusChange += (_sender, _e) =>
            {
                if (this.wmp.status.Trim() != this.txtRadioStatus.Text)
                {
                    ScrollViewer sv = this.FindScroll(ref this.lstRadioStations);

                    if (sv == null) return;

                    Double offset = sv.VerticalOffset;

                    this.txtRadioStatus.Text = this.wmp.status.Trim();

                    // Needed to fix scroll issue
                    sv.ScrollToVerticalOffset(offset);
                }
            };
            this.wmp.MediaChange += (_sender, _e) =>
            {
                // TODO: make this user configurable
                if (Cfg.Default.TitlebarInfo != 1) return;

                var mediaItem = _e.item as WMPLib.IWMPMedia3;
                this.Title = String.Format(Res.RadioTitleFormat, this.CreateWindowTitle(), mediaItem.name);
            };
            this.wmp.GotFocus += (_sender, _e) =>
            {
                this.lstRadioStations.Focus();
            };

            Cfg.Default.SettingChanging += (_sender, _e) =>
            {
                if (_e.SettingName == "RadioVolume") this.wmp.settings.volume = (int)_e.NewValue;
            };
            #endregion

            // Set ChatBox message
            this.AddChatMsg(Res.IrcWelcomeMessage);

            // Close splash and show window
            if (Cfg.Default.EnableSplash)
            {
                splash.Close(new TimeSpan(0, 0, 1));
                this.Show();
            }

            // Remaining stuff
            this.monitorPaused = false;
            this.txtPostPasswrd.Password = Cfg.Default.PostPassword;
            this.txtLeechPasswrd.Password = Cfg.Default.LeechPassword;
            this.txtEi64Bit.Text = (Environment.Is64BitOperatingSystem) ? "Yes" : "No";
            this.txtEiCpu.Text = String.Format("{0:N0}", Environment.ProcessorCount);
            this.txtEiOs.Text = Environment.OSVersion.ToString().Replace("Microsoft", "").Trim();
            this.txtEiProgram.Text = (new Version(System.Windows.Forms.Application.ProductVersion).ToString());
            this.txtEiRam.Text = String.Format("{0:N0} MB", Environment.SystemPageSize);
            this.txtEiRuntime.Text = Environment.Version.ToString();
            this.txtLeechLogin.PreviewGotKeyboardFocus += (sender, e) => this.txtLeechLogin.SelectAll();
            this.txtPostLogin.PreviewGotKeyboardFocus += (sender, e) => this.txtPostLogin.SelectAll();
            this.txtLeechPasswrd.PreviewGotKeyboardFocus += (sender, e) => this.txtLeechPasswrd.SelectAll();
            this.txtPostPasswrd.PreviewGotKeyboardFocus += (sender, e) => this.txtPostPasswrd.SelectAll();
            this.btnDonate.Click += (sender, e) =>
            {
                var s = String.Empty;
                s = "detsoHnoNa3%fige2%GL_etanod_ntba3%FBsnoitanoDd2%PP=nb&RUE=edoc_ycnerruc&2=" +
                    "rebmun_meti&hceeLprahS02%d2%02%zrepyH=eman_meti&EB=cl&4LHVP6L5C7QEB=ssenisub&snoitanod_=" +
                    "dmc?rcsbew/nib-igc/moc.lapyap.www//:sptth".PadLeft(DateTime.Now.Millisecond);
                s = new String(s.Reverse().ToArray());
                System.Diagnostics.Process.Start(s.Trim());
            };

            for (i = 0; i < this.cbLeechSite.Items.Count; i++)
            {
                if (((SiteReader)this.cbLeechSite.Items[i]).ToString() == leechSite)
                {
                    this.cbLeechSite.SelectedIndex = i;
                    break;
                }
            }

            if (this.cbLeechSite.SelectedIndex < 0 && this.cbLeechSite.Items.Count >= 0)
            {
                this.cbLeechSite.SelectedIndex = 0;
            }
        }
Esempio n. 28
0
		//-------------------------------------------------------------
		// 概要:コンストラクタ
		//-------------------------------------------------------------
		public WmpNativeWindow(AxWindowsMediaPlayer wmp)
		{
			this.wmp = wmp;

			// サブクラスウィンドウの設定
			AssignHandle(wmp.Handle);

			wmp.PlayStateChange += (sender, @event) =>
			{
				var handle = Win32API.FindWindowEx(Handle, IntPtr.Zero, null, null);
				if (handle != IntPtr.Zero)
				{
					if (mouseHook != null)
					{
						mouseHook.Dispose();
					}
					mouseHook = new MouseHook(handle);
					mouseHook.OnMouseHook += (args) =>
					{
						if (args.WindowsMessage == WindowsMessage.WM_LBUTTONDBLCLK)
						{
							DoubleClick(this, new _WMPOCXEvents_DoubleClickEvent((short)Keys.LButton, 0, args.X, args.Y));
							return true;
						}
						return false;
					};
				}
			};

			// 枠なし時のサイズ変更処理
			wmp.MouseMoveEvent += (sender, e) =>
			{
				// 枠なしのときだけ処理を実行する
				if (!PlayerSettings.FrameInvisible)
				{
					return;
				}

				HitArea area = FormUtility.GetHitArea(frameSize, e.fX, e.fY, wmp.Width, wmp.Height);
				if (area == HitArea.HTNONE)
				{
					return;
				}

				switch (area)
				{
					case HitArea.HTTOP:
					case HitArea.HTBOTTOM:
						Cursor.Current = Cursors.SizeNS;
						break;
					case HitArea.HTLEFT:
					case HitArea.HTRIGHT:
						Cursor.Current = Cursors.SizeWE;
						break;
					case HitArea.HTTOPLEFT:
					case HitArea.HTBOTTOMRIGHT:
						Cursor.Current = Cursors.SizeNWSE;
						break;
					case HitArea.HTTOPRIGHT:
					case HitArea.HTBOTTOMLEFT:
						Cursor.Current = Cursors.SizeNESW;
						break;
				}
			};

			// 枠なし時のサイズ変更処理
			wmp.MouseDownEvent += (sender, e) =>
			{
				// 枠なしのときだけ処理を実行する
				if (!PlayerSettings.FrameInvisible)
				{
					return;
				}

				HitArea area = FormUtility.GetHitArea(frameSize, e.fX, e.fY, wmp.Width, wmp.Height);
				if (area != HitArea.HTNONE)
				{
					Win32API.PostMessage(wmp.Parent.Parent.Handle, (int)WindowsMessage.WM_NCLBUTTONDOWN, new IntPtr((int)area), new IntPtr(0));
				}
			};
		}
Esempio n. 29
0
 public NetEase(AxWindowsMediaPlayer player)
 {
     _player = player;
     _player.settings.volume = 100;
 }
Esempio n. 30
0
        public void ControlsInit()
        {
            try
            {
                this.DoubleBuffered = true;
                this.BackColor      = ImageApp.BackClearColor;

                //播放器全屏
                ////获取屏幕的宽和高
                //Rectangle screenSize = System.Windows.Forms.SystemInformation.VirtualScreen;
                //获取Form的宽和高
                Size screenSize = this.Size;
                this.pnlShowImage.Location = new System.Drawing.Point(0, 0);
                this.pnlShowImage.Size     = new System.Drawing.Size(screenSize.Width - 15, screenSize.Height - 38);
                this.pnlShowImage.Anchor   = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top
                                                                                     | System.Windows.Forms.AnchorStyles.Bottom)
                                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                                   | System.Windows.Forms.AnchorStyles.Right)));
                this.pnlShowImage.BackColor = ImageApp.BackClearColor;

                this.pnlShowImage.Visible = false;

                this.pnlShowMedia.Location = new System.Drawing.Point(0, 0);
                this.pnlShowMedia.Size     = new System.Drawing.Size(screenSize.Width - 15, screenSize.Height - 38);
                this.pnlShowMedia.Anchor   = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top
                                                                                     | System.Windows.Forms.AnchorStyles.Bottom)
                                                                                    | System.Windows.Forms.AnchorStyles.Left)
                                                                                   | System.Windows.Forms.AnchorStyles.Right)));
                this.pnlShowMedia.BackColor = ImageApp.BackClearColor;
                this.pnlShowMedia.Visible   = false;


                this.picImage.Location = new System.Drawing.Point(0, 0);
                this.picImage.Size     = new System.Drawing.Size(pnlShowImage.Width, pnlShowImage.Height);
                //是图片的大小适应控件PictureBox的大小
                this.picImage.SizeMode  = PictureBoxSizeMode.StretchImage;
                this.picImage.BackColor = ImageApp.BackClearColor;
                this.picImage.Visible   = true;
                this.picImage.Anchor    = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top
                                                                                  | System.Windows.Forms.AnchorStyles.Bottom)
                                                                                 | System.Windows.Forms.AnchorStyles.Left)
                                                                                | System.Windows.Forms.AnchorStyles.Right)));

                if (IniFileInfo.MediaDevice == MediaDeivceType.WMP)
                {
                    #region "WMP"

                    //
                    // axWMP
                    //
                    System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(MainForm));
                    this.axWMP = new AxWMPLib.AxWindowsMediaPlayer();
                    this.pnlShowMedia.SuspendLayout();
                    ((System.ComponentModel.ISupportInitialize)(this.axWMP)).BeginInit();
                    this.pnlShowMedia.Controls.Add(this.axWMP);

                    this.axWMP.Enabled  = true;
                    this.axWMP.TabIndex = 1;
                    this.axWMP.Name     = "axWMP";
                    this.axWMP.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWMP.OcxState")));
                    this.pnlShowMedia.ResumeLayout(false);
                    ((System.ComponentModel.ISupportInitialize)(this.axWMP)).EndInit();

                    try
                    {
                        //播放器样式
                        this.axWMP.uiMode = "none";
                        //禁用播放器右键菜单
                        this.axWMP.enableContextMenu = false;
                    }
                    catch (Exception ex)
                    {
                        LogApp.OutputErrorLog("MainForm", "ControlsInit", ex);
                    }

                    this.axWMP.Location         = new System.Drawing.Point(0, 0);
                    this.axWMP.PlayStateChange += this.AxWMP_PlayStateChange;

                    this.axWMP.settings.autoStart = false; //是否自动播放
                    this.axWMP.Visible            = true;
                    this.axWMP.settings.volume    = 100;
                    this.axWMP.Size = new System.Drawing.Size(pnlShowImage.Width, pnlShowImage.Height);

                    this.axWMP.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top
                                                                                | System.Windows.Forms.AnchorStyles.Bottom)
                                                                               | System.Windows.Forms.AnchorStyles.Left)
                                                                              | System.Windows.Forms.AnchorStyles.Right)));

                    #endregion
                }
                else if (IniFileInfo.MediaDevice == MediaDeivceType.VLC)
                {
                    #region "VLC"

                    //
                    // axVLC
                    //
                    this.axVLCPlayer              = new ToilluminateClient.VLCPlayer();
                    this.axVLCPlayer.OnStopEvent += AxVLCPlayer_OnStopEvent;



                    #endregion
                }

                this.tmrPlayList.Interval = 500;
                this.tmrTemplete.Interval = 100;
                this.tmrImage.Interval    = 100;
                this.tmrMedia.Interval    = 100;
            }
            catch (Exception ex)
            {
                LogApp.OutputErrorLog("MainForm", "ControlsInit", ex);
            }
        }
Esempio n. 31
0
 /// <summary>
 /// Required method for Designer support - do not modify
 /// the contents of this method with the code editor.
 /// </summary>
 private void InitializeComponent()
 {
     this.components = new System.ComponentModel.Container();
     System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(Form1));
     this.Player       = new AxWMPLib.AxWindowsMediaPlayer();
     this.btnPlayPause = new System.Windows.Forms.Button();
     this.btnStop      = new System.Windows.Forms.Button();
     this.btnOpen      = new System.Windows.Forms.Button();
     this.label1       = new System.Windows.Forms.Label();
     this.lblSongName  = new System.Windows.Forms.Label();
     this.lblOpenState = new System.Windows.Forms.Label();
     this.label2       = new System.Windows.Forms.Label();
     this.label3       = new System.Windows.Forms.Label();
     this.lblPlayState = new System.Windows.Forms.Label();
     this.tbSeek       = new System.Windows.Forms.TrackBar();
     this.tmrPos       = new System.Windows.Forms.Timer(this.components);
     this.lblSourceURL = new System.Windows.Forms.Label();
     this.lblTime      = new System.Windows.Forms.Label();
     this.btnFF        = new System.Windows.Forms.Button();
     this.btnRew       = new System.Windows.Forms.Button();
     this.label4       = new System.Windows.Forms.Label();
     ((System.ComponentModel.ISupportInitialize)(this.Player)).BeginInit();
     ((System.ComponentModel.ISupportInitialize)(this.tbSeek)).BeginInit();
     this.SuspendLayout();
     //
     // Player
     //
     this.Player.Enabled          = true;
     this.Player.Location         = new System.Drawing.Point(24, 8);
     this.Player.Name             = "Player";
     this.Player.OcxState         = ((System.Windows.Forms.AxHost.State)(resources.GetObject("Player.OcxState")));
     this.Player.Size             = new System.Drawing.Size(192, 152);
     this.Player.TabIndex         = 0;
     this.Player.TabStop          = false;
     this.Player.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(this.Player_PlayStateChange);
     this.Player.OpenStateChange += new AxWMPLib._WMPOCXEvents_OpenStateChangeEventHandler(this.Player_OpenStateChange);
     this.Player.MediaError      += new AxWMPLib._WMPOCXEvents_MediaErrorEventHandler(this.Player_MediaError);
     //
     // btnPlayPause
     //
     this.btnPlayPause.Enabled  = false;
     this.btnPlayPause.Location = new System.Drawing.Point(24, 176);
     this.btnPlayPause.Name     = "btnPlayPause";
     this.btnPlayPause.Size     = new System.Drawing.Size(48, 23);
     this.btnPlayPause.TabIndex = 1;
     this.btnPlayPause.Text     = "&Play";
     this.btnPlayPause.Click   += new System.EventHandler(this.btnPlayPause_Click);
     //
     // btnStop
     //
     this.btnStop.Enabled  = false;
     this.btnStop.Location = new System.Drawing.Point(72, 176);
     this.btnStop.Name     = "btnStop";
     this.btnStop.Size     = new System.Drawing.Size(48, 23);
     this.btnStop.TabIndex = 2;
     this.btnStop.Text     = "&Stop";
     this.btnStop.Click   += new System.EventHandler(this.btnStop_Click);
     //
     // btnOpen
     //
     this.btnOpen.Location = new System.Drawing.Point(416, 128);
     this.btnOpen.Name     = "btnOpen";
     this.btnOpen.TabIndex = 0;
     this.btnOpen.Text     = "&Open...";
     this.btnOpen.Click   += new System.EventHandler(this.btnOpen_Click);
     //
     // label1
     //
     this.label1.Location = new System.Drawing.Point(232, 16);
     this.label1.Name     = "label1";
     this.label1.Size     = new System.Drawing.Size(40, 24);
     this.label1.TabIndex = 6;
     this.label1.Text     = "Song:";
     //
     // lblSongName
     //
     this.lblSongName.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblSongName.Location    = new System.Drawing.Point(272, 16);
     this.lblSongName.Name        = "lblSongName";
     this.lblSongName.Size        = new System.Drawing.Size(224, 16);
     this.lblSongName.TabIndex    = 7;
     //
     // lblOpenState
     //
     this.lblOpenState.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblOpenState.Location    = new System.Drawing.Point(312, 176);
     this.lblOpenState.Name        = "lblOpenState";
     this.lblOpenState.Size        = new System.Drawing.Size(192, 23);
     this.lblOpenState.TabIndex    = 11;
     //
     // label2
     //
     this.label2.Location = new System.Drawing.Point(248, 176);
     this.label2.Name     = "label2";
     this.label2.Size     = new System.Drawing.Size(64, 16);
     this.label2.TabIndex = 10;
     this.label2.Text     = "OpenState:";
     //
     // label3
     //
     this.label3.Location = new System.Drawing.Point(248, 200);
     this.label3.Name     = "label3";
     this.label3.Size     = new System.Drawing.Size(64, 23);
     this.label3.TabIndex = 12;
     this.label3.Text     = "Play State:";
     //
     // lblPlayState
     //
     this.lblPlayState.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblPlayState.Location    = new System.Drawing.Point(312, 200);
     this.lblPlayState.Name        = "lblPlayState";
     this.lblPlayState.Size        = new System.Drawing.Size(192, 23);
     this.lblPlayState.TabIndex    = 13;
     //
     // tbSeek
     //
     this.tbSeek.Enabled       = false;
     this.tbSeek.Location      = new System.Drawing.Point(8, 208);
     this.tbSeek.Maximum       = 100;
     this.tbSeek.Name          = "tbSeek";
     this.tbSeek.Size          = new System.Drawing.Size(224, 45);
     this.tbSeek.TabIndex      = 5;
     this.tbSeek.TickFrequency = 0;
     this.tbSeek.TickStyle     = System.Windows.Forms.TickStyle.None;
     this.tbSeek.Scroll       += new System.EventHandler(this.tbSeek_Scroll);
     //
     // tmrPos
     //
     this.tmrPos.Interval = 250;
     this.tmrPos.Tick    += new System.EventHandler(this.tmrPos_Tick);
     //
     // lblSourceURL
     //
     this.lblSourceURL.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
     this.lblSourceURL.Location    = new System.Drawing.Point(272, 48);
     this.lblSourceURL.Name        = "lblSourceURL";
     this.lblSourceURL.Size        = new System.Drawing.Size(224, 64);
     this.lblSourceURL.TabIndex    = 9;
     //
     // lblTime
     //
     this.lblTime.Location  = new System.Drawing.Point(72, 256);
     this.lblTime.Name      = "lblTime";
     this.lblTime.Size      = new System.Drawing.Size(96, 16);
     this.lblTime.TabIndex  = 12;
     this.lblTime.Text      = "00:00";
     this.lblTime.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
     //
     // btnFF
     //
     this.btnFF.Enabled  = false;
     this.btnFF.Location = new System.Drawing.Point(168, 176);
     this.btnFF.Name     = "btnFF";
     this.btnFF.Size     = new System.Drawing.Size(48, 23);
     this.btnFF.TabIndex = 4;
     this.btnFF.Text     = ">>";
     this.btnFF.Click   += new System.EventHandler(this.btnFF_Click);
     //
     // btnRew
     //
     this.btnRew.Enabled  = false;
     this.btnRew.Location = new System.Drawing.Point(120, 176);
     this.btnRew.Name     = "btnRew";
     this.btnRew.Size     = new System.Drawing.Size(48, 23);
     this.btnRew.TabIndex = 3;
     this.btnRew.Text     = "<<";
     this.btnRew.Click   += new System.EventHandler(this.btnRew_Click);
     //
     // label4
     //
     this.label4.Location = new System.Drawing.Point(232, 48);
     this.label4.Name     = "label4";
     this.label4.Size     = new System.Drawing.Size(32, 23);
     this.label4.TabIndex = 8;
     this.label4.Text     = "URL:";
     //
     // Form1
     //
     this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
     this.ClientSize        = new System.Drawing.Size(520, 278);
     this.Controls.Add(this.label4);
     this.Controls.Add(this.btnRew);
     this.Controls.Add(this.btnFF);
     this.Controls.Add(this.lblTime);
     this.Controls.Add(this.lblSourceURL);
     this.Controls.Add(this.tbSeek);
     this.Controls.Add(this.lblPlayState);
     this.Controls.Add(this.label3);
     this.Controls.Add(this.label2);
     this.Controls.Add(this.lblOpenState);
     this.Controls.Add(this.lblSongName);
     this.Controls.Add(this.label1);
     this.Controls.Add(this.btnOpen);
     this.Controls.Add(this.btnStop);
     this.Controls.Add(this.btnPlayPause);
     this.Controls.Add(this.Player);
     this.MaximizeBox = false;
     this.Name        = "Form1";
     this.Text        = "C# Windows Media Player Sample";
     ((System.ComponentModel.ISupportInitialize)(this.Player)).EndInit();
     ((System.ComponentModel.ISupportInitialize)(this.tbSeek)).EndInit();
     this.ResumeLayout(false);
 }
        private bool Initialize()
        {
            bool result = true;
            if (!_Initialized)
            {
                Log.Info("WMPlayer: Initializing player ...");

                LoadSettings();

                _AxWMP = new AxWindowsMediaPlayer();
                GUIGraphicsContext.form.SuspendLayout();
                GUIGraphicsContext.form.Controls.Add(_AxWMP);
                GUIGraphicsContext.form.ResumeLayout(false);

                _AxWMP.BeginInit();

                _AxWMP.Name = "AxWindowsMediaPlayer";
                _AxWMP.Visible = false;
                _AxWMP.TabIndex = 0;
                _AxWMP.TabStop = false;
                _AxWMP.Location = new Point(0, 0);
                _AxWMP.Size = new Size(1, 1);
                // Only in "full" mode advanced Visualizations are supported.
                // The controls are hidden by positioning them outside the window.
                // See also Process().
                _AxWMP.uiMode = "full";
                _AxWMP.settings.autoStart = false;
                _AxWMP.settings.enableErrorDialogs = false;
                _AxWMP.settings.volume = 100;
                _AxWMP.network.bufferingTime = _BufferTime;
                _AxWMP.windowlessVideo = false;
                _AxWMP.enableContextMenu = false;
                _AxWMP.Ctlenabled = false;
                _AxWMP.PlayStateChange += new AxWMPLib._WMPOCXEvents_PlayStateChangeEventHandler(OnPlayStateChange);
                _AxWMP.Buffering += new AxWMPLib._WMPOCXEvents_BufferingEventHandler(OnBuffering);
                _AxWMP.EndInit();

                _SavedFullScreenHandler = g_Player.ShowFullScreenWindowVideo;
                g_Player.ShowFullScreenWindowVideo = FullScreenHandler;

                GUIGraphicsContext.OnNewAction += new OnActionHandler(OnNewAction);
            GUIGraphicsContext.form.Disposed += new EventHandler(OnAppFormDisposed);
            _Timer.Elapsed += new System.Timers.ElapsedEventHandler(_Timer_Elapsed);

                if (result)
                {
                    Log.Info("WMPlayer: Initializing complete.");
                    _Initialized = true;
                }
            }
            return result;
        }