상속: ViewModelBase
예제 #1
0
        public static ProfileStatusViewModel CreateDesignInstance(string profileName, SyncronizationRunResult?status, int?lastRunMinutesAgo)
        {
            var viewModel = new ProfileStatusViewModel(Guid.NewGuid(), NullCalDavSynchronizerCommands.Instance);

            viewModel._profileName       = profileName;
            viewModel._lastResult        = status;
            viewModel._lastRunMinutesAgo = lastRunMinutesAgo;
            viewModel.IsActive           = true;
            return(viewModel);
        }
 ProfileStatusViewModel GetOrCreateProfileStatusViewModel (Guid profileId)
 {
   ProfileStatusViewModel profileStatusViewModel;
   if (!_profileStatusViewModelsById.TryGetValue (profileId, out profileStatusViewModel))
   {
     profileStatusViewModel = new ProfileStatusViewModel (profileId, _calDavSynchronizerCommands);
     Profiles.Add (profileStatusViewModel);
     _profileStatusViewModelsById.Add (profileId, profileStatusViewModel);
   }
   return profileStatusViewModel;
 }
예제 #3
0
        ProfileStatusViewModel GetOrCreateProfileStatusViewModel(Guid profileId)
        {
            ProfileStatusViewModel profileStatusViewModel;

            if (!_profileStatusViewModelsById.TryGetValue(profileId, out profileStatusViewModel))
            {
                profileStatusViewModel = new ProfileStatusViewModel(profileId, _calDavSynchronizerCommands);
                Profiles.Add(profileStatusViewModel);
                _profileStatusViewModelsById.Add(profileId, profileStatusViewModel);
            }
            return(profileStatusViewModel);
        }
 public static ProfileStatusViewModel CreateDesignInstance (string profileName, SyncronizationRunResult? status, int? lastRunMinutesAgo)
 {
   var viewModel = new ProfileStatusViewModel (Guid.NewGuid(), NullCalDavSynchronizerCommands.Instance);
   viewModel._profileName = profileName;
   viewModel._lastResult = status;
   viewModel._lastRunMinutesAgo = lastRunMinutesAgo;
   viewModel.IsActive = true;
   return viewModel;
 }