예제 #1
1
        /// <summary> 
        /// Required method for Designer support - do not modify 
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FlashView));
            this.flashMovie = new AxShockwaveFlashObjects.AxShockwaveFlash();
            ((System.ComponentModel.ISupportInitialize)(this.flashMovie)).BeginInit();
            this.SuspendLayout();
            // 
            // flashMovie
            // 
            this.flashMovie.Dock = System.Windows.Forms.DockStyle.Fill;
            this.flashMovie.Enabled = true;
            this.flashMovie.Location = new System.Drawing.Point(0, 0);
            this.flashMovie.Name = "flashMovie";
            this.flashMovie.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("flashMovie.OcxState")));
            this.flashMovie.Size = new System.Drawing.Size(571, 367);
            this.flashMovie.TabIndex = 0;
            // 
            // FlashView
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.flashMovie);
            this.Name = "FlashView";
            this.Load += new EventHandler(this.FlashViewLoad);
            this.Size = new System.Drawing.Size(571, 367);
            ((System.ComponentModel.ISupportInitialize)(this.flashMovie)).EndInit();
            this.ResumeLayout(false);

        }
예제 #2
1
        //�ΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡΡι��캯��
        public FlashViewer(string stPath)
            : base("", 0, 0)
        {
            m_stPath = stPath;
            try
            {
                m_obPlayer = new AxShockwaveFlash();
                ((ISupportInitialize)m_obPlayer).BeginInit();
                m_obPlayer.Parent = this;
                m_obPlayer.Dock = DockStyle.Fill;
                ((ISupportInitialize)m_obPlayer).EndInit();
                m_obPlayer.SAlign = FlashParameters.Align_topLeft;
                m_obPlayer.ScaleMode = FlashParameters.Scale_noScale;
                m_obPlayer.BackgroundColor = 0xefefef;

                this.Load += new EventHandler(FlashViewer_Load);
            }
            catch (Exception ex)
            {
                ListMessageBox.Show(ex.ToString());
            }
        }
        public ShockwaveFlashControl(string uri) : base()
        {
            shockwaveFlashObject = new AxShockwaveFlashObjects.AxShockwaveFlash();
            shockwaveFlashObject.FSCommand += ShockwaveFlashControl_FSCommand;
            InitializeComponent();

            shockwaveFlashHost.Child = shockwaveFlashObject;
            sourceUri = uri;
        }
예제 #4
0
 public void Init(string login, string password, string version,
                  string version2, AxShockwaveFlash flashPlayer)
 {
     Login = login;
     Password = password;
     Version = version;
     Version2 = version2;
     FlashPlayer = flashPlayer;
 }
예제 #5
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.flash = ((AxShockwaveFlashObjects.AxShockwaveFlash)(target));
         return;
     }
     this._contentLoaded = true;
 }
예제 #6
0
		private void DisplaySwf(string path)
		{
			DockContent content = MainForm.CurDocument;
			ScintillaControl sci = MainForm.CurSciControl;
			
			if (content.Controls.Count == 1)
			{
				AxShockwaveFlash flash = new AxShockwaveFlash();
				flash.FSCommand += new _IShockwaveFlashEvents_FSCommandEventHandler(flash_FSCommand);
				flash.Dock = DockStyle.Fill;
				sci.Visible = false;
				sci.IsReadOnly = true;
				sci.Enabled = false;
				content.Controls.Add(flash);
				flash.LoadMovie(0,path);
			}
		}
예제 #7
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:

            #line 11 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.LoadFile1);

            #line default
            #line hidden
                return;

            case 3:

            #line 12 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.LoadFile2);

            #line default
            #line hidden
                return;

            case 4:

            #line 13 "..\..\MainWindow.xaml"
                ((System.Windows.Forms.Integration.WindowsFormsHost)(target)).ChildChanged += new System.EventHandler <System.Windows.Forms.Integration.ChildChangedEventArgs>(this.WindowsFormsHost_ChildChanged);

            #line default
            #line hidden
                return;

            case 5:
                this.flashShow = ((AxShockwaveFlashObjects.AxShockwaveFlash)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #8
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\..\MyWindow.xaml"
                ((Form.MyWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);

            #line default
            #line hidden
                return;

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

            case 3:
                this.axFlash = ((AxShockwaveFlashObjects.AxShockwaveFlash)(target));
                return;
            }
            this._contentLoaded = true;
        }
예제 #9
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     
     #line 8 "..\..\MyWindow.xaml"
     ((Surface.MyWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);
     
     #line default
     #line hidden
     return;
     case 2:
     this.wfh = ((System.Windows.Forms.Integration.WindowsFormsHost)(target));
     return;
     case 3:
     this.axFlash = ((AxShockwaveFlashObjects.AxShockwaveFlash)(target));
     return;
     }
     this._contentLoaded = true;
 }
예제 #10
0
		public FlashNativeWindow(AxShockwaveFlash parent)
		{
			flash = parent;
			AssignHandle(parent.Handle);
		}
예제 #11
0
 public GameClient(string login, string password, string version, 
                   string version2, AxShockwaveFlash flashPlayer)
     : this()
 {
     Init(login, password, version, version2, flashPlayer);
 }
예제 #12
0
        // Stuff here taken from WPF tutorial
        // https://msdn.microsoft.com/en-us/library/ms751761%28v=vs.110%29.aspx
        private void RunExpKai_Loaded(object sender, RoutedEventArgs e)
        {
            // Create the interop host control.
            System.Windows.Forms.Integration.WindowsFormsHost host = new System.Windows.Forms.Integration.WindowsFormsHost();

            // Create Shockwave Flash control.
            AxShockwaveFlash flash = new AxShockwaveFlash();

            // Assign the shockwave flash control as the host control's child.
            host.Child = flash;

            // Add the interop host control to the Grid
            // control's collection of child controls.
            this.grid_winformshost.Children.Add(host);

            string swf_path = System.IO.Directory.GetCurrentDirectory() + "\\api_port.swf";
            flash.Location = new System.Drawing.Point(0, 0);
            flash.LoadMovie(0, swf_path);
            flash.AllowScriptAccess = "always";

            this.flashproxy = new ExternalInterfaceProxy(flash);

            //string msg = this.flashproxy.Call("api_mission", null).ToString();
        }
		private void outputLog(AxShockwaveFlash flash, string message)
		{
			Logger.Instance.Debug("[FLASH] - " + message);
		}
예제 #14
0
		public FlashMoviePlayerManager(AxShockwaveFlash flash)
		{
			this.flash = flash;

			flash.FlashCall += ExternalCall;
		}
예제 #15
0
파일: TurnTable.cs 프로젝트: Inumedia/TTIRC
 private void InitializeComponent()
 {
     System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(TurnTable));
     this.flash = new AxShockwaveFlashObjects.AxShockwaveFlash();
     ((System.ComponentModel.ISupportInitialize)(this.flash)).BeginInit();
     this.SuspendLayout();
     //
     // flash
     //
     this.flash.Enabled = true;
     this.flash.Location = new System.Drawing.Point(30, 12);
     this.flash.Name = "flash";
     this.flash.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("flash.OcxState")));
     this.flash.Size = new System.Drawing.Size(240, 240);
     this.flash.TabIndex = 0;
     //
     // TurnTable
     //
     this.ClientSize = new System.Drawing.Size(282, 255);
     this.Controls.Add(this.flash);
     this.Name = "TurnTable";
     ((System.ComponentModel.ISupportInitialize)(this.flash)).EndInit();
     this.ResumeLayout(false);
 }
예제 #16
0
        private void setupView()
        {
            DataEvent de = new DataEvent(EventType.Command, "AS3Context.StartDebugger",null);
            EventManager.DispatchEvent(this, de);

            this.flashMovie = new AxShockwaveFlashObjects.AxShockwaveFlash();
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PluginUI));

            ((System.ComponentModel.ISupportInitialize)(this.flashMovie)).BeginInit();

            this.flashMovie.Enabled = true;
            this.flashMovie.Location = new System.Drawing.Point(0, 0);
            this.flashMovie.Name = "flashMovie";
            this.flashMovie.OcxState = ((System.Windows.Forms.AxHost.State)(resources.GetObject("flashMovie.OcxState")));
            this.flashMovie.FSCommand += this.FlashMovieFSCommand;
            this.flashMovie.FlashCall += this.FlashMovieFlashCall;

            this.flashMovie.Resize += new EventHandler(flashMovie_Resize);

            this.panel.Controls.Add(this.flashMovie);

            ((System.ComponentModel.ISupportInitialize)(this.flashMovie)).EndInit();

            SetDisplayState(settingObject.DisplayState);
        }
예제 #17
0
 private void InitFlashMovie(AxShockwaveFlash flashObj, byte[] swfFile)
 {
     using (MemoryStream stm = new MemoryStream())
     {
         using (BinaryWriter writer = new BinaryWriter(stm))
         {
             /* Write length of stream for AxHost.State */
             writer.Write(8 + swfFile.Length);
             /* Write Flash magic 'fUfU' */
             writer.Write(0x55665566);
             /* Length of swf file */
             writer.Write(swfFile.Length);
             writer.Write(swfFile);
             stm.Seek(0, SeekOrigin.Begin);
             /* 1 == IPeristStreamInit */
             flashObj.OcxState = new AxHost.State(stm, 1, false, null);
         }
     }
 }
예제 #18
0
 public HTTPSimpleStreamInterface(AxShockwaveFlash movie)
 {
     flash = movie;
     proxy = new ExternalInterfaceProxy(flash);
     proxy.ExternalInterfaceCall += new ExternalInterfaceCallEventHandler(proxy_ExternalInterfaceCall);
 }
예제 #19
0
		private void PopupSwf(string path,int width,int height)
		{
			PopupViewer viewer = new PopupViewer();
			viewer.Text = Path.GetFileName(path) + " - Player";
			viewer.Icon = playerIcon;
			viewer.ClientSize = new Size(width,height);
			viewer.Location = MainForm.CommandBarManager.Parent.Location;
			viewer.Left += 6 + 15;
			viewer.Top += 111 + 15;

			AxShockwaveFlash flash = new AxShockwaveFlash();
			flash.FSCommand += new _IShockwaveFlashEvents_FSCommandEventHandler(flash_FSCommand);
			flash.Dock = DockStyle.Fill;
			
			viewer.Controls.Add(flash);
			viewer.Show();

			flash.LoadMovie(0,path);
		}
 /// <summary>
 /// Creates a new ExternalInterfaceProxy for the specified Shockwave Flash ActiveX control.
 /// </summary>
 /// <param name="flashControl">The Shockwave Flash ActiveX control with whom communication
 /// is managed by this proxy.</param>
 public ExternalInterfaceProxy(AxShockwaveFlash flashControl)
 {
     _flashControl = flashControl;
     _flashControl.FlashCall += new _IShockwaveFlashEvents_FlashCallEventHandler(_flashControl_FlashCall);
 }
 public AxShockwaveFlashEventMulticaster(AxShockwaveFlash parent)
 {
     this.parent = parent;
 }
예제 #22
0
        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();
            Border formHost = (Border)this.GetTemplateChild("PART_FormsHost");
            WindowsFormsHost host = (WindowsFormsHost)this.GetTemplateChild("PART_Host");
            try
            {
                //create new flash instance
                axShockwaveFlash = new AxShockwaveFlash();
                axShockwaveFlash.OnReadyStateChange += OnFlashReadyStateChange;
                axShockwaveFlash.FlashCall += OnFlashCall;
                host.Child = axShockwaveFlash;

                axShockwaveFlash.SetVariable("quality", "High");
                axShockwaveFlash.ScaleMode = 0;
                axShockwaveFlash.BackgroundColor = 000000;
                axShockwaveFlash.Name = "FlashHost";
                axShockwaveFlash.AllowScriptAccess = "always";
                axShockwaveFlash.AllowNetworking = "all";
                axShockwaveFlash.AllowFullScreen = "true";
                axShockwaveFlash.Movie = this.Source;
                axShockwaveFlash.Play();
            }
            catch
            {
                formHost.Child = new TextBlock()
                {
                    Text = "Error",
                    VerticalAlignment = VerticalAlignment.Center,
                    HorizontalAlignment = HorizontalAlignment.Center
                };
            }
        }
 public AxShockwaveFlashEventMulticaster(AxShockwaveFlash parent) {
     this.parent = parent;
 }
예제 #24
0
 public void unloadMovie()
 {
     fileNameLabel.Text = "";
     file = "";
     if (flashMovie != null)
     {
         IsSWFPlaying = false;
         flashMovie.Dispose();
         flashMovie = null;
     }
 }