AcManager.Pages.Dialogs.UpgradeIconEditor_Library.Finish C# (CSharp) Метод

Finish() публичный Метод

public Finish ( bool result ) : void
result bool
Результат void
        public void Finish(bool result) {
            FilesStorage.Instance.Watcher(ContentCategory.UpgradeIcons).Update -= UpgradeIconEditor_Library_Update;
            if (Selected == null) return;

            ValuesStorage.Set(_key, Selected.Name);

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

                File.Copy(Selected.Filename, Car.UpgradeIcon);
            } catch (IOException ex) {
                NonfatalError.Notify(AppStrings.UpgradeIcon_CannotChange, AppStrings.UpgradeIcon_CannotChange_Commentary, ex);
                return;
            } catch (Exception ex) {
                NonfatalError.Notify(AppStrings.UpgradeIcon_CannotChange, ex);
                return;
            }
        }