예제 #1
0
 /// <summary>
 /// Desktop from file
 /// </summary>
 /// <param name="fileName">File name</param>
 /// <returns>The desktop</returns>
 public static IDesktop DesktopFromFile(this string fileName)
 {
     using (System.IO.Stream stream = System.IO.File.OpenRead(fileName))
     {
         return(stream.DesktopFromStream());
     }
 }
예제 #2
0
        /// <summary>
        /// Creates Scada from stream
        /// </summary>
        /// <param name="stream">Stream</param>
        /// <param name="dataConsumer">Data consumer</param>
        /// <param name="timeType">Time type</param>
        /// <param name="isAbsoluteTime">The "is absolute time" sign</param>
        /// <param name="realtimeStep">Realtime Step</param>
        /// <returns>Scada</returns>
        public static IScadaInterface ScadaFromBytes(this System.IO.Stream stream,
                                                     string dataConsumer, TimeType timeType, bool isAbsoluteTime, IAsynchronousCalculation realtimeStep)
        {
            IDesktop desktop = stream.DesktopFromStream();

            return(desktop.ScadaFromDesktop(dataConsumer, timeType, isAbsoluteTime, realtimeStep));
        }