示例#1
0
 private void Init()
 {
     #region 初始化
     this.AXWMP_VPlayer = new AxWMPLib.AxWindowsMediaPlayer();
     ((System.ComponentModel.ISupportInitialize)(this.AXWMP_VPlayer)).BeginInit();
     this.AXWMP_VPlayer.Dock    = System.Windows.Forms.DockStyle.Fill;
     this.AXWMP_VPlayer.Enabled = true;
     this.AXWMP_VPlayer.Name    = "AXWMP_VPlayer";
     //this.AXWMP_VPlayer.uiMode = "none";
     // this.AXWMP_VPlayer.settings.autoStart = true;
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(WMPControlLibrary.WMPControl));
     this.AXWMP_VPlayer.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("axWindowsMediaPlayer1.OcxState")));
     ((System.ComponentModel.ISupportInitialize)(this.AXWMP_VPlayer)).EndInit();
     WFH_Main.Child = AXWMP_VPlayer;
     #endregion
     ChildWindow = new VideoConsole3Part(this);
     //ChildWindow.Owner = this;
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Window = ((VideoPanel.VideoConsole3Part)(target));
                return;

            case 2:
                this.TBK_Tip = ((System.Windows.Controls.TextBlock)(target));
                return;

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

            case 4:
                this.BD_DownConsole = ((System.Windows.Controls.Grid)(target));
                return;

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

            case 6:
                this.BTN_Vup = ((System.Windows.Controls.Button)(target));
                return;

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

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

            case 9:
                this.BTN_Pause = ((System.Windows.Controls.Button)(target));
                return;

            case 10:
                this.BTN_Play = ((System.Windows.Controls.Button)(target));
                return;

            case 11:
                this.BTN_KuaiJin = ((System.Windows.Controls.Button)(target));
                return;

            case 12:
                this.BTN_KuaiTui = ((System.Windows.Controls.Button)(target));
                return;

            case 13:
                this.BTN_GoForward = ((System.Windows.Controls.Button)(target));
                return;

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

            case 15:
                this.UC_ProgressBar = ((VideoPanel.MyProgressBar)(target));
                return;
            }
            this._contentLoaded = true;
        }