Exemple #1
0
        //-------------------------------------------------------------
        // 概要:MovieStartイベントが発生するか確認
        //-------------------------------------------------------------
        private static void OpenTest(string streamUrl)
        {
            // 再生中の判定
            bool isPlaying = false;

            // イベント登録
            PecaPlayerForm form = new PecaPlayerForm();

            form.Show();

            PecaPlayerControl pecaPlayer  = form.pecaPlayer;
            PrivateObject     accessor    = new PrivateObject(pecaPlayer);
            IMoviePlayer      moviePlayer = (IMoviePlayer)accessor.GetField("moviePlayer");

            moviePlayer.MovieStart += (sender, e) =>
            {
                isPlaying = true;
            };

            // テスト対象を実行
            pecaPlayer.Open(streamUrl);

            // 再生されるまで待つ
            while (isPlaying == false)
            {
                Application.DoEvents();
                Thread.Sleep(100);
            }
        }
Exemple #2
0
        //-------------------------------------------------------------
        // 概要:コンストラクタ
        // 詳細:コントロールの初期化
        //-------------------------------------------------------------
        public PecaPlayerControl()
        {
            Logger.Instance.Debug("PecaPlayer()");
            InitializeComponent();

            // チャンネル情報更新スレッド:キャンセル許可
            updateChannelInfoWorker.WorkerSupportsCancellation = true;

            this.SuspendLayout();
            string[] commandLineArgs = Environment.GetCommandLineArgs();
            if (commandLineArgs.Length > 2 && string.Equals(commandLineArgs[2], "FLV", StringComparison.OrdinalIgnoreCase))
            {
                moviePlayer = new FlashMoviePlayerControl(this);
            }
            else
            {
                moviePlayer = new WindowsMediaPlayerControl();
            }
            this.Controls.Add(this.moviePlayer.MovieControl);
            this.ResumeLayout(false);

            // ウィンドウドラッグ用
            moviePlayer.MouseDownEvent += (sender, e) =>
            {
                // クリック開始位置を保持
                ClickPoint = new Point(e.fX, e.fY);
            };
        }
        protected override void Awake()
        {
            base.Awake();

            this.AssertRequiredObjects(movieImage, fadeImage);
            moviePlayer = Engine.GetService <IMoviePlayer>();
        }
Exemple #4
0
 public PauseCommand(IMoviePlayer player)
 {
     Player = player;
 }
Exemple #5
0
 public void setPlayer(IMoviePlayer player)
 {
     command.setPlayer(player);
 }
Exemple #6
0
		//-------------------------------------------------------------
		// 概要:コンストラクタ
		// 詳細:コントロールの初期化
		//-------------------------------------------------------------
		public PecaPlayerControl()
		{
			Logger.Instance.Debug("PecaPlayer()");
			InitializeComponent();

			// チャンネル情報更新スレッド:キャンセル許可
			updateChannelInfoWorker.WorkerSupportsCancellation = true;

			this.SuspendLayout();
			string[] commandLineArgs = Environment.GetCommandLineArgs();
			if (commandLineArgs.Length > 2 && commandLineArgs[2] == "FLV")
			{
				moviePlayer = new FlashMoviePlayerControl();
			}
			else
			{
				moviePlayer = new WindowsMediaPlayerControl();
			}
			this.Controls.Add(this.moviePlayer.MovieControl);
			this.ResumeLayout(false);

			// ウィンドウドラッグ用
			moviePlayer.MouseDownEvent += (sender, e) =>
			{
				// クリック開始位置を保持
				ClickPoint = new Point(e.fX, e.fY);
			};
		}
Exemple #7
0
 public PauzeCommand()
 {
     player = new SamsungMoviePlayer();
 }
Exemple #8
0
 public void setPlayer(IMoviePlayer player)
 {
     this.player = player;
 }
Exemple #9
0
 public PlayCommand(IMoviePlayer player)
 {
     Player = player;
 }