public ExportToProjectVM(IPickDirectory pickDirectory, ILanguageManager languageManager, IExportTask exportTask, bool canDecompileBaml) { this.pickDirectory = pickDirectory; this.languageManager = languageManager; this.exportTask = exportTask; this.canDecompileBaml = canDecompileBaml; this.unpackResources = true; this.createResX = true; this.decompileXaml = canDecompileBaml; this.createSolution = true; this.projectVersionVM.SelectedItem = ProjectVersion.VS2010; this.language = languageManager.AllLanguages.FirstOrDefault(a => a.ProjectFileExtension != null); this.isIndeterminate = false; }
public ExportToProjectVM(IPickDirectory pickDirectory, ILanguageManager languageManager, IExportTask exportTask, bool canDecompileBaml) { this.pickDirectory = pickDirectory; this.languageManager = languageManager; this.exportTask = exportTask; this.canDecompileBaml = canDecompileBaml; this.unpackResources = true; this.createResX = true; this.decompileXaml = canDecompileBaml; this.createSolution = true; this.projectVersionVM.SelectedItem = ProjectVersion.VS2010; this.language = languageManager.Languages.FirstOrDefault(a => a.ProjectFileExtension != null); this.isIndeterminate = false; }
public ExportToProjectVM(IPickDirectory pickDirectory, IDecompilerService decompilerService, IExportTask exportTask, bool canDecompileBaml) { this.pickDirectory = pickDirectory; this.exportTask = exportTask; this.canDecompileBaml = canDecompileBaml; unpackResources = true; createResX = true; decompileXaml = canDecompileBaml; createSolution = true; ProjectVersionVM.SelectedItem = ProjectVersion.VS2010; allDecompilers = new ObservableCollection <DecompilerVM>(decompilerService.AllDecompilers.Where(a => a.ProjectFileExtension != null).Select(a => new DecompilerVM(a))); decompiler = allDecompilers.FirstOrDefault(); isIndeterminate = false; ProjectGuid = new NullableGuidVM(Guid.NewGuid(), a => HasErrorUpdated()); }
public ExportToProjectVM(IPickDirectory pickDirectory, IDecompilerService decompilerService, IExportTask exportTask, bool canDecompileBaml) { this.pickDirectory = pickDirectory; this.decompilerService = decompilerService; this.exportTask = exportTask; this.canDecompileBaml = canDecompileBaml; this.unpackResources = true; this.createResX = true; this.decompileXaml = canDecompileBaml; this.createSolution = true; this.ProjectVersionVM.SelectedItem = ProjectVersion.VS2010; this.decompiler = decompilerService.AllDecompilers.FirstOrDefault(a => a.ProjectFileExtension != null); this.isIndeterminate = false; this.ProjectGuid = new NullableGuidVM(Guid.NewGuid(), a => HasErrorUpdated()); }
public ExportToProjectVM(IPickDirectory pickDirectory, IDecompilerService decompilerService, IExportTask exportTask, bool canDecompileBaml) { this.pickDirectory = pickDirectory; this.decompilerService = decompilerService; this.exportTask = exportTask; this.canDecompileBaml = canDecompileBaml; unpackResources = true; createResX = true; decompileXaml = canDecompileBaml; createSolution = true; ProjectVersionVM.SelectedItem = ProjectVersion.VS2010; decompiler = decompilerService.AllDecompilers.FirstOrDefault(a => a.ProjectFileExtension != null); isIndeterminate = false; ProjectGuid = new NullableGuidVM(Guid.NewGuid(), a => HasErrorUpdated()); }
StartDebuggingOptionsPageProviderImpl(IPickFilename pickFilename, IPickDirectory pickDirectory) { this.pickFilename = pickFilename; this.pickDirectory = pickDirectory; }
public DotNetFrameworkStartDebuggingOptionsPage(IPickFilename pickFilename, IPickDirectory pickDirectory) : base(pickFilename, pickDirectory) { }
public UnityStartDebuggingOptionsPage(IPickFilename pickFilename, IPickDirectory pickDirectory) : base(pickFilename, pickDirectory) { }
AppSettingsPageProvider(IBackgroundImageSettingsService backgroundImageSettingsService, IPickFilename pickFilename, IPickDirectory pickDirectory) { this.backgroundImageSettingsService = backgroundImageSettingsService; this.pickFilename = pickFilename; this.pickDirectory = pickDirectory; }
public AppSettingsPageImpl(IBackgroundImageSettingsService backgroundImageSettingsService, IPickFilename pickFilename, IPickDirectory pickDirectory, ImageSettingsInfo[] settings) { if (settings == null) { throw new ArgumentNullException(nameof(settings)); } if (settings.Length == 0) { throw new ArgumentException(); } Debug.Assert(settings.All(a => a.Lazy.Value.UserVisible)); this.backgroundImageSettingsService = backgroundImageSettingsService ?? throw new ArgumentNullException(nameof(backgroundImageSettingsService)); this.pickFilename = pickFilename ?? throw new ArgumentNullException(nameof(pickFilename)); this.pickDirectory = pickDirectory ?? throw new ArgumentNullException(nameof(pickDirectory)); Settings = new ObservableCollection <Settings>(settings.OrderBy(a => a.Lazy.Value.UIOrder).Select(a => new Settings(a))); stretchVM = new EnumListVM(EnumVM.Create(false, typeof(Stretch)), (a, b) => currentItem.RawSettings.Stretch = (Stretch)stretchVM.SelectedItem); stretchDirectionVM = new EnumListVM(stretchDirectionList, (a, b) => currentItem.RawSettings.StretchDirection = (StretchDirection)stretchDirectionVM.SelectedItem); imagePlacementVM = new EnumListVM(imagePlacementList, (a, b) => currentItem.RawSettings.ImagePlacement = (ImagePlacement)imagePlacementVM.SelectedItem); opacityVM = new DoubleVM(a => { if (!opacityVM.HasError) { currentItem.RawSettings.Opacity = FilterOpacity(opacityVM.Value); } }); horizontalOffsetVM = new DoubleVM(a => { if (!horizontalOffsetVM.HasError) { currentItem.RawSettings.HorizontalOffset = FilterOffset(horizontalOffsetVM.Value); } }); verticalOffsetVM = new DoubleVM(a => { if (!verticalOffsetVM.HasError) { currentItem.RawSettings.VerticalOffset = FilterOffset(verticalOffsetVM.Value); } }); leftMarginWidthPercentVM = new DoubleVM(a => { if (!leftMarginWidthPercentVM.HasError) { currentItem.RawSettings.LeftMarginWidthPercent = FilterMarginPercent(leftMarginWidthPercentVM.Value); } }); rightMarginWidthPercentVM = new DoubleVM(a => { if (!rightMarginWidthPercentVM.HasError) { currentItem.RawSettings.RightMarginWidthPercent = FilterMarginPercent(rightMarginWidthPercentVM.Value); } }); topMarginHeightPercentVM = new DoubleVM(a => { if (!topMarginHeightPercentVM.HasError) { currentItem.RawSettings.TopMarginHeightPercent = FilterMarginPercent(topMarginHeightPercentVM.Value); } }); bottomMarginHeightPercentVM = new DoubleVM(a => { if (!bottomMarginHeightPercentVM.HasError) { currentItem.RawSettings.BottomMarginHeightPercent = FilterMarginPercent(bottomMarginHeightPercentVM.Value); } }); maxHeightVM = new DoubleVM(a => { if (!maxHeightVM.HasError) { currentItem.RawSettings.MaxHeight = FilterLength(maxHeightVM.Value); } }); maxWidthVM = new DoubleVM(a => { if (!maxWidthVM.HasError) { currentItem.RawSettings.MaxWidth = FilterLength(maxWidthVM.Value); } }); zoomVM = new DoubleVM(a => { if (!zoomVM.HasError) { currentItem.RawSettings.Zoom = FilterZoom(zoomVM.Value); } }); intervalVM = new DefaultConverterVM <TimeSpan>(a => { if (!intervalVM.HasError) { currentItem.RawSettings.Interval = intervalVM.Value; } }); CurrentItem = Settings.FirstOrDefault(a => a.Id == backgroundImageSettingsService.LastSelectedId) ?? Settings[0]; }
public AppSettingsPageImpl(IBackgroundImageSettingsService backgroundImageSettingsService, IPickFilename pickFilename, IPickDirectory pickDirectory, ImageSettingsInfo[] settings) { if (backgroundImageSettingsService == null) throw new ArgumentNullException(nameof(backgroundImageSettingsService)); if (pickFilename == null) throw new ArgumentNullException(nameof(pickFilename)); if (pickDirectory == null) throw new ArgumentNullException(nameof(pickDirectory)); if (settings == null) throw new ArgumentNullException(nameof(settings)); if (settings.Length == 0) throw new ArgumentException(); Debug.Assert(settings.All(a => a.Lazy.Value.UserVisible)); this.backgroundImageSettingsService = backgroundImageSettingsService; this.pickFilename = pickFilename; this.pickDirectory = pickDirectory; Settings = new ObservableCollection<Settings>(settings.OrderBy(a => a.Lazy.Value.UIOrder).Select(a => new Settings(a))); stretchVM = new EnumListVM(EnumVM.Create(false, typeof(Stretch)), (a, b) => currentItem.RawSettings.Stretch = (Stretch)stretchVM.SelectedItem); stretchDirectionVM = new EnumListVM(stretchDirectionList, (a, b) => currentItem.RawSettings.StretchDirection = (StretchDirection)stretchDirectionVM.SelectedItem); imagePlacementVM = new EnumListVM(imagePlacementList, (a, b) => currentItem.RawSettings.ImagePlacement = (ImagePlacement)imagePlacementVM.SelectedItem); opacityVM = new DoubleVM(a => { if (!opacityVM.HasError) currentItem.RawSettings.Opacity = FilterOpacity(opacityVM.Value); }); horizontalOffsetVM = new DoubleVM(a => { if (!horizontalOffsetVM.HasError) currentItem.RawSettings.HorizontalOffset = FilterOffset(horizontalOffsetVM.Value); }); verticalOffsetVM = new DoubleVM(a => { if (!verticalOffsetVM.HasError) currentItem.RawSettings.VerticalOffset = FilterOffset(verticalOffsetVM.Value); }); leftMarginWidthPercentVM = new DoubleVM(a => { if (!leftMarginWidthPercentVM.HasError) currentItem.RawSettings.LeftMarginWidthPercent = FilterMarginPercent(leftMarginWidthPercentVM.Value); }); rightMarginWidthPercentVM = new DoubleVM(a => { if (!rightMarginWidthPercentVM.HasError) currentItem.RawSettings.RightMarginWidthPercent = FilterMarginPercent(rightMarginWidthPercentVM.Value); }); topMarginHeightPercentVM = new DoubleVM(a => { if (!topMarginHeightPercentVM.HasError) currentItem.RawSettings.TopMarginHeightPercent = FilterMarginPercent(topMarginHeightPercentVM.Value); }); bottomMarginHeightPercentVM = new DoubleVM(a => { if (!bottomMarginHeightPercentVM.HasError) currentItem.RawSettings.BottomMarginHeightPercent = FilterMarginPercent(bottomMarginHeightPercentVM.Value); }); maxHeightVM = new DoubleVM(a => { if (!maxHeightVM.HasError) currentItem.RawSettings.MaxHeight = FilterLength(maxHeightVM.Value); }); maxWidthVM = new DoubleVM(a => { if (!maxWidthVM.HasError) currentItem.RawSettings.MaxWidth = FilterLength(maxWidthVM.Value); }); zoomVM = new DoubleVM(a => { if (!zoomVM.HasError) currentItem.RawSettings.Zoom = FilterZoom(zoomVM.Value); }); intervalVM = new DefaultConverterVM<TimeSpan>(a => { if (!intervalVM.HasError) currentItem.RawSettings.Interval = intervalVM.Value; }); CurrentItem = Settings.FirstOrDefault(a => a.Id == backgroundImageSettingsService.LastSelectedId) ?? Settings[0]; }