Beispiel #1
0
    protected override void OnCreated()
    {
        GameObject res = Resources.Load("Object/Window/ActionLog") as GameObject;
        GameObject obj = Object.Instantiate(res, new Vector3(0, 0, 0), Quaternion.identity) as GameObject;

        actionLogView = obj.GetComponent <ActionLogView>();
    }
Beispiel #2
0
        void BackupSetPropertyChanged(object sender, System.ComponentModel.PropertyChangedEventArgs e)
        {
            switch (e.PropertyName)
            {
            case "Status":
            {
                RaisePropertyChanged(() => ShowBackupRunDetails);
                RaisePropertyChanged(() => ActionLog2);
                RaisePropertyChanged(() => IsProgressBarVisible);
                RaisePropertyChanged(() => IsProcessRingVisible);
                return;
            }

            case "ProcessingStatus":
            {
                if (ProcessingStatus == BackupProcessingStatus.ActionQueueBuilt)
                {
                    //Task.Factory.StartNew(() =>
                    // {
                    ActionLog2           = new ObservableCollection <ActionLogItemViewModel>(ActionLog.Select(ba => new ActionLogItemViewModel(ba)));
                    ActionLogView        = (CollectionView)CollectionViewSource.GetDefaultView(ActionLog2);
                    ActionLogView.Filter = IsToBeShownInLog;
                    ActionLogView.Refresh();
                    RaisePropertyChanged(() => ActionLogView);
                    RaisePropertyChanged(() => IsProgressBarVisible);
                    RaisePropertyChanged(() => IsProcessRingVisible);

                    // ActionLog2 = new ChangeNotifyingObservableCollection<ActionLogItemViewModel>(ActionLog.Select(ba => new ActionLogItemViewModel(ba)));
                    //})
                    // .ContinueWith((t) =>
                    //{
                    RaisePropertyChanged(() => ActionLog2);
                    //});
                }
                return;
            }

            case "ProcessingProgressCount":
            {
                RaisePropertyChanged(() => ProcessingProgressMessage);
                return;
            }

            case "LastRunTime":
            {
                UpdateScheduleStatus();
                return;
            }

            case "ErrorCount":
            {
                UpdateScheduleStatus();
                return;
            }
            }
        }