예제 #1
0
파일: SvcMain.cs 프로젝트: iyus/scada
        private MainLogic mainLogic; // объект, реализующий логику сервера

        #endregion Fields

        #region Constructors

        public SvcMain()
        {
            InitializeComponent();

            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            mainLogic = new MainLogic();
            appLog = mainLogic.AppLog;
        }
예제 #2
0
파일: SvcMain.cs 프로젝트: southasia/scada
        private Log appLog;          // журнал приложения

        public SvcMain()
        {
            InitializeComponent();

            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            mainLogic = new MainLogic();
            appLog    = mainLogic.AppLog;
        }
예제 #3
0
        public SvcMain()
        {
            InitializeComponent();

            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            mainLogic   = new MainLogic();
            appLog      = mainLogic.AppLog;
            checkThread = new Thread(new ThreadStart(CheckStopFile));
        }
예제 #4
0
파일: Calculator.cs 프로젝트: iyus/scada
        private MainLogic mainLogic; // ссылка на объект основной логики приложения

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Конструктор
        /// </summary>
        public Calculator(MainLogic mainLogic)
        {
            if (mainLogic == null)
                throw new ArgumentNullException("mainLogic");
            if (mainLogic.AppLog == null)
                throw new ArgumentNullException("mainLogic.AppLog");

            this.mainLogic = mainLogic;
            appLog = mainLogic.AppLog;
            exprList = new List<string>();
            calcEngine = null;
        }
예제 #5
0
        /// <summary>
        /// Конструктор
        /// </summary>
        public Calculator(MainLogic mainLogic)
        {
            if (mainLogic == null)
            {
                throw new ArgumentNullException("mainLogic");
            }
            if (mainLogic.AppLog == null)
            {
                throw new ArgumentNullException("mainLogic.AppLog");
            }

            this.mainLogic = mainLogic;
            appLog         = mainLogic.AppLog;
            exprList       = new List <string>();
            calcEngine     = null;
        }
예제 #6
0
파일: Comm.cs 프로젝트: iyus/scada
        private Thread thread; // поток взаимодействия с клиентами

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Конструктор
        /// </summary>
        public Comm(MainLogic mainLogic)
        {
            if (mainLogic == null)
                throw new ArgumentNullException("mainLogic");
            if (mainLogic.AppLog == null)
                throw new ArgumentNullException("mainLogic.AppLog");
            if (mainLogic.Settings == null)
                throw new ArgumentNullException("mainLogic.Settings");

            // заполнение массива описаний команд
            CmdDescrs = new string[byte.MaxValue];
            for (byte code = 0; code < byte.MaxValue; code++)
                CmdDescrs[code] = GetCmdDescr(code);

            // инициализация полей
            this.mainLogic = mainLogic;
            appLog = mainLogic.AppLog;
            settings = mainLogic.Settings;
            thread = null;
            terminated = false;
            tcpListener = null;
            clients = new List<ClientInfo>();
            inBuf = new byte[InBufLenght];
            outBuf = new byte[OutBufLenght];
            cmdBuf = new List<ModLogic.Command>();
        }
예제 #7
0
        private Log appLog;          // журнал приложения


        /// <summary>
        /// Конструктор
        /// </summary>
        public Manager()
        {
            mainLogic = new MainLogic();
            appLog    = mainLogic.AppLog;
            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
        }
예제 #8
0
파일: Manager.cs 프로젝트: raydtang/scada
        private Log appLog;          // журнал приложения


        /// <summary>
        /// Конструктор
        /// </summary>
        public Manager()
        {
            mainLogic = new MainLogic();
            appLog = mainLogic.AppLog;
            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
        }