public ItemContext(MiniMonglerApp app, Mini miniature, IEnumerable <string> allTags)
        {
            this.app     = app;
            Miniature    = miniature;
            this.allTags = allTags.Except(miniature.Tags);

            this.SaveCommand       = new LambdaCommand((l, p) => CanSave, (l, p) => Save());
            this.AddPictureCommand = new LambdaCommand(CanAddPicture, (l, p) => AddPicture());
            this.AddTagCommand     = new LambdaCommand(CanAddTag, AddTag);
        }
Beispiel #2
0
        public SearchItemsContext(MiniMonglerApp app, string workingDirectory, IEnumerable <Mini> minis)
        {
            this.app = app;
            this.WorkingDirectory = workingDirectory;

            Minis = minis.Select(CreateMiniContext).ToList();

            this.AddMiniCommand = new LambdaCommand(
                (l, p) => app.ShowAddMini()
                );
        }
Beispiel #3
0
        public SelectWorkingDirectoryContext(MiniMonglerApp app, string priorWorkingDirectory)
        {
            this.app = app;

            SaveCommand = new LambdaCommand(
                (l, p) => CanSave,
                (l, p) => Save()
                );

            this.WorkingDirectory = priorWorkingDirectory;
        }
        public HomeContext(bool canSearch, MiniMonglerApp app)
        {
            this.CanSearch = canSearch;

            this.GoToSearchCommand = new LambdaCommand(
                (l, p) => CanSearch,
                (l, p) => app.ShowSearch()
                );

            this.GoToSelectWorkingDirectoryCommand = new LambdaCommand(
                (l, p) => app.ShowWorkingDirectorySelection()
                );
        }
 public MainContext(MiniMonglerApp app)
 {
     this.app = app;
 }