Exemplo n.º 1
0
        private MainLogic mainLogic; // объект, реализующий логику сервера

        #endregion Fields

        #region Constructors

        public SvcMain()
        {
            InitializeComponent();

            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            mainLogic = new MainLogic();
            appLog = mainLogic.AppLog;
        }
Exemplo n.º 2
0
        private Log appLog;          // журнал приложения

        public SvcMain()
        {
            InitializeComponent();

            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            mainLogic = new MainLogic();
            appLog    = mainLogic.AppLog;
        }
Exemplo n.º 3
0
        public SvcMain()
        {
            InitializeComponent();

            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
            mainLogic   = new MainLogic();
            appLog      = mainLogic.AppLog;
            checkThread = new Thread(new ThreadStart(CheckStopFile));
        }
Exemplo n.º 4
0
        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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 6
0
Arquivo: Comm.cs Projeto: 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>();
        }
Exemplo n.º 7
0
        private Log appLog;          // журнал приложения


        /// <summary>
        /// Конструктор
        /// </summary>
        public Manager()
        {
            mainLogic = new MainLogic();
            appLog    = mainLogic.AppLog;
            AppDomain.CurrentDomain.UnhandledException += OnUnhandledException;
        }
Exemplo n.º 8
0
        private Log appLog;          // журнал приложения


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