123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- using ComPDFKitViewer;
- using PDF_Master.Properties;
- using PDFSettings;
- using Prism.Mvvm;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media;
- namespace PDF_Master.Model.SettingsDialog
- {
- public class InitialVIewModel:BindableBase
- {
- private ViewMode pageView;
- public ViewMode PageView
- {
- get { return pageView; }
- set
- {
- SetProperty(ref pageView, value);
- }
- }
- private FitMode zoomMode;
- public FitMode ZoomMode
- {
- get { return zoomMode; }
- set
- {
- SetProperty(ref zoomMode, value);
- }
- }
- private bool notShowBOTA;
- public bool NotShowBOTA
- {
- get { return notShowBOTA; }
- set
- {
- SetProperty(ref notShowBOTA, value);
- }
- }
- private bool rememberBOTA;
- public bool RememberBOTA
- {
- get { return rememberBOTA; }
- set
- {
- SetProperty(ref rememberBOTA, value);
- }
- }
- private bool isBOTAOpen;
- public bool IsBOTAOpen
- {
- get { return isBOTAOpen; }
- set
- {
- SetProperty(ref isBOTAOpen, value);
- }
- }
- private bool showOutLine;
- public bool ShowOutLine
- {
- get { return showOutLine; }
- set
- {
- SetProperty(ref showOutLine, value);
- }
- }
- private bool autoExpandProperty;
- public bool AutoExpandProperty
- {
- get { return autoExpandProperty; }
- set
- {
- SetProperty(ref autoExpandProperty, value);
- }
- }
- private bool clickOpenProperty;
- public bool ClickOpenProperty
- {
- get { return clickOpenProperty; }
- set
- {
- SetProperty(ref clickOpenProperty, value);
- }
- }
- private Color backGround;
- public Color BackGround
- {
- get { return backGround; }
- set
- {
- SetProperty(ref backGround, value);
- }
- }
- private Color backGroundInFulWindow;
- public Color BackGroundInFulWindow
- {
- get { return backGroundInFulWindow; }
- set
- {
- SetProperty(ref backGroundInFulWindow, value);
- }
- }
- private bool hignlightForm;
- public bool HignlightForm
- {
- get { return hignlightForm; }
- set
- {
- SetProperty(ref hignlightForm, value);
- }
- }
- private bool highlightLink;
- public bool HighlightLink
- {
- get { return highlightLink; }
- set
- {
- SetProperty(ref highlightLink, value);
- }
- }
- private Color formHighLightColor;
- public Color FormHighLightColor
- {
- get { return formHighLightColor; }
- set
- {
- SetProperty(ref formHighLightColor, value);
- }
- }
- private Color requiredFieldsColor;
- public Color RequiredFieldsColor
- {
- get { return requiredFieldsColor; }
- set
- {
- SetProperty(ref requiredFieldsColor, value);
- }
- }
- public InitialVIewModel()
- {
- InitFromSettings();
- }
- private void InitFromSettings()
- {
- var view = Settings.Default.AppProperties.InitialVIew;
- this.PageView = view.PageView;
- this.ZoomMode = view.ZoomMode;
- this.NotShowBOTA = view.NotShowBOTA;
- this.RememberBOTA = view.RememberBOTA;
- this.ShowOutLine = view.ShowOutLine;
- this.AutoExpandProperty =view.AutoExpandProperty;
- this.ClickOpenProperty = view.ClickOpenProperty;
- this.BackGround = view.BackGround;
- this.BackGroundInFulWindow = view.BackGroundInFulWindow;
- this.HignlightForm = view.HignlightForm;
- this.HighlightLink = view.HighlightLink;
- this.FormHighLightColor = view.FormHighLightColor;
- this.RequiredFieldsColor = view.RequiredFieldsColor;
- }
- public void Save()
- {
- InitialVIewPropertyClass view = new InitialVIewPropertyClass();
- view.PageView = this.PageView;
- view.ZoomMode = this.ZoomMode;
- view.NotShowBOTA = this.NotShowBOTA;
- view.RememberBOTA = this.RememberBOTA;
- view.ShowOutLine = this.ShowOutLine;
- view.AutoExpandProperty = this.AutoExpandProperty;
- view.ClickOpenProperty = this.ClickOpenProperty;
- view.BackGround = this.BackGround;
- view.BackGroundInFulWindow = this.BackGroundInFulWindow;
- view.HignlightForm = this.HignlightForm;
- view.HighlightLink = this.HighlightLink;
- view.FormHighLightColor = this.FormHighLightColor;
- view.RequiredFieldsColor = this.RequiredFieldsColor;
- Settings.Default.AppProperties.InitialVIew = view;
- }
- public void Reset()
- {
- var view = new InitialVIewPropertyClass();
- this.PageView = view.PageView;
- this.ZoomMode = view.ZoomMode;
- this.NotShowBOTA = view.NotShowBOTA;
- this.RememberBOTA = view.RememberBOTA;
- this.ShowOutLine = view.ShowOutLine;
- this.AutoExpandProperty = view.AutoExpandProperty;
- this.ClickOpenProperty = view.ClickOpenProperty;
- this.BackGround = view.BackGround;
- this.BackGroundInFulWindow = view.BackGroundInFulWindow;
- this.HignlightForm = view.HignlightForm;
- this.HighlightLink = view.HighlightLink;
- this.FormHighLightColor = view.FormHighLightColor;
- this.RequiredFieldsColor = view.RequiredFieldsColor;
- }
- }
- }
|