Esempio n. 1
0
        /// <summary>
        /// Конструктор - основной (без параметров)
        public FormMain() : base()
        {
            InitializeComponent();

            s_plugIns = new HPlugIns(FormMain_EvtDataAskedHost);

            s_fileConnSett = new FIleConnSett(@"connsett.ini", FIleConnSett.MODE.FILE);
            s_listFormConnectionSettings = new List <FormConnectionSettings> ();
            s_listFormConnectionSettings.Add(new FormConnectionSettings(-1, s_fileConnSett.ReadSettingsFile, s_fileConnSett.SaveSettingsFile));

            int idListener = DbSources.Sources().Register(s_listFormConnectionSettings[(int)CONN_SETT_TYPE.MAIN_DB].getConnSett(), false, CONN_SETT_TYPE.MAIN_DB.ToString());

            if (!(idListener < 0))
            {
                try {
                    using (HTepUsers users = new HTepUsers(idListener)) {; }
                } catch (Exception e) {
                    Logging.Logg().Exception(e, @"FormMain::FormMain() - new HTepUsers (iListenerId=" + idListener + @") ...", Logging.INDEX_MESSAGE.NOT_SET);
                }

                ConnectionSettingsSource connSettSource = new ConnectionSettingsSource(idListener);
                s_listFormConnectionSettings.Add(new FormConnectionSettings(idListener, connSettSource.Read, connSettSource.Save));
            }
            else
            {
                ;
            }

            DbSources.Sources().UnRegister(idListener);

            m_TabCtrl.EventHTabCtrlExClose += new HTabCtrlEx.DelegateHTabCtrlEx(onCloseTabPage);
        }