using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Xml.Serialization;

namespace Nappat.Testing
{
    [Serializable]
    public class DataSender
    {
        #region LogChanged
        public delegate void LogEventHandler();
        public event LogEventHandler LogChanged;
        public void OnLogChanged()
        {
            if (LogChanged != null)
                LogChanged();
        }
        #endregion

        #region Private Filds
        private LogLine logMessages;
        private int programChooser;
        private long testTime;
        private string driverPaths;
        private string csFilePaths;
        private string configPaths;
        private string scriptPaths;
        private string testNames;
        private string deviceNames;
        private string outBoardNames;
        private string inBoardNames;
        private string channelNames;
        private string outputPaths;
        #endregion

        #region Constroctors
        public DataSender()
        {
            logMessages = null;
            this.programChooser = 0;
            this.testTime = 0;
            this.driverPaths = null;
            this.csFilePaths = null;
            this.configPaths = null;
            this.scriptPaths = null;
            this.testNames = null;
            this.deviceNames = null;
            this.outBoardNames = null;
            this.inBoardNames = null;
            this.channelNames = null;
            this.outputPaths = null;

            //this.DriverPaths = "olomouc";
            //this.CsFilePaths = @"D:\Grebitch\Documents\Škola\VŠ\1-BBCT\Programy\HelpCsCode\HelpCsCode\HelpCode.cs";
            //this.ConfigPaths = @"D:\Grebitch\Documents\Škola\VŠ\1-BBCT\Programy\Nappat\Files\Skripty\SV2ConfigNewScript.xml";
            //this.ScriptPaths = @"D:\Grebitch\Documents\Škola\VŠ\1-BBCT\Programy\Nappat\Files\Skripty\DSTATE1.SCRt";
            //this.TestNames = "TestJo";
            //this.DeviceNames = "SV2";
            //this.OutBoardNames = "optoOut";
            //this.InBoardNames = "optoIn";
            //this.ChannelNames = "optoIn";
            //this.OutputPaths = @"D:\Grebitch\Documents\Škola\VŠ\1-BBCT\Programy\Nappat\Files\Out";
        }
        #endregion

        #region Public Properties
        [XmlIgnore]
        public LogLine LogMessages
        {
            get { return logMessages; }
            set
            {
                logMessages = value;
                OnLogChanged();
            }
        }
        [XmlIgnore]
        public int ProgramChooser
        {
            get { return programChooser; }
            set { programChooser = value; }
        }
        [XmlIgnore]
        public long TestTime
        {
            get { return testTime; }
            set { testTime = value; }
        }
        public string DriverPaths
        {
            get { return driverPaths; }
            set
            {
                driverPaths = value;
            }
        }
        public string CsFilePaths
        {
            get { return csFilePaths; }
            set { csFilePaths = value; }
        }
        public string ConfigPaths
        {
            get { return configPaths; }
            set { configPaths = value; }
        }
        public string ScriptPaths
        {
            get { return scriptPaths; }
            set { scriptPaths = value; }
        }
        public string TestNames
        {
            get { return testNames; }
            set
            {
                testNames = value;
            }
        }
        public string DeviceNames
        {
            get { return deviceNames; }
            set { deviceNames = value; }
        }
        public string OutBoardNames
        {
            get { return outBoardNames; }
            set { outBoardNames = value; }
        }
        public string InBoardNames
        {
            get { return inBoardNames; }
            set { inBoardNames = value; }
        }
        public string ChannelNames
        {
            get { return channelNames; }
            set { channelNames = value; }
        }
        public string OutputPaths
        {
            get { return outputPaths; }
            set { outputPaths = value; }
        }
        #endregion
    }
}
