Exemple #1
0
        public static dsConnections Load()
        {
            dsConnections ds = new dsConnections();

            if (File.Exists(FileName))
            {
                ds.ReadXml(FileName);
            }
            return(ds);
        }
Exemple #2
0
        private void ConnectionsDialogClick(object sender, EventArgs e)
        {
            if (_connections == null)
            {
                _connections = dsConnections.Load();
            }
            frmConnections dlg = new frmConnections();

            dlg.Connections = _connections;
            dlg.ShowDialog();
            FillConnectionNames();
        }
Exemple #3
0
        private void FillConnectionNames()
        {
            if (_connections == null)
            {
                _connections = dsConnections.Load();
            }
            object currentConnection = _tscbConnection.SelectedItem;

            _tscbConnection.Items.Clear();
            _tscbConnection.Items.AddRange(_connections.ConnectionItem.AsEnumerable().Select(row => row.Name).ToArray());
            if (currentConnection != null)
            {
                _tscbConnection.SelectedItem = currentConnection;
            }
        }