private SettingsViewModel() { this.ScreenshotSettings = new ScreenshotSettingsViewModel().AddTo(this); this.WindowSettings = new WindowSettingsViewModel().AddTo(this); this.NetworkSettings = new NetworkSettingsViewModel().AddTo(this); this.UserStyleSheetSettings = new UserStyleSheetSettingsViewModel().AddTo(this); this.OptimizeSettings = new Settings.OptimizeSettingsViewModel().AddTo(this); this.BrowserZoomFactor = new BrowserZoomFactor { Current = GeneralSettings.BrowserZoomFactor }; this.BrowserZoomFactor .Subscribe(nameof(this.BrowserZoomFactor.Current), () => GeneralSettings.BrowserZoomFactor.Value = this.BrowserZoomFactor.Current) .AddTo(this); GeneralSettings.BrowserZoomFactor.Subscribe(x => this.BrowserZoomFactor.Current = x).AddTo(this); this.FlashQualityCollection = new List <DisplayViewModel <FlashQuality> > { DisplayViewModel.Create(FlashQuality.Low, "낮음"), DisplayViewModel.Create(FlashQuality.Medium, "중간"), DisplayViewModel.Create(FlashQuality.High, "높음"), }; this.Cultures = new[] { new CultureViewModel { DisplayName = "(auto)" } } .Concat(ResourceService.Current.SupportedCultures .Select(x => new CultureViewModel { DisplayName = x.EnglishName, Name = x.Name }) .OrderBy(x => x.DisplayName)) .ToList(); this.Libraries = ProductInfo.Libraries.Aggregate( new List <BindableTextViewModel>(), (list, lib) => { list.Add(new BindableTextViewModel { Text = list.Count == 0 ? "Build with " : ", " }); list.Add(new HyperlinkViewModel { Text = lib.Name.Replace(' ', Convert.ToChar(160)), Uri = lib.Url }); // ☝プロダクト名の途中で改行されないように、space を non-break space に置き換えてあげてるんだからねっっ return(list); }); this.ViewRangeSettingsCollection = ViewRangeCalcLogic.Logics.ToList(); this.SelectedViewRangeCalcType = this.ViewRangeSettingsCollection .FirstOrDefault(x => x.Id == KanColleSettings.ViewRangeCalcType) ?? this.ViewRangeSettingsCollection.First(); this.LoadedPlugins = new List <PluginViewModel>( PluginService.Current.Plugins.Select(x => new PluginViewModel(x))); this.FailedPlugins = new List <LoadFailedPluginViewModel>( PluginService.Current.FailedPlugins.Select(x => new LoadFailedPluginViewModel(x))); }
public WindowSettingsViewModel() { this.ExitConfirmationTypes = new List <DisplayViewModel <ExitConfirmationType> > { DisplayViewModel.Create(ExitConfirmationType.None, "確認しない"), DisplayViewModel.Create(ExitConfirmationType.InSortieOnly, "出撃中のみ確認する"), DisplayViewModel.Create(ExitConfirmationType.Always, "常に確認する"), }; }
public WindowSettingsViewModel() { this.ExitConfirmationTypes = new List <DisplayViewModel <ExitConfirmationType> > { DisplayViewModel.Create(ExitConfirmationType.None, Resources.Settings_Window_ConfirmExit_Never), DisplayViewModel.Create(ExitConfirmationType.InSortieOnly, Resources.Settings_Window_ConfirmExit_InSortieOnly), DisplayViewModel.Create(ExitConfirmationType.Always, Resources.Settings_Window_ConfirmExit_Always), }; this.TaskbarProgressFeatures = EnumerableEx .Return(GeneralSettings.TaskbarProgressSource.ToDefaultDisplay(Resources.TaskbarIndicator_DoNotUse)) .Concat(TaskbarProgress.Features.ToDisplay(x => x.Id, x => x.DisplayName)) .ToList(); }
public WindowSettingsViewModel() { this.ExitConfirmationTypes = new List <DisplayViewModel <ExitConfirmationType> > { DisplayViewModel.Create(ExitConfirmationType.None, "確認しない"), DisplayViewModel.Create(ExitConfirmationType.InSortieOnly, "出撃中のみ確認する"), DisplayViewModel.Create(ExitConfirmationType.Always, "常に確認する"), }; this.TaskbarProgressFeatures = EnumerableEx .Return(GeneralSettings.TaskbarProgressSource.ToDefaultDisplay("使用しない")) .Concat(TaskbarProgress.Features.ToDisplay(x => x.Id, x => x.DisplayName)) .ToList(); }
public ToolViewModel(MaterialChartPlugin plugin) { this.plugin = plugin; this.materialManager = new MaterialManager(plugin); this.DisplayedPeriods = new List <DisplayViewModel <DisplayedPeriod> >() { DisplayViewModel.Create(DisplayedPeriod.OneDay, "1日"), DisplayViewModel.Create(DisplayedPeriod.OneWeek, "1週間"), DisplayViewModel.Create(DisplayedPeriod.OneMonth, "1ヶ月"), DisplayViewModel.Create(DisplayedPeriod.ThreeMonths, "3ヶ月"), DisplayViewModel.Create(DisplayedPeriod.OneYear, "1年"), DisplayViewModel.Create(DisplayedPeriod.ThreeYears, "3年") }; }
public WindowSettingsViewModel() { this.ExitConfirmationTypes = new List <DisplayViewModel <ExitConfirmationType> > { DisplayViewModel.Create(ExitConfirmationType.None, "확인하지않음"), DisplayViewModel.Create(ExitConfirmationType.InSortieOnly, "출격중에만 확인"), DisplayViewModel.Create(ExitConfirmationType.Always, "언제나 확인"), }; this.RefreshConfirmationTypes = new List <DisplayViewModel <ExitConfirmationType> > { DisplayViewModel.Create(ExitConfirmationType.None, "확인하지않음"), DisplayViewModel.Create(ExitConfirmationType.InSortieOnly, "출격중에만 확인"), DisplayViewModel.Create(ExitConfirmationType.Always, "언제나 확인"), }; this.TaskbarProgressFeatures = MetroTrilithon.Linq.EnumerableEx .Return(GeneralSettings.TaskbarProgressSource.ToDefaultDisplay("사용안함")) .Concat(TaskbarProgress.Features.ToDisplay(x => x.Id, x => x.DisplayName)) .ToList(); }
public WindowSettingsViewModel() { this.ExitConfirmationTypes = new List <DisplayViewModel <ExitConfirmationType> > { DisplayViewModel.Create(ExitConfirmationType.None, "확인하지않음"), DisplayViewModel.Create(ExitConfirmationType.InSortieOnly, "출격중에만 확인"), DisplayViewModel.Create(ExitConfirmationType.Always, "언제나 확인"), }; this.RefreshConfirmationTypes = new List <DisplayViewModel <ExitConfirmationType> > { DisplayViewModel.Create(ExitConfirmationType.None, "확인하지않음"), DisplayViewModel.Create(ExitConfirmationType.InSortieOnly, "출격중에만 확인"), DisplayViewModel.Create(ExitConfirmationType.Always, "언제나 확인"), }; this.IndicatorColorList = new List <DisplayViewModel <Color> > { DisplayViewModel.Create(Color.FromRgb(40, 160, 240), "푸른색 (#28A0F0)"), DisplayViewModel.Create(Color.FromRgb(40, 144, 16), "진한 초록색 (#289010)"), }; this.TaskbarProgressFeatures = MetroTrilithon.Linq.EnumerableEx .Return(GeneralSettings.TaskbarProgressSource.ToDefaultDisplay("사용안함")) .Concat(TaskbarProgress.Features.ToDisplay(x => x.Id, x => x.DisplayName)) .ToList(); }