Esempio n. 1
0
        private void LoadDefaultData()
        {
            _loadingDefaultData = true;

            // If Env Var is not found, default to file in executing folder
            var settingsPath = FormHelper.GetEnvironmentVar(AcLogSettingsEnvVar) ?? $"{FormHelper.GetExecutingDirectory()}\\AcLogSettings.json";

            AclSettings = FormHelper.ReadSettingsJson(settingsPath);

            // Access Database
            foreach (var setting in AclSettings.AccessMdbs)
            {
                cboAccessFilePath.Items.Add(new CtrlListItem(setting.FilePath));
            }

            if (cboAccessFilePath.Items.Count > 0)
            {
                cboAccessFilePath.SelectedIndex = 0;
            }

            // SQL Database
            foreach (var setting in AclSettings.SqlServers)
            {
                cboSqlServer.Items.Add(new CtrlListItem(setting.ServerName));
            }

            if (cboSqlServer.Items.Count > 0)
            {
                cboSqlServer.SelectedIndex = 0;
            }

            _loadingDefaultData = false;
        }
Esempio n. 2
0
 private void btnCopyLog_Click(object sender, EventArgs e)
 {
     FormHelper.CopyToClipboard(rtxtLog.Text);
 }