Пример #1
0
        public override void LoadData()
        {
            base.LoadData();

            this.adapter = new ViewModelsAdapter <TeamViewModel, TeamData>(m => new TeamViewModel(m));
            this.adapter.Adapt(this.Teams, this.Parent.Data.TeamList);

            this.Subjects = this.Parent.Data.Early.Subjects;

            var baseDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);

            {
                this.pushSound.FilePath = PathUtility.GetAbsolutePath(baseDir, this.Parent.Data.Early.PushPath);
                this.pushSound.LoadFile();
            }
            {
                this.correctSound.FilePath = PathUtility.GetAbsolutePath(baseDir, this.Parent.Data.Early.CorrectPath);
                this.correctSound.LoadFile();
            }
            {
                this.missSound.FilePath = PathUtility.GetAbsolutePath(baseDir, this.Parent.Data.Early.IncorrectPath);
                this.missSound.LoadFile();
            }
            {
                this.questionSound.FilePath = PathUtility.GetAbsolutePath(baseDir, this.Parent.Data.Early.QuestionPath);
                this.questionSound.LoadFile();
            }
            this.Parent.Data.Early.PropertyChanged += Early_PropertyChanged;
        }
Пример #2
0
        public OperateOrderVM(MainVM parent)
            : base(parent)
        {
            this.View   = new OperateOrderView();
            this.Header = "並び替え";

            this.OpenWinnerCommand    = new DelegateCommand(OpenWinner, CanSelectedMedia);
            this.OpenOtherCommand     = new DelegateCommand(OpenOther, CanSelectedMedia);
            this.OpenAnswer1Command   = new DelegateCommand(OpenAnswer1, CanSelectedMedia);
            this.OpenAnswer2Command   = new DelegateCommand(OpenAnswer2, CanSelectedMedia);
            this.OpenAnswerAllCommand = new DelegateCommand(OpenAnswerAll, CanSelectedMedia);
            this.ResetCommand         = new DelegateCommand(Reset, CanSelectedMedia);

            this.adapter = new ViewModelsAdapter <TeamOrderVM, TeamData>(CreateTeamSortVM);

            this.playOtherView = new PlayOtherOrderView()
            {
                DataContext = this
            };
            this.playWinnerView = new PlayWinnerOrderView()
            {
                DataContext = this
            };

            this.PlayView = this.playWinnerView;
        }
Пример #3
0
        public override void LoadData()
        {
            base.LoadData();

            this.teamAdapter = new ViewModelsAdapter <CommonTeamVM, TeamData>(CreateTeamVM, DeleteTeamVM);
            this.teamAdapter.Adapt(this.Teams, this.Parent.Data.TeamList);
        }
Пример #4
0
        public override void LoadData()
        {
            base.LoadData();

            this.Parent.Data.PropertyChanged += Data_PropertyChanged;

            this.teamAdapter = new ViewModelsAdapter <TeamChoiceVM, TeamData>(CreateTeamVM);
            this.teamAdapter.Adapt(this.Teams, this.Parent.Data.TeamList);

            if (!string.IsNullOrEmpty(this.Parent.Data.StandSoundPath))
            {
                this.StandSound          = new MediaVM();
                this.StandSound.FilePath = this.Parent.Data.StandSoundPath;
                this.StandSound.LoadFile();
            }

            if (!string.IsNullOrEmpty(this.Parent.Data.QuestionSoundPath))
            {
                this.QuestionSound          = new MediaVM();
                this.QuestionSound.FilePath = this.Parent.Data.QuestionSoundPath;
                this.QuestionSound.LoadFile();
            }

            if (!string.IsNullOrEmpty(this.Parent.Data.CheckSoundPath))
            {
                this.checkSound          = new MediaVM();
                this.checkSound.FilePath = this.Parent.Data.CheckSoundPath;
                this.checkSound.LoadFile();
            }

            LoadVideos();
        }
Пример #5
0
        public EarlySettingTabViewModel(MainVM parent) : base(parent)
        {
            this.View   = new EarlySettingTabView();
            this.Header = "早押し設定";

            this.OpenPushPathCommand      = new DelegateCommand(OpenPushPath);
            this.OpenCorrectPathCommand   = new DelegateCommand(OpenCorrectPath);
            this.OpenIncorrectPathCommand = new DelegateCommand(OpenIncorrectPath);
            this.OpenQuestionPathCommand  = new DelegateCommand(OpenQuestionPath);

            this.AddSubjectCommand  = new DelegateCommand(AddSubject);
            this.RemSubjectCommand  = new DelegateCommand(RemSubject, CanRemSubject);
            this.UpSubjectCommand   = new DelegateCommand(UpSubject, CanUpSubject);
            this.DownSubjectCommand = new DelegateCommand(DownSubject, CanDownSubject);

            this.Subjects = new ObservableVMCollection <SubjectData, SubjectViewModel>();

            this.adapter = new ViewModelsAdapter <SubjectViewModel, SubjectData>(m => new SubjectViewModel(m));
        }
Пример #6
0
        public BinkanOperateTabViewModel(MainVM parent) : base(parent)
        {
            this.Header = "ビンカン";
            this.View   = new BinkanOperateTabView();

            this.mediaAdapter = new ViewModelsAdapter <MediaVM, string>(CreateMediaViewModel, DeleteMediaViewModel);
            this.teamAdapter  = new ViewModelsAdapter <TeamViewModel, TeamData>(CrateTeamViewModel);

            this.Medias = new ObservableCollection <MediaVM>();
            this.Teams  = new ObservableVMCollection <TeamData, TeamViewModel>();

            this.PlayOrPauseCommand = new DelegateCommand(PlayOrPause, p => this.SelectedMedia != null);
            this.CorrectCommand     = new DelegateCommand(Correct, p => this.AnswerMember != null);
            this.IncorrectCommand   = new DelegateCommand(Incorrect, p => this.AnswerMember != null);

            this.questionSound.MediaStoped += QuestionSound_MediaStoped;

            this.PlayView = new BinkanPlayView();
        }
Пример #7
0
 public TeamViewModel(TeamData model) : base(model)
 {
     this.adapter = new ViewModelsAdapter <MemberViewModel, MemberData>(CreateMemberVM, DeleteMemberVM);
 }
Пример #8
0
 public CommonTeamVM(TeamData data)
     : base(data)
 {
     this.adapter = new ViewModelsAdapter <CommonMemberVM, MemberData>(CreateMemberVM);
 }