Exemplo n.º 1
0
        //public bool IsCompleteInfo
        //    => UserSession?.AuthFile?.IsCompleteInfo ?? false;



        public MainWindowVM(ISessionClient d7Client, LogScrollerVM logScroller, UserSessionVM userSessionVM)
            : base(userSessionVM)
        {
            DisplayName = "ErrH Uploader (2nd attempt)";
            OtherTabs.Add(logScroller.ListenTo(this));

            CompletelyLoaded += (src, ea) =>
            {
                UserSession.SetClient(d7Client);

                var foldrsTab = ForwardLogs(IoC.Resolve <FoldersTabVM>());

                foldrsTab.MainList.ItemPicked += (s, e) =>
                { ShowSingleton <FilesTabVM2>(e.Value, IoC); };

                NaviTabs.Add(foldrsTab);
                NaviTabs.SelectOne(0);
                foldrsTab.Refresh();

                //OtherTabs.Add(BatRunner());
                //OtherTabs.SelectOne(1);
                //RaisePropertyChanged(nameof(IsCompleteInfo));
                //UserSession.ra
            };
        }
Exemplo n.º 2
0
        public BinUpdaterVM(IRepository <SyncableFileRemote> filesRepo,
                            AppFileGrouper fileGrouper,
                            IFileSynchronizer fileSynchronizer,
                            BinUpdaterCfgFile cfgFile,
                            UpdaterSessionVM usrSessionVm,
                            ID7Client d7Client,
                            LogScrollerVM logScroller)
        {
            DisplayName   = "Bin Updater";
            _d7Client     = ForwardLogs(d7Client);
            _grouper      = ForwardLogs(fileGrouper);
            _synchronizer = ForwardLogs(fileSynchronizer);
            _remotes      = ForwardLogs(filesRepo);
            _cfgFile      = ForwardLogs(cfgFile);
            UserSession   = ForwardLogs(usrSessionVm);
            UpdateNowCmd  = AsyncCommand.Create(tkn => UpdateNow(tkn));

            LogScroller = logScroller.ListenTo(this);
        }