/// <summary> /// Standard constructor /// </summary> public MainWindow() { try { this.Executing = false; this.InitializeComponent(); this.UpdateWindow(string.Empty); this.ClearCounters(); this.Application.OnCountersChange += this.ApplicationOnCountersChange; } catch (Exception lException) { MessageBox.Show(ErrorToolkit.CreateErrorMessage(lException)); } }
/// <summary> /// Loading icons /// </summary> protected void LoadIcons() { string lXmlFilePath = this.SelectXmlFile(); if (lXmlFilePath.Length > 0) { try { this.UpdateWindow(JHJ.FolderIcons.Resources.MainWindow.LoadingIcons); this.Application.LoadIcons(lXmlFilePath, true); this.UpdateSetupTreeView(); this.ClearCounters(); } catch (Exception lException) { ErrorToolkit.ShowErrorMessage(lException); } }
/// <summary> /// Loading defaults /// </summary> protected void LoadDefaults() { try { this.UpdateWindow(JHJ.FolderIcons.Resources.MainWindow.LoadingDefaults); this.Application.LoadDefaults(); this.UpdateSetupTreeView(); this.ClearCounters(); } catch (Exception lException) { ErrorToolkit.ShowErrorMessage(lException); } finally { this.UpdateWindow(string.Empty); } }
/// <summary> /// Constructor with exception /// </summary> /// <param name="pException"></param> public ErrorEventArgs(Exception pException) : this(ErrorToolkit.CreateErrorMessage(pException)) { }
/// <summary> /// Constructor with exception /// </summary> /// <param name="pException">The exception</param> public FolderIconsException(Exception pException) : this(ErrorToolkit.CreateErrorMessage(pException)) { }
/// <summary> /// Showing error message /// </summary> /// <param name="pException">Exception to take error message from</param> public static void ShowErrorMessage(Exception pException) { MessageBox.Show(ErrorToolkit.CreateErrorMessage(pException), string.Empty, MessageBoxButton.OK, MessageBoxImage.Error); }