Exemple #1
0
        public WindowViewModel(App app, MainWindow window)
        {
            this.models = new Models.Models(app, window, this);

            // controller
            this.paintController = new PaintController(models);

            // model views
            Images     = new ImagesViewModel(models, this);
            Display    = new DisplayViewModel(models);
            Equations  = new EquationsViewModel(models);
            Progress   = new ProgressViewModel(models);
            Filter     = new FiltersViewModel(models);
            Statistics = new StatisticsViewModel(models);

            // commands
            var import = new ImportImageCommand(models, this);

            ImportCommand = import;
            ResizeCommand = new ResizeWindowCommand(models);
            ImportEquationImageCommand = new ImportEquationImageCommand(models);
            OpenCommand             = new OpenImageCommand(models, import);
            ExportCommand           = new ExportImageCommand(models);
            AddFilterCommand        = new AddFilterCommand(models, Filter);
            ShowPixelDisplayCommand = new ShowPixelDialogCommand(models);
            ShowPixelColorCommand   = new ShowPixelColorCommand(models);
            GenerateMipmapsCommand  = new GenerateMipmapsCommand(models);
            DeleteMipmapsCommand    = new DeleteMipmapsCommand(models);

            window.KeyUp += WindowOnKeyUp;
            models.GlContext.GlControl.DragDrop += GlControlOnDragDrop;

            HelpAboutCommand        = new HelpCommand("help\\about.md");
            HelpEquationCommand     = new HelpCommand("help\\equation.md");
            HelpFilterManualCommand = new HelpCommand("help\\filter_manual.md");
        }
Exemple #2
0
 public FilterItem(FiltersViewModel parent, FilterModel model, ImagesModel images)
 {
     Model      = model;
     Parameters = new FilterParametersViewModel(model, images);
     ListView   = new FilterListBoxItem(parent, model, Parameters);
 }