Beispiel #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
            };
        }
Beispiel #2
0
            public static void Postfix(InventoryGui __instance)
            {
                foreach (var tabController in CustomTabs())
                {
                    tabController.OnDestroy();
                }
                TabControllers.Clear();
                OtherTabs.Clear();

                __instance.StopCoroutine(UpdateTabPositionCoroutine);
                UpdateTabPositionCoroutine = null;
            }
Beispiel #3
0
        public void ShowTogether(WorkspaceVmBase naviVm
                                 , WorkspaceVmBase mainVm
                                 , WorkspaceVmBase othrVm)
        {
            if (naviVm != null)
            {
                naviVm.IsSelectedChanged += (s, e) =>
                {
                    if (e.Value)
                    {
                        MainTabs?.MakeCurrent(mainVm);
                        OtherTabs?.MakeCurrent(othrVm);
                    }
                };
            }

            if (mainVm != null)
            {
                mainVm.IsSelectedChanged += (s, e) =>
                {
                    if (e.Value)
                    {
                        NaviTabs?.MakeCurrent(naviVm);
                        OtherTabs?.MakeCurrent(othrVm);
                    }
                };
            }

            if (othrVm != null)
            {
                othrVm.IsSelectedChanged += (s, e) =>
                {
                    if (e.Value)
                    {
                        NaviTabs?.MakeCurrent(naviVm);
                        MainTabs?.MakeCurrent(mainVm);
                    }
                };
            }
        }