/// <summary> /// Handles the Click event of the button2 control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void button2_Click(object sender, System.EventArgs e) { Cursor.Current = Cursors.WaitCursor; listView1.Items.Clear(); listView1.Enabled = false; try { AnalyzeAssembly analyzeAssem = new AnalyzeAssembly(); FillDataGrid(analyzeAssem.Analyze(_stringAssembly)); } catch (FileLoadException ex) { DisplayError.Display(ex); } catch (FileNotFoundException ex) { DisplayError.Display(ex); } catch (ArgumentNullException ex) { DisplayError.Display(ex); } catch (ApplicationException ex) { DisplayError.Display(ex); } catch (ReflectionTypeLoadException ex) { DisplayError.Display(ex); } catch (BadImageFormatException ex) { DisplayError.Display(ex); } finally { Cursor.Current = Cursors.Default; if (listView1.Items.Count > 0) { listView1.Enabled = true; } } }
//�Public�Methods�(1)� public static void Export(ListView listView, ExportingOption exportOption, string file) { try { ExportStrategy exportStrategy = GetExportStrategyObject(exportOption); ExportListView exportListView = new ExportListView(exportStrategy); exportListView.Export(listView, file); MessageBox.Show("Exporting Done", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information); } catch (ArgumentException ex) { DisplayError.Display(ex); } catch (IOException ex) { DisplayError.Display(ex); } }
/// <summary> /// Handles the Click event of the pictureBox1 control. /// </summary> /// <param name="sender">The source of the event.</param> /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param> private void pictureBox1_Click(object sender, EventArgs e) { string helpLink = ConfigurationManager.AppSettings["Help Link"]; try { Cursor.Current = Cursors.AppStarting; Process.Start(helpLink); } catch (InvalidOperationException ex) { DisplayError.Display(ex); } catch (Win32Exception ex) { DisplayError.Display(ex); } finally { Cursor.Current = Cursors.Default; } }