コード例 #1
0
ファイル: FileViewModel.cs プロジェクト: 24093/WinTag
        public FileViewModel(string fileName, IPersistanceModel persistanceModel, ITagsModel tagsModel)
        {
            Name                           = fileName;
            _tagsModel                     = tagsModel;
            _persistanceModel              = persistanceModel;
            _persistanceModel.FileChanged += PersistanceModelOnFileChanged;

            AddTagCommand    = new GalaSoft.MvvmLight.Command.RelayCommand <TagViewModel>(ExecuteAddTagCommand);
            DeleteTagCommand = new RelayCommand <TagViewModel>(ExecuteDeleteTagCommand);
        }
コード例 #2
0
ファイル: FileListViewModel.cs プロジェクト: 24093/WinTag
        public FileListViewModel(IPersistanceModel persistanceModel, ITagsModel tagsModel)
        {
            _tagsModel        = tagsModel;
            _persistanceModel = persistanceModel;
            _persistanceModel.FilesChanged += PersistanceModelOnFilesChanged;

#if DEBUG
            _persistanceModel.Load(Environment.CurrentDirectory);
#endif
        }
コード例 #3
0
ファイル: TagCloudViewModel.cs プロジェクト: 24093/WinTag
        public TagCloudViewModel(ITagsModel tagsModel)
        {
            _tagsModel = tagsModel;

            foreach (var tag in _tagsModel.Tags)
            {
                Tags.Add(new TagViewModel(tag));
            }

            AddCommand = new RelayCommand <string>(ExecuteAddCommand);
        }