public UpdateViewModel()
        {
            _checkedPaths = new ObservableCollection <UpdateModel>();

            ProcessSelectedCmd = new DoStuffCommand(() =>
                                                    ProcessPath(SelectedPathModel), obj => true);
            MergeMatchCmd = new DoStuffCommand(MergeMatchRecords, obj => true);

            SuperTimer           = new DispatcherTimer();
            SuperTimer.Interval  = TimeSpan.FromSeconds(2);
            SuperTimer.Tick     += SuperTimer_Tick;
            SuperTimer.IsEnabled = true;

            Records = new RecordedMatch[6];

            bool prettifySetup = false;

            RedA  = new TeamIndicator(false, -1);
            RedB  = new TeamIndicator(false, -1);
            RedC  = new TeamIndicator(false, -1);
            BlueA = new TeamIndicator(true, -1);
            BlueB = new TeamIndicator(true, -1);
            BlueC = new TeamIndicator(true, -1);

            if (prettifySetup)
            {
                RedA.IsReady  = true;
                RedC.IsReady  = true;
                BlueB.IsReady = true;
                BlueA.IsReady = true;
            }

            _processAllNewFolders = false;
        }
        public EventViewModel()
        {
            SelectPathCmd = new DoStuffCommand(UILoadEvent, obj => true);
            NewEventCmd   = new DoStuffCommand(NewEvent, obj => true);

            BreakCmd = new DoStuffCommand(Break, (o) => true);

            LoadDefault();
        }
예제 #3
0
        // CTOR
        public MatchViewModel()
        {
            MatchModel.ViewModel = this;

            BreakCmd = new DoStuffCommand(Break, obj => true);

            TeamPickCmd = new DoStuffWithStuffCommand((stuffWith) =>
                                                      { OnTeamPick(stuffWith as string); }, obj => true);
            NewMatchCmd    = new DoStuffCommand(MakeNewMatch, obj => true);
            DeleteMatchCmd = new DoStuffCommand(DeleteMatch, obj => true);
            CellEditedCmd  = new DoStuffCommand(OnCellEdited, obj => true);
        }
        public TeamsViewModel()
        {
            ScoutingJson.Initialize(false);

            BreakCmd         = new DoStuffCommand(Break, obj => true);
            OpenTeamsFileCmd = new DoStuffCommand(OpenFile, obj => true);
            CellEditedCmd    = new DoStuffCommand(OnDataGridCellChanged, obj => true);
            NewTeamCmd       = new DoStuffCommand(OnNewTeamBtn_Clicked, obj => true);
            DeleteTeamCmd    = new DoStuffCommand(OnDeleteTeamBtn_Clicked, obj => true);

            PropertyChanged += SelectedTeam_Changed;
            PropertyChanged += TeamsList_Changed;
            PropertyChanged += TeamsPath_Changed;
            PropertyChanged += TeamsList_Adjusted;

            // Load Default
            FilePath = ScoutingJson.LocalPath + "Teams" +
                       ScoutingJson.TeamsListExtension;
        }
		public EventViewModel()
		{
			SelectPathCmd = new DoStuffCommand(UILoadEvent, obj => true);
			NewEventCmd = new DoStuffCommand(NewEvent, obj => true);

			BreakCmd = new DoStuffCommand(Break, (o) => true);

			LoadDefault();
		}
		public UpdateViewModel()
		{
			_checkedPaths = new ObservableCollection<UpdateModel>();

			ProcessSelectedCmd = new DoStuffCommand(() => 
				ProcessPath(SelectedPathModel), obj => true);
			MergeMatchCmd = new DoStuffCommand(MergeMatchRecords, obj => true);

			SuperTimer = new DispatcherTimer();
			SuperTimer.Interval = TimeSpan.FromSeconds(2);
			SuperTimer.Tick += SuperTimer_Tick;
			SuperTimer.IsEnabled = true;

			Records = new RecordedMatch[6];

			bool prettifySetup = false;

			RedA = new TeamIndicator(false, -1);
			RedB = new TeamIndicator(false, -1);
			RedC = new TeamIndicator(false, -1);
			BlueA = new TeamIndicator(true, -1);
			BlueB = new TeamIndicator(true, -1);
			BlueC = new TeamIndicator(true, -1);
			
			if (prettifySetup)
			{
				RedA.IsReady = true;
				RedC.IsReady = true;
				BlueB.IsReady = true;
				BlueA.IsReady = true;
			}

			_processAllNewFolders = false;
		}
		public TeamsViewModel()
		{
			ScoutingJson.Initialize(false);

			BreakCmd = new DoStuffCommand(Break, obj => true);
			OpenTeamsFileCmd = new DoStuffCommand(OpenFile, obj => true);
			CellEditedCmd = new DoStuffCommand(OnDataGridCellChanged, obj => true);
			NewTeamCmd = new DoStuffCommand(OnNewTeamBtn_Clicked, obj => true);
			DeleteTeamCmd = new DoStuffCommand(OnDeleteTeamBtn_Clicked, obj => true);

			PropertyChanged += SelectedTeam_Changed;
			PropertyChanged += TeamsList_Changed;
			PropertyChanged += TeamsPath_Changed;
			PropertyChanged += TeamsList_Adjusted;

			// Load Default
			FilePath = ScoutingJson.LocalPath + "Teams" + 
				ScoutingJson.TeamsListExtension;
		}
		// CTOR
		public MatchViewModel()
		{
			MatchModel.ViewModel = this;

			BreakCmd = new DoStuffCommand(Break, obj => true);

			TeamPickCmd = new DoStuffWithStuffCommand((stuffWith) => 
				{ OnTeamPick(stuffWith as string); }, obj => true);
			NewMatchCmd = new DoStuffCommand(MakeNewMatch, obj => true);
			DeleteMatchCmd = new DoStuffCommand(DeleteMatch, obj => true);
			CellEditedCmd = new DoStuffCommand(OnCellEdited, obj => true);
		}