示例#1
0
 /// HandleFlowEvent is the callback method that is specified
 /// to handle flow session events. Flow events are things like:
 ///     Assured message flow to Solace is UP
 ///     Assured message flow to Solace is DOWN
 ///     DTE is invalid on Solace Appliance
 ///   Note: This code is executed within the API thread and
 ///   should deal with the event quickly or queue the event for
 ///   further processing in another thread.
 public static void HandleFlowEvent(Object sender, FlowEventArgs args)
 {
     Console.WriteLine(string.Format("Flow Event Received: '{0}' Type: '{1}' Text: '{2}'",
                                     args.Event,
                                     args.ResponseCode.ToString(),
                                     args.Info));
 }
示例#2
0
        public void In(FlowEventArgs e)
        {
#if DEBUG
#else
            System.Console.Clear();
#endif
        }
示例#3
0
        public override void In(FlowEventArgs e)
        {
            SetValue(nameof(Path));
            SetValue(nameof(VertexBuffer));

            if (resourceManager != null && VertexBuffer != null)
            {
                SetValue(nameof(PrimitiveType));
                SetValue(nameof(PrimitiveCount));
                SetValue(nameof(StartIndex));
                SetValue(nameof(VertexCount));
                Object = (PolygonObject)resourceManager.GetResource(Path, PPDCoreModel.Data.ResourceKind.Polygon, new Dictionary <string, object>
                {
                    { "Vertex", VertexBuffer },
                    { "PrimitiveType", PrimitiveType },
                    { "PrimitiveCount", PrimitiveCount },
                    { "StartIndex", StartIndex },
                    { "VertexCount", VertexCount },
                });
                OnSuccess();
            }
            else
            {
                OnFailed();
            }
        }
示例#4
0
        public override void In(FlowEventArgs e)
        {
            SetValue(nameof(Height));
            SetValue(nameof(Position));
            SetValue(nameof(Text));
            SetValue(nameof(Color));

            if (Text == null)
            {
                Text = "";
            }

            if (resourceManager != null)
            {
                Object = new TextureString(resourceManager.Device, Text, Height, Color)
                {
                    Position = Position
                };
                OnSuccess();
            }
            else
            {
                OnFailed();
            }
        }
示例#5
0
 void ForFlowSourceObject_LoopEndInternal(FlowEventArgs e)
 {
     if (e.IsBreakUsed)
     {
         BreakLoop();
     }
 }
示例#6
0
 public override void In(FlowEventArgs e)
 {
     SetArrayList();
     if (ArrayList != null)
     {
         ArrayList.Clear();
     }
 }
 public void HandleFlowEvent(object sender, FlowEventArgs args)
 {
     // Received a flow event
     Console.WriteLine("Received Flow Event '{0}' Type: '{1}' Text: '{2}'",
                       args.Event,
                       args.ResponseCode.ToString(),
                       args.Info);
 }
示例#8
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Weight));
     Filter = new MiddleGrayScaleColorFilter
     {
         Weight = Weight
     };
     OnSuccess();
 }
示例#9
0
 public void In(FlowEventArgs e)
 {
     SetValue(nameof(ValueName));
     SetValue(nameof(Value));
     if (ValueName != null)
     {
         ContextScope.SetValue(ValueName, Value);
     }
 }
示例#10
0
 public void In(FlowEventArgs e)
 {
     SetValue(nameof(Condition));
     if (Condition)
     {
         FireEvent(Loop, true);
         FireEvent(LoopEnd, true, true);
     }
 }
示例#11
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Disperson));
     Filter = new GaussianFilter
     {
         Disperson = Disperson
     };
     OnSuccess();
 }
示例#12
0
 public void In(FlowEventArgs e)
 {
     SetValue(nameof(Key));
     SetValue(nameof(Value));
     if (scoreStorage != null)
     {
         scoreStorage[Key] = Value;
     }
 }
示例#13
0
 public override void In(FlowEventArgs e)
 {
     SetArrayList();
     SetValue(nameof(StartIndex));
     SetValue(nameof(Count));
     if (ArrayList != null)
     {
         ArrayList.Reverse(StartIndex, Count);
     }
 }
示例#14
0
 public void In(FlowEventArgs e)
 {
     FireEvent(Out0, true);
     FireEvent(Out1, true);
     FireEvent(Out2, true);
     FireEvent(Out3, true);
     FireEvent(Out4, true);
     FireEvent(Out5, true);
     FireEvent(Out6, true);
 }
        void CalculateMarkPosFlowSourceObjectBase_OutEnd(FlowEventArgs e)
        {
            SetValue(nameof(Handled));
            if (Handled)
            {
                SetValue(nameof(ColorPosition));
            }

            EvaluateHandled   = Handled;
            CalculatePosition = ColorPosition;
        }
示例#16
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Weight));
     SetValue(nameof(Color));
     Filter = new PPDFramework.Shaders.ColorFilter
     {
         Weight = Weight,
         Color  = Color
     };
     OnSuccess();
 }
示例#17
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Object));
     SetValue(nameof(Count));
     Value = new List <object>(Count);
     for (int i = 0; i < Count; i++)
     {
         Value.Add(Object);
     }
     OnSuccess();
 }
示例#18
0
        public void In(FlowEventArgs e)
        {
            if (triggers.Count == 0)
            {
                return;
            }

            var triggerIndex = RandomUtility.Rand.Next(triggers.Count);

            FireEvent(triggers[triggerIndex]);
        }
        void ProcessMarkBPMFlowSourceObjectBase_OutEnd(FlowEventArgs e)
        {
            SetValue(nameof(Handled));
            if (Handled)
            {
                SetValue(nameof(BPM));
            }

            EvaluateHandled = Handled;
            ProcessBPM      = BPM;
        }
示例#20
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Weight));
     SetValue(nameof(Rotation));
     Filter = new HueColorFilter
     {
         Weight   = Weight,
         Rotation = Rotation
     };
     OnSuccess();
 }
        void ProcessMissPressFlowSourceObjectBase_OutEnd(FlowEventArgs e)
        {
            SetValue(nameof(Handled));
            if (Handled)
            {
                SetValue(nameof(IsMissPress));
            }

            EvaluateHandled  = Handled;
            ProcessMissPress = IsMissPress;
        }
示例#22
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Weight));
     SetValue(nameof(GammaCorrection));
     Filter = new HDTVGrayScaleColorFilter
     {
         Weight          = Weight,
         GammaCorrection = GammaCorrection
     };
     OnSuccess();
 }
示例#23
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Weight));
     SetValue(nameof(Scale));
     Filter = new SaturationColorFilter
     {
         Weight = Weight,
         Scale  = Scale
     };
     OnSuccess();
 }
        private void ProcessAllowedButtonsFlowSourceObjectBase_OutEnd(FlowEventArgs e)
        {
            SetValue(nameof(Handled));
            if (Handled)
            {
                SetValue(nameof(AllowedButtons));
            }

            EvaluateHandled       = Handled;
            ProcessAllowedButtons = AllowedButtons?.Where(b => b != null && b is PPDCoreModel.Data.MarkType).Cast <ButtonType>().ToArray();
        }
示例#25
0
 private void FlowEventHandler(object source, FlowEventArgs e)
 {
     if (e.Event == FlowEvent.ParentSessionDown)
     {
         log.Error("The flow has reported that the Session is down. Everything must die");
         this.OnMessageReceiveError(new SessionDisconnectedException(e.Info), "The flow has reported that the Session is down. Everything must die.");
     }
     else
     {
         log.Debug($"Flow Event handler - source: {source},Event={e.Event}, Info=\"{e.Info}\", ResponseCode={e.ResponseCode}, Properties={e.EventProperties}");
     }
 }
示例#26
0
 public override void In(FlowEventArgs e)
 {
     if (resourceManager != null)
     {
         Object = new SpriteObject(resourceManager.Device);
         OnSuccess();
     }
     else
     {
         OnFailed();
     }
 }
示例#27
0
 public void In(FlowEventArgs e)
 {
     SetValue(nameof(Condition));
     if (Condition)
     {
         FireEvent(OnTrue);
     }
     else
     {
         FireEvent(OnFalse);
     }
 }
 public override void In(FlowEventArgs e)
 {
     if (inputManager != null)
     {
         inputManager.ForceEnable();
         OnSuccess();
     }
     else
     {
         OnFailed();
     }
 }
示例#29
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Object));
     if (Object != null)
     {
         Object.ClearChildren();
         OnSuccess();
     }
     else
     {
         OnFailed();
     }
 }
示例#30
0
 public override void In(FlowEventArgs e)
 {
     SetValue(nameof(Child));
     if (Child != null && Child.Parent != null)
     {
         Child.Parent.RemoveChild(Child);
         OnSuccess();
     }
     else
     {
         OnFailed();
     }
 }