Exemplo n.º 1
0
 public ItemViewModel(SelfWinSettings settings, Item item)
 {
     this.Parameter = item;
     this.InitFavicon(settings, item.Icon);
     this.InitContent(this.Parameter);
 }
Exemplo n.º 2
0
 public override IItemViewModel CreateItemVm(SelfWinSettings settings, Item item)
 {
     return new ItemViewModel(settings, item);
 }
Exemplo n.º 3
0
 private void InitFavicon(SelfWinSettings settings, string icon)
 {
     var root = settings.SelfossOptions.Url();
     this.SourceIconUrl = $"{root}/favicons/{icon}";
 }
Exemplo n.º 4
0
 public virtual IItemViewModel CreateItemVm(SelfWinSettings settings, Item item)
 {
     return null;
 }
Exemplo n.º 5
0
 private void SaveToApplicationData(SelfWinSettings newSettings)
 {
     var store = SettingsStore();
     SaveConnection(store, newSettings.SelfossOptions);
 }
Exemplo n.º 6
0
        public async Task SaveSettings(ISettingsViewModel settings)
        {
            var newSettings = new SelfWinSettings(settings.Url, settings.Port, settings.Username, settings.Password);

            SaveToApplicationData(newSettings);

            await ValidateSettings();
        }
Exemplo n.º 7
0
 public SelfWinSettings Settings()
 {
     var settings = new SelfWinSettings();
     var store = SettingsStore();
     ReadConnection(store, settings.SelfossOptions);
     return settings;
 }