コード例 #1
0
        public void LoadFile(string FlieDirectory)
        {
            this.CloseInterfaces();
            this.InitInterfaces();
            int width = 0, height = 0;

            try
            {
                Filgraph.RenderFile(FlieDirectory);

                VideoWindow.Owner = (int)plVideo.Handle;

                width  = VideoWindow.Width;
                height = VideoWindow.Height + 51;
            }
            catch (Exception e) // Bat duoc moi loai loi~. gia tri tra ve chi chung chung.
            {
                Filgraph.RenderFile(FlieDirectory);
            }
            finally
            {
                lbName.Text = ListFile[IDC].FileName;

                mFlag = MediaFlags.Stopped;

                Screen Desktop = Screen.PrimaryScreen;


                if (width > Desktop.WorkingArea.Width)
                {
                    width = Desktop.WorkingArea.Width;
                }

                if (height > Desktop.WorkingArea.Height)
                {
                    height = Desktop.WorkingArea.Height;
                }

                mForm.Top  = (Desktop.WorkingArea.Height - height) / 2;
                mForm.Left = (Desktop.WorkingArea.Width - width) / 2;

                mForm.Width  = width;
                mForm.Height = height;

                this.Update2Form();
            }
        }
コード例 #2
0
 public bool LoadFile(string sfile, Panel parentHandler)
 {
     graphManager.RenderFile(sfile);
     mControl            = graphManager;
     mPosition           = graphManager;
     mWindow             = graphManager;
     mWindow.Owner       = parentHandler.Handle.ToInt32();
     mWindow.WindowStyle = WS_CHILD;
     mWindow.SetWindowPosition(parentHandler.ClientRectangle.Left,
                               parentHandler.ClientRectangle.Top,
                               parentHandler.ClientRectangle.Width,
                               parentHandler.ClientRectangle.Height);
     graphManager.Run();
     return(true);
 }
コード例 #3
0
ファイル: main.cs プロジェクト: Ryuzaki/RVTN
 public static void Main(string[] args)
 {
     FilgraphManagerClass graphClass = null;
     try
     {
         graphClass = new FilgraphManagerClass();
         graphClass.RenderFile(@"C:\Users\Ryuzaki\Desktop\AviTokaiNoHitorigurashi.avi");
         graphClass.Run();
         int evCode;
         graphClass.WaitForCompletion(-1, out evCode);
     }
     catch (Exception) { }
     finally
     {
         graphClass = null;
     }
 }