Exemplo n.º 1
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog folderBrowser = new FolderBrowserDialog();
            DialogResult        result        = folderBrowser.ShowDialog();

            if (!string.IsNullOrWhiteSpace(folderBrowser.SelectedPath))
            {
                var    dir = new System.IO.DirectoryInfo(folderBrowser.SelectedPath);
                string pp  = folderBrowser.SelectedPath + @"\BD_Data.db";
                DataAccesBDData.Path = folderBrowser.SelectedPath + @"\BD_Data.db";
                Path.Text            = folderBrowser.SelectedPath;
                DataAccesBDData.CreateDB();
                DataAccesBDData.InitializeDatabase();
                RanGrid.ItemsSource = DataAccesBDData.GetDataRun();
            }
        }
Exemplo n.º 2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            FolderBrowserDialog folderBrowser = new FolderBrowserDialog();
            DialogResult        result        = folderBrowser.ShowDialog();

            if (!string.IsNullOrWhiteSpace(folderBrowser.SelectedPath))
            {
                var    dir = new System.IO.DirectoryInfo(folderBrowser.SelectedPath);
                string pp  = folderBrowser.SelectedPath + @"\BD_Data_100.db";
                DataAccesBDData.Path = folderBrowser.SelectedPath + @"\BD_Data_100.db";
                WayBd.Text           = folderBrowser.SelectedPath;
                set.WaySetup         = WayBd.Text;
                DataAccesBDData.CreateDB();
                DataAccesBDData.InitializeDatabase100();
            }
            System.Windows.MessageBox.Show("База данных создана");
        }