|
@@ -6,8 +6,7 @@ using System.Collections.Generic;
|
|
using System.Windows;
|
|
using System.Windows;
|
|
using System.Windows.Input;
|
|
using System.Windows.Input;
|
|
using System.Windows.Media;
|
|
using System.Windows.Media;
|
|
-using System.Windows.Media.Imaging;
|
|
|
|
-using PixiTools = PixiEditor.Models.Tools.Tools;
|
|
|
|
|
|
+using System.Windows.Media.Imaging;
|
|
using PixiEditor.Models.Controllers;
|
|
using PixiEditor.Models.Controllers;
|
|
using PixiEditor.Models.Dialogs;
|
|
using PixiEditor.Models.Dialogs;
|
|
using PixiEditor.Models.IO;
|
|
using PixiEditor.Models.IO;
|
|
@@ -15,6 +14,7 @@ using PixiEditor.Models.Position;
|
|
using PixiEditor.Models.DataHolders;
|
|
using PixiEditor.Models.DataHolders;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
using System.Collections.ObjectModel;
|
|
using System.Collections.ObjectModel;
|
|
|
|
+using PixiEditor.Models.Tools.Tools;
|
|
|
|
|
|
namespace PixiEditor.ViewModels
|
|
namespace PixiEditor.ViewModels
|
|
{
|
|
{
|
|
@@ -122,13 +122,23 @@ namespace PixiEditor.ViewModels
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
-
|
|
|
|
public BitmapManager BitmapManager { get; set; }
|
|
public BitmapManager BitmapManager { get; set; }
|
|
public PixelChangesController ChangesController { get; set; }
|
|
public PixelChangesController ChangesController { get; set; }
|
|
|
|
|
|
public ShortcutController ShortcutController { get; set; }
|
|
public ShortcutController ShortcutController { get; set; }
|
|
-
|
|
|
|
|
|
+ private Selection _selection = new Selection();
|
|
|
|
+
|
|
|
|
+ public Selection ActiveSelection
|
|
|
|
+ {
|
|
|
|
+ get => _selection;
|
|
|
|
+ set
|
|
|
|
+ {
|
|
|
|
+ _selection = value;
|
|
|
|
+ RaisePropertyChanged("ActiveSelection");
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
public ViewModelMain()
|
|
public ViewModelMain()
|
|
{
|
|
{
|
|
PixiFilesManager.InitializeTempDirectories();
|
|
PixiFilesManager.InitializeTempDirectories();
|
|
@@ -154,8 +164,8 @@ namespace PixiEditor.ViewModels
|
|
SwapColorsCommand = new RelayCommand(SwapColors);
|
|
SwapColorsCommand = new RelayCommand(SwapColors);
|
|
KeyDownCommand = new RelayCommand(KeyDown);
|
|
KeyDownCommand = new RelayCommand(KeyDown);
|
|
RenameLayerCommand = new RelayCommand(RenameLayer);
|
|
RenameLayerCommand = new RelayCommand(RenameLayer);
|
|
- ToolSet = new ObservableCollection<Tool> { new PixiTools.PenTool(), new PixiTools.FloodFill(), new PixiTools.LineTool(),
|
|
|
|
- new PixiTools.CircleTool(), new PixiTools.RectangleTool(), new PixiTools.EarserTool(), new PixiTools.ColorPickerTool(), new PixiTools.BrightnessTool() };
|
|
|
|
|
|
+ ToolSet = new ObservableCollection<Tool> { new SelectTool(), new PenTool(), new FloodFill(), new LineTool(),
|
|
|
|
+ new CircleTool(), new RectangleTool(), new EarserTool(), new ColorPickerTool(), new BrightnessTool()};
|
|
ShortcutController = new ShortcutController
|
|
ShortcutController = new ShortcutController
|
|
{
|
|
{
|
|
Shortcuts = new List<Shortcut> {
|
|
Shortcuts = new List<Shortcut> {
|