private void btn_Cancel_Click(object sender, RoutedEventArgs e) { StoreLocation store = new StoreLocation(); if (store.IsDatabaseExist(tbx_Store.Content.ToString())) { m.loadMain(new Home()); } else { m.Close(); } }