/// <summary> /// Starts animation /// </summary> /// <param name="collection">Collection of components</param> /// <param name="reasons">Reasons</param> /// <param name="animationType">Type of animation</param> /// <param name="pause">Pause</param> /// <param name="timeScale">Time scale</param> /// <param name="realTime">The "real time" sign</param> /// <param name="absoluteTime">The "absolute time" sign</param> /// <returns>Animation asynchronous calculation</returns> public static IAsynchronousCalculation StartAnimation(this IComponentCollection collection, string[] reasons, global::Animation.Interfaces.Enums.AnimationType animationType, TimeSpan pause, double timeScale, bool realTime, bool absoluteTime) { currentCalculation = global::Animation.Interfaces.StaticExtensionAnimationInterfaces.StartAnimation (collection, reasons, animationType, pause, timeScale, realTime, absoluteTime) as IAsynchronousCalculation; return(currentCalculation); }
/// <summary> /// Load operation /// </summary> /// <param name="info">Serialization info</param> /// <param name="context">Streaming context</param> protected override void Load(SerializationInfo info, StreamingContext context) { base.Load(info, context); try { if (type == null) { type = typeof(DataPerformer.DataConsumer); } cBuf = info.GetValue("Colors", typeof(Dictionary <string, Color>)) as Dictionary <string, Color>; string argument = info.GetValue("Argument", typeof(string)) as string; string condition = info.GetValue("Condition", typeof(string)) as string; textsBuf = info.GetValue("Texts", typeof(Dictionary <string, string>)) as Dictionary <string, string>; string start = info.GetValue("Start", typeof(string)) as string; string step = info.GetValue("Step", typeof(string)) as string; string stepCount = info.GetValue("StepCount", typeof(string)) as string; int dist = info.GetInt32("Split"); stepChartBuf = info.GetValue("StepChart", typeof(Dictionary <string, bool>)) as Dictionary <string, bool>; string points = info.GetString("Points"); int pause = info.GetInt32("Pause"); string[] s = data.Item4; s[0] = condition; s[1] = argument; s[2] = start; s[3] = step; s[4] = stepCount; s[5] = points; int[] n = data.Item5; n[0] = pause; n[1] = dist; timeType = (TimeType)info.GetValue("TimeType", typeof(TimeType)); absoluteTime = info.GetBoolean("AbsoluteTime"); rtime = info.GetValue("Realtime", typeof(Tuple <double[], Dictionary <string, Dictionary <string, Tuple <Color, bool, double[]> > > >)) as Tuple <double[], Dictionary <string, Dictionary <string, Tuple <Color, bool, double[]> > > >; animationType = (Animation.Interfaces.Enums.AnimationType)info.GetValue("AnimationType", typeof(Animation.Interfaces.Enums.AnimationType)); timeScaleAnimation = info.GetDouble("TimeScaleAnimation"); timeUnitAnimation = (TimeType)info.GetValue("TimeUnitAnimation", typeof(TimeType)); sizes = info.GetValue("IndicatorSizes", typeof(Dictionary <string, Size>)) as Dictionary <string, Size>; cadrNumber = info.GetInt32("CadrNumber"); } catch (Exception ex) { ex.ShowError(10); } }