AcManager.Pages.Dialogs.BrandBadgeEditor.BrandBadgeEditor_Closing C# (CSharp) Метод

BrandBadgeEditor_Closing() приватный Метод

private BrandBadgeEditor_Closing ( object sender, CancelEventArgs e ) : void
sender object
e CancelEventArgs
Результат void
        private void BrandBadgeEditor_Closing(object sender, CancelEventArgs e) {
            FilesStorage.Instance.Watcher(ContentCategory.BrandBadges).Update -= BrandBadgeEditor_Update;

            if (MessageBoxResult != MessageBoxResult.OK) return;
            if (Selected == null) return;

            try {
                if (File.Exists(Car.BrandBadge)) {
                    FileUtils.Recycle(Car.BrandBadge);
                }

                File.Copy(Selected.Filename, Car.BrandBadge);
            } catch (IOException ex) {
                NonfatalError.Notify(AppStrings.BrandBadge_CannotChange, AppStrings.BrandBadge_CannotChange_Commentary, ex);
            } catch (Exception ex) {
                NonfatalError.Notify(AppStrings.BrandBadge_CannotChange, ex);
            }
        }