public MainWindow()
        {
            InitializeComponent();

            _glavniModel = new MainModel("");
            this.DataContext = _glavniModel;

            foreach(var db in KonfiguracioniPomocnik.DajBaze())
                cmbSqlServer.Items.Add(db);

            MyCommand.InputGestures.Add(new KeyGesture(Key.R, ModifierKeys.Control));
        }
 private void cmbSqlServer_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     try
     {
         var connStr = (e.AddedItems[0] as ConnectionString);
         MySqlPomocnik.CONNECTION_STRING = connStr.FullString;
         _glavniModel = new MainModel(connStr.Database);
         this.DataContext = _glavniModel;
         _glavniModel.UcitajTabele();
     }
     catch(Exception ex) { MessageBox.Show(ex.Message); }
 }