private void FormMain_Load(object sender, EventArgs e) { appSettings.Load(); textBoxHostName.Text = appSettings.HostName; textBoxPortNumber.Text = appSettings.PortNumber.ToString(); textBoxServerIdentifier.Text = appSettings.ServerIdentifier.ToString(); OPC1.Initialization("OPC I", "Information"); OPC2.Initialization("OPC II", "Information"); OPC3.Initialization("OPC III", "Information"); OPC4.Initialization("OPC IV", "Information"); }
private void FormMain_Load(object sender, EventArgs e) { // Загрузка настроек из файла appSettings.Load(); // Отображаем текущие настройка на форме textBoxHostName.Text = appSettings.HostName; textBoxPortNumber.Text = appSettings.PortNumber.ToString(); textBoxServerIdentifier.Text = appSettings.ServerIdentifier.ToString(); // Инициализация пользовательских компонент OPC1.Initialization("OPC I", "Information"); OPC2.Initialization("OPC II", "Information"); OPC3.Initialization("OPC III", "Information"); OPC4.Initialization("OPC IV", "Information"); _ConnectionString = String.Format("Data Source={0};Version=3;", _PathToDB); _SqliteConnection = new SQLiteConnection(_ConnectionString); _SqliteConnection.Open(); }