private async void Button_Click(object sender, RoutedEventArgs e) { if (DataSourceType == DataSourceType.LocalFile) { var dialog = new System.Windows.Forms.FolderBrowserDialog(); var result = dialog.ShowDialog(); if (result != System.Windows.Forms.DialogResult.OK) { return; } try { var dataSource = new LocalFileDataSource(dialog.SelectedPath); if (await dataSource.Initialize() == false) { MessageBox.Show("DataSource initialize failed!"); return; } StadApplication.SetDataSource(dataSource); Window.GetWindow(this).Close(); } catch (Exception exception) { MessageBox.Show(exception.Message); } } }
private async void Button_Click(object sender, RoutedEventArgs e) { if (DataSourceType == DataSourceType.LocalFile) { var dialog = new System.Windows.Forms.FolderBrowserDialog(); if (dialog.ShowDialog() != System.Windows.Forms.DialogResult.OK) { return; } try { var assemblySource = new LocalFileAssemblySource(dialog.SelectedPath); if (await assemblySource.Initialize() == false) { MessageBox.Show("Assembly initialize failed!"); return; } StadApplication.SetAssemblySource(assemblySource); StadRegistry stadRegistry = await StadAnalyzer.MakeRegistry(assemblySource); // TODO: analyze 스텝 분리? if (stadRegistry == null) { MessageBox.Show("Make Registry failed!"); return; } StadApplication.SetStadRegitry(stadRegistry); } catch (Exception exception) { MessageBox.Show(exception.Message); } } }
private void button_Detail_Click(object sender, RoutedEventArgs e) { StadApplication.Show(Model); }