Пример #1
0
 public PaintZone(double width, double height)
 {
     this.theme = Theme.Default();
     this.paintZoneData = BitmapFactory.New(width.Round(), height.Round());
     this.tracker = new MouseTracker();
     this.tracker.OnMouseMoove += new MouseTracker.OnMouseMooveHandler(this.HandleMouseMoove);
     this.tracker.OnMouseStill += new MouseTracker.OnMouseStillHandler(this.HandleMouseStill);
     this.stillCounter = 0;
     this.ResetImage();
 }
 public ThemeEditorViewModel(Theme currentTheme)
 {
     this.quantumColor = currentTheme.QuantumColorPick;
     this.radiusFactor = currentTheme.RadiusFactor;
     this.colors = new ObservableCollection<ColorEditorViewModel>();
     foreach (var color in currentTheme.ColorsSrc)
     {
         var colorEditor = new ColorEditorViewModel(color);
         colorEditor.OnDown += this.OnDownHandler;
         colorEditor.OnUp += this.OnUpHandler;
         colorEditor.OnDelete += this.OnDeleteHandler;
         this.colors.Add(colorEditor);
     }
     this.ResetColorEditorsProperties();
     this.styles = currentTheme.Styles;
     this.commands = new ThemeEditorCommands();
     this.commands.OnOk += this.OkHandler;
     this.commands.OnSave += this.SaveHandler;
     this.commands.OnCancel += this.CancelHandler;
 }
Пример #3
0
 private void EditFinishedHandler(Theme sender)
 {
     this.paintZone.Theme = sender;
 }