Exemple #1
0
        public SelectConnection()
        {
            _connectionConfiguration = ConnectionSerializer.GetConnectionConfiguration();

            InitializeComponent();
            comboConnections.DataContext = _connectionConfiguration;
        }
Exemple #2
0
        private void editConnection_Click(object sender, RoutedEventArgs e)
        {
            var conn = comboConnections.SelectedValue as Connection;

            if (conn == null)
            {
                return;
            }
            var w = new AddConnectionWindow();

            w.DataContext = conn;
            w.ShowDialog();
            comboConnections.SelectedItem = null;
            this._connectionConfiguration.Connections.Remove(conn);
            this._connectionConfiguration.Connections.Insert(0, conn);
            comboConnections.SelectedItem = conn;
            ConnectionSerializer.SaveConnectionConfiguration(this._connectionConfiguration);
        }