Exemplo n.º 1
0
 /* ----------------------------------------------------------------- */
 ///
 /// MainViewModel
 ///
 /// <summary>
 /// オブジェクトを初期化します。
 /// </summary>
 ///
 /* ----------------------------------------------------------------- */
 public MainViewModel(SettingsFolder settings) : base(new Messenger())
 {
     Model      = new MainFacade(settings, SynchronizationContext.Current);
     DropTarget = new RssDropTarget((s, d, i) => Model.Move(s, d, i))
     {
         IsReadOnly = Data.Lock.Value.IsReadOnly
     };
 }
Exemplo n.º 2
0
        /* ----------------------------------------------------------------- */
        ///
        /// UpdateChecker
        ///
        /// <summary>
        /// オブジェクトを初期化します。
        /// </summary>
        ///
        /// <param name="settings">設定用オブジェクト</param>
        ///
        /* ----------------------------------------------------------------- */
        public UpdateChecker(SettingsFolder settings)
        {
            var io  = settings.IO;
            var asm = Assembly.GetExecutingAssembly().GetReader();
            var dir = io.Get(asm.Location).DirectoryName;

            FileName = io.Combine(dir, "UpdateChecker.exe");
            Settings = settings;

            _timer.Interval = TimeSpan.FromDays(1);
            _timer.Subscribe(WhenTick);

            if (settings.Shared.CheckUpdate)
            {
                Start();
            }
        }
Exemplo n.º 3
0
 /* ----------------------------------------------------------------- */
 ///
 /// RssBindableData
 ///
 /// <summary>
 /// オブジェクトを初期化します。
 /// </summary>
 ///
 /// <param name="root">ルートオブジェクト</param>
 /// <param name="settings">設定用オブジェクト</param>
 /// <param name="context">同期用コンテキスト</param>
 ///
 /* ----------------------------------------------------------------- */
 public MainBindableData(IEnumerable <IRssEntry> root,
                         SettingsFolder settings, SynchronizationContext context)
 {
     Root    = root;
     Lock    = settings.Lock.ToBindable(context);
     Local   = settings.Value.ToBindable(context);
     Shared  = settings.Shared.ToBindable(context);
     Current = new Bindable <IRssEntry> {
         Context = context
     };
     LastEntry = new Bindable <RssEntry> {
         Context = context
     };
     Content = new Bindable <object> {
         Context = context
     };
     Message = new Bindable <string> {
         Context = context
     };
 }
Exemplo n.º 4
0
 /* ----------------------------------------------------------------- */
 ///
 /// SettingsViewModel
 ///
 /// <summary>
 /// オブジェクトを初期化します。
 /// </summary>
 ///
 /* ----------------------------------------------------------------- */
 public SettingsViewModel(SettingsFolder settings) : base(new Messenger())
 {
     Model  = settings;
     Local  = settings.Value.ToBindable();
     Shared = settings.Shared.ToBindable();
 }