public SettingsPresenter(IViewSettings viewSettings) { //Settings.Default.Upgrade(); //Settings.Default.Reload(); Settings.Default.Save(); _viewSettings = viewSettings; _viewSettings.AuftragsKontoFields = new ObservableCollection <string>(Settings.Default.ContributorAccField.Cast <string>()); _viewSettings.AuftragsKontoFields.CollectionChanged += OnAuftragsKontoFieldChanged; _viewSettings.BuchungstagFields = new ObservableCollection <string>(Settings.Default.PaymentDateField.Cast <string>()); _viewSettings.BuchungstagFields.CollectionChanged += OnBuchungstagFieldChanged; _viewSettings.WertDatumFields = new ObservableCollection <string>(Settings.Default.BankOperDateField.Cast <string>()); _viewSettings.WertDatumFields.CollectionChanged += OnWertDatumFieldChanged; _viewSettings.BuchungsTextFields = new ObservableCollection <string>(Settings.Default.BankOperTypeField.Cast <string>()); _viewSettings.BuchungsTextFields.CollectionChanged += OnBuchungsTextFielChanged; _viewSettings.VerwendZweckFields = new ObservableCollection <string>(Settings.Default.PaymentPurposeField.Cast <string>()); _viewSettings.VerwendZweckFields.CollectionChanged += OnVerwendZweckFieldChanged; _viewSettings.BeguenstigerFields = new ObservableCollection <string>(Settings.Default.BeneficiaryField.Cast <string>()); _viewSettings.BeguenstigerFields.CollectionChanged += OnBeguenstigerFieldChanged; _viewSettings.KontonummerFields = new ObservableCollection <string>(Settings.Default.BeneficiaryAccField.Cast <string>()); _viewSettings.KontonummerFields.CollectionChanged += OnKontonummerFieldChanged; _viewSettings.BLZFields = new ObservableCollection <string>(Settings.Default.IntBankCodeField.Cast <string>()); _viewSettings.BLZFields.CollectionChanged += OnBLZFieldChanged; _viewSettings.BetragFields = new ObservableCollection <string>(Settings.Default.BankOperValueField.Cast <string>()); _viewSettings.BetragFields.CollectionChanged += OnBetragFieldChanged; _viewSettings.WaehrungFields = new ObservableCollection <string>(Settings.Default.CurrencyField.Cast <string>()); _viewSettings.WaehrungFields.CollectionChanged += OnWaehrungFieldChanged; _viewSettings.EncodePages = new ObservableCollection <string>(Settings.Default.CodePage.Cast <string>()); _viewSettings.EncodePages.CollectionChanged += OnMyEncodingPageChanged; _viewSettings.AppCultures = new ObservableCollection <string>(Settings.Default.AppCultures.Cast <string>()); _viewSettings.AppCultures.CollectionChanged += OnAppCultureSelected; }
public string CreateUpdatedXml(IViewSettings settings) { var view1 = _xdoc.Elements("configuration") .Elements("views") .Elements("view").First(); // only used to update a view when there is 1 view1.Attribute(Url).Value = settings.URL; view1.Attribute(ProjectRegex).Value = settings.ProjectNameRegEx; view1.Attribute(CategoryRegex).Value = settings.CategoryRegEx; view1.Attribute(ServerRegex).Value = settings.ServerNameRegEx; view1.Attribute(Skin).Value = settings.SkinName; view1.Attribute(ViewName).Value = settings.ViewName; view1.Attribute(ShowOnlyBroken).Value = settings.ShowOnlyBroken.ToString(); view1.Attribute(ShowServerName).Value = settings.ShowServerName.ToString(); view1.Attribute(ShowOutOfDate).Value = settings.ShowOutOfDate.ToString(); view1.Attribute(ShowBuildAge).Value = settings.ShowBuildAge.ToString(); view1.Attribute(OutOfDateDifferenceInMinutes).Value = settings.OutOfDateDifferenceInMinutes.ToString(); var xml = new StringBuilder(); using (var xmlWriter = XmlWriter.Create(xml, new XmlWriterSettings { OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.None, Indent = true, })) { _xdoc.WriteTo(xmlWriter); } return xml.ToString(); }
public static string FontName(this IViewSettings settings) { if (settings.MonospaceFont) { return("Consolas"); } else { return("Segoe UI"); } }
public MainPresenter(IView view, IViewSettings parseSettings, IMessageService messageService) { _view = view; _parseSettings = parseSettings; _messageService = messageService; _parseSettings.Start += _parseSettings_Start; _parseSettings.Close += _parseSettings_Closing; _view.NewParcing += _view_NewParcing; _view.SaveData += _view_SaveData; _view.ReadAllData += _view_ReadData; _mainForm = _view.GetForm(); _parserController = ParserControllerBuilder.GetController <DataTable>("mock", null, null, ParserType.Agility); _parserController.NewDataReceived += _parserController_NewDataReceived; }
public ViewDataViewModel(IViewSettings vs, IEnumerable<ProjectStatus> projects) { _viewName = vs.ViewName; _ShowOnlyBroken = vs.ShowOnlyBroken; _ShowOutOfDate = vs.ShowOutOfDate; _outOfDateDifferenceInMinutes = vs.OutOfDateDifferenceInMinutes; List<ProjectStatusViewModel> dummy = new List<ProjectStatusViewModel>(); foreach (Model.ProjectStatus p in projects) { dummy.Add(new ProjectStatusViewModel(p, vs)); } this.Projects = dummy; }
public ViewDataViewModel(IViewSettings vs, IEnumerable <ProjectStatus> projects) { _viewName = vs.ViewName; _ShowOnlyBroken = vs.ShowOnlyBroken; _ShowOutOfDate = vs.ShowOutOfDate; _outOfDateDifferenceInMinutes = vs.OutOfDateDifferenceInMinutes; List <ProjectStatusViewModel> dummy = new List <ProjectStatusViewModel>(); foreach (Model.ProjectStatus p in projects) { dummy.Add(new ProjectStatusViewModel(p, vs)); } this.Projects = dummy; }
public string CreateUpdatedXml(IViewSettings settings) { var view1 = _xdoc.Elements("configuration") .Elements("views") .Elements("view").First(); // only used to update a view when there is 1 var showOnlyBroken = view1.Attribute(ShowOnlyBroken); var showServerName = view1.Attribute(ShowServerName); var showOutOfDate = view1.Attribute(ShowOutOfDate); var outOfDateDifferenceInMinutes = view1.Attribute(OutOfDateDifferenceInMinutes); view1.Attribute(Url).Value = settings.URL; view1.Attribute(ProjectRegex).Value = settings.ProjectNameRegEx; view1.Attribute(CategoryRegex).Value = settings.CategoryRegEx; view1.Attribute(ServerRegex).Value = settings.ServerNameRegEx; view1.Attribute(Skin).Value = settings.SkinName; view1.Attribute(ViewName).Value = settings.ViewName; if (showOnlyBroken != null) { showOnlyBroken.Value = settings.ShowOnlyBroken.ToString(); } if (showServerName != null) { showServerName.Value = settings.ShowServerName.ToString(); } if (showOutOfDate != null) { showOutOfDate.Value = settings.ShowOutOfDate.ToString(); } if (outOfDateDifferenceInMinutes != null) { outOfDateDifferenceInMinutes.Value = settings.OutOfDateDifferenceInMinutes.ToString(); } var xml = new StringBuilder(); using (var xmlWriter = XmlWriter.Create(xml, new XmlWriterSettings { OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.None, Indent = true, })) { _xdoc.WriteTo(xmlWriter); } return(xml.ToString()); }
public string CreateUpdatedXml(IViewSettings settings) { var view1 = _xdoc.Elements("configuration") .Elements("views") .Elements("view").First(); // we only call this, when this assumption is valid view1.Attribute(Url).Value = settings.URL; view1.Attribute(ProjectRegex).Value = settings.ProjectNameRegEx; view1.Attribute(CategoryRegex).Value = settings.CategoryRegEx; view1.Attribute(Skin).Value = settings.SkinName; var xml = new StringBuilder(); using (var xmlWriter = XmlWriter.Create(xml, new XmlWriterSettings { OmitXmlDeclaration = true, NewLineHandling = NewLineHandling.None, Indent = true, })) { _xdoc.WriteTo(xmlWriter); } return(xml.ToString()); }
public TreeView(IViewSettings settings) { _settings = settings; }
void SetLocalValuesFromConfig(IConfigSettings newSettings) { _viewSettings = newSettings as IViewSettings; }
public TopView(IViewSettings settings) { _settings = settings; }
public ItemsView(IViewSettings settings) { _settings = settings; }
public BarEntryModel(Entry entry, IViewSettings viewSettings) { Entry = entry; _viewSettings = viewSettings; }