internal void RaiseOnFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
 {
     if ((this.FlashCall != null))
     {
         this.FlashCall(sender, e);
     }
 }
Beispiel #2
0
        private void FlashMovieFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
        {
            try
            {
                XmlTextReader reader = new XmlTextReader(new StringReader(e.request));
                reader.WhitespaceHandling = WhitespaceHandling.Significant;
                reader.MoveToContent();

                if (reader.Name == "invoke" && reader.GetAttribute("name") == "trace")
                {
                    reader.Read();
                    if (reader.Name == "arguments")
                    {
                        reader.Read();
                        if (reader.Name == "string")
                        {
                            reader.Read();
                            TraceManager.Add(reader.Value, 1);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                ErrorManager.ShowError(ex);
            }
        }
		/// <summary>
		/// Flashから呼び出し
		/// </summary>
		/// <param name="sender"></param>
		/// <param name="e"></param>
		private void ExternalCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
		{
			var doc = new XmlDocument();
			doc.Load(new StringReader(e.request));
			var methodName = doc.SelectSingleNode("invoke").Attributes["name"].Value;
			var nodes = doc.SelectSingleNode("invoke/arguments").ChildNodes;
			var args = new List<string>();
			foreach (XmlElement arg in nodes)
			{
				args.Add(arg.InnerText);
			}

			switch (methodName)
			{
				case "OpenStateChange":
					openStateChange(flash, new EventArgs());
					break;
				case "Initialized":
					initialized(flash, new EventArgs());
					break;
				case "RequestBump":
					requestBump(flash, new EventArgs());
					break;
				case "OutputLog":
					outputLog(flash, args.FirstOrDefault());
					break;
			}
		}
Beispiel #4
0
        private void axShockwaveFlash1_FlashCall(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEvent e)
        {
            XmlDocument DocumentoDatosR = new XmlDocument();

            DocumentoDatosR.LoadXml(e.request);

            XmlAttributeCollection Atributos = DocumentoDatosR.FirstChild.Attributes;
            String comando = Atributos.Item(0).InnerText;

            XmlNodeList lista = DocumentoDatosR.GetElementsByTagName("arguments");

            switch (comando)
            {
            case "operacion":

                DataRow fila = tablaParte.NewRow();
                fila[0] = lista[0].InnerText;
                tablaParte.Rows.Add(fila);
                gridControl1.DataSource = tablaParte;
                break;
            }
        }
 private void SkinsFormPlayer_FlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
 {
     XmlDocument xml = new XmlDocument();
     xml.LoadXml(e.request);
     string name = xml.DocumentElement.Attributes[0].Value;
     XmlNodeList list = xml.GetElementsByTagName("arguments");
     string argus = list[0].InnerText;
     switch (name)
     {
         case "closeForm":
             m_obForm.Close();
             break;
         case "startDrag":
             m_obForm.startDrag();
             break;
         case "setCursor":
             m_obForm.setCursor(int.Parse(argus));
             break;
         case "scaleForm":
             m_obForm.scaleForm(int.Parse(argus));
             break;
         case "initBorder":
             m_obForm.initBorder(int.Parse(argus));
             break;
         case "initTitle":
             m_obForm.initTitle(int.Parse(argus));
             break;
         case "maxForm":
             m_obForm.switchState();
             break;
         case "foldForm":
             m_obForm.foldForm();
             break;
         case "navigate":
             m_obForm.navigate(argus);
             break;
     }
 }
 /// <summary>
 /// Handles the FlashCall event
 /// </summary>
 private void FlashMovieFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
 {
     try
     {
         XmlTextReader reader = new XmlTextReader(new StringReader(e.request));
         reader.WhitespaceHandling = WhitespaceHandling.Significant;
         reader.MoveToContent();
         if (reader.Name == "invoke" && reader.GetAttribute("name") == "trace")
         {
             reader.Read();
             if (reader.Name == "arguments")
             {
                 reader.Read();
                 if (reader.Name == "string")
                 {
                     reader.Read();
                     Int32 state = 1;
                     String message = reader.Value;
                     if (message.Length > 2 && message[1] == ':' && Char.IsDigit(message[0]))
                     {
                         if (int.TryParse(message[0].ToString(), out state))
                         {
                             message = message.Substring(2);
                         }
                     }
                     TraceManager.Add(message, state);
                 }
             }
         }
     }
     catch (Exception ex)
     {
         ErrorManager.ShowError(ex);
     }
 }
        protected override void OnFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
        {
            base.OnFlashCall(sender, e);
            try
            {
                XmlDocument document = new XmlDocument();
                document.LoadXml(e.request);
                XmlAttributeCollection attributes = document.FirstChild.Attributes;
                String command = attributes.Item(0).InnerText;
                XmlNodeList list = document.GetElementsByTagName("arguments");
                List<string> listS = new List<string>();
                foreach (XmlNode l in list)
                {
                    listS.Add(l.InnerText);
                }

                #region SWITCH EVENT
                switch (command)
                {
                    case "onYouTubePlayerReady": OnPlayerReady(0); break;
                    case "StateChangeEvent": OnPlayerStateChanged((PlayerState)int.Parse(listS[0])); break;
                    case "ErrorEvent": OnPlayerError(PlayerError.InvalidParameter); break;
                    case "QualityChangeEvent": OnQualityChangedEvent(); break;
                    case "RateChangeEvent": OnRateChangedEvent(); break;
                    case "APIChangeEvent": OnApiChangedEvent(); break;
                }
                #endregion
            }
            catch
            { }
        }
Beispiel #8
0
 protected virtual void OnFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
 {
 }
        public virtual void FlashCall(string request)
        {
            _IShockwaveFlashEvents_FlashCallEvent flashcallEvent = new _IShockwaveFlashEvents_FlashCallEvent(request);

            this.parent.RaiseOnFlashCall(this.parent, flashcallEvent);
        }
 /// <summary>
 /// Called when Flash Player raises the FlashCallEvent (when an External Interface call
 /// is made by ActionScript)
 /// </summary>
 /// <param name="sender">The object raising the event</param>
 /// <param name="e">The arguments for the event</param>
 private void _flashControl_FlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
 {
     try
     {
         ExternalInterfaceCall functionCall = ExternalInterfaceSerializer.DecodeInvoke(e.request);
         ExternalInterfaceCallEventArgs eventArgs = new ExternalInterfaceCallEventArgs(functionCall);
         object response = OnExternalInterfaceCall(eventArgs);
         _flashControl.SetReturnValue(ExternalInterfaceSerializer.EncodeResult(response));
     }
     catch (Exception ex)
     {
         Logger.DEBUG_TRACE("_flashControl_FlashCall Exception:" + ex.Message + "\n");
     }
 }
 /// <summary>
 /// Called when Flash Player raises the FlashCallEvent (when an External Interface call
 /// is made by ActionScript)
 /// </summary>
 /// <param name="sender">The object raising the event</param>
 /// <param name="e">The arguments for the event</param>
 private void _flashControl_FlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
 {
     ExternalInterfaceCall functionCall = ExternalInterfaceSerializer.DecodeInvoke(e.request);
     ExternalInterfaceCallEventArgs eventArgs = new ExternalInterfaceCallEventArgs(functionCall);
     object response = OnExternalInterfaceCall(eventArgs);
     _flashControl.SetReturnValue(ExternalInterfaceSerializer.EncodeResult(response));
 }
Beispiel #12
0
 private void axFlash_FlashCall(object sender, AxShockwaveFlashObjects._IShockwaveFlashEvents_FlashCallEvent e)
 {
 }
 public FlashCallEventArgs(_IShockwaveFlashEvents_FlashCallEvent e, bool isHandled)
     : base(isHandled)
 {
     Request = e.request;
 }
 public void OnFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent foEvent)
 {
     //Log.Info("OnFlashCall reached with value request:{0},Object:{1}", foEvent.request, sender);
     XmlDocument document = new XmlDocument();
     document.LoadXml(foEvent.request);
       Log.Debug("FLV event {0}", foEvent.request);
     // Get all the arguments
     XmlNodeList list = document.GetElementsByTagName("invoke");
     String lsName = list[0].Attributes["name"].Value;
     list = document.GetElementsByTagName("arguments");
     String lsState = list[0].FirstChild.InnerText;
       GUIMessage msg = new GUIMessage(GUIMessage.MessageType.GUI_MSG_PLAY_ITEM, 0, 0, 0, 0, 0, null);
       if (lsName.Equals("onYouTubePlayerReady"))
     {
     FlvControl.Visible = true;
     Log.Debug("Player is loaded playing id:{0}", VideoId);
     FlvControl.Player.CallFunction("<invoke name=\"loadVideoById\"><arguments><string>" + VideoId + "</string></arguments></invoke>");
       }
 }
 internal void RaiseOnFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e) {
     if ((this.FlashCall != null)) {
         this.FlashCall(sender, e);
     }
 }
 public virtual void FlashCall(string request) {
     _IShockwaveFlashEvents_FlashCallEvent flashcallEvent = new _IShockwaveFlashEvents_FlashCallEvent(request);
     this.parent.RaiseOnFlashCall(this.parent, flashcallEvent);
 }
        private void AxShockwaveFlashOnFlashCall(object sender, _IShockwaveFlashEvents_FlashCallEvent e)
        {
            EventHandler<FlashCallEventArgs> eventHandler = FlashCall;
            if (eventHandler == null)
            {
                return;
            }

            var args = new FlashCallEventArgs(e, false);
            eventHandler(sender, args);

            if (!args.Handled && UnhandledFlashCallback != null)
            {
                UnhandledFlashCallback(e.request);
            }
        }