Esempio n. 1
0
 private void OnIvalidateLayer(InvalidateLayerEventArgs eventArgs)
 {
     if (DrawLayerBuffer != null)
     {
         DrawLayerBuffer(this, eventArgs);
     }
 }
Esempio n. 2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Invalidate(object sender, InvalidateLayerEventArgs e)
 {
     Dispatcher.Invoke(
         () =>
     {
         this.InvalidateVisual();
     });
 }
Esempio n. 3
0
    public LayerContainerViewModel(IServiceProvider?serviceProvider) : base(serviceProvider)
    {
        _invalidateLayerEventArgs = new InvalidateLayerEventArgs(this);

        AddLayer = new Command <FrameContainerViewModel?>(x => GetProject()?.OnAddLayer(x));

        RemoveLayer = new Command <LayerContainerViewModel?>(x => GetProject()?.OnRemoveLayer(x));

        ProjectContainerViewModel?GetProject() => ServiceProvider.GetService <ProjectEditorViewModel>()?.Project;
    }
Esempio n. 4
0
        public void Invalidate_Sets_EventArgs()
        {
            var target = _factory.CreateLayerContainer("Layer1");

            InvalidateLayerEventArgs args = null;

            target.InvalidateLayerHandler += (sender, e) =>
            {
                args = e;
            };

            target.InvalidateLayer();

            Assert.NotNull(args);
            Assert.True(args is InvalidateLayerEventArgs);
        }
Esempio n. 5
0
        public void Invalidate_Sets_EventArgs()
        {
            var target = XLayer.Create("Layer1");

            InvalidateLayerEventArgs args = null;

            target.InvalidateLayer += (sender, e) =>
            {
                args = e;
            };

            target.Invalidate();

            Assert.NotNull(args);
            Assert.True(args is InvalidateLayerEventArgs);
        }
Esempio n. 6
0
 private void Invalidate(object sender, InvalidateLayerEventArgs e) => Dispatcher.Invoke(() => InvalidateVisual());
Esempio n. 7
0
 private void ObserveInvalidateLayer(object sender, InvalidateLayerEventArgs e)
 {
     _editor?.Invalidate?.Invoke();
 }
Esempio n. 8
0
 private void ObserveInvalidateLayer(object sender, InvalidateLayerEventArgs e)
 {
     _editor?.CanvasPlatform?.Invalidate?.Invoke();
 }
Esempio n. 9
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void InvalidateLayerObserver(object sender, InvalidateLayerEventArgs e)
 {
     if (_editor.Invalidate != null)
     {
         _editor.Invalidate();
     }
 }
Esempio n. 10
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Invalidate(object sender, InvalidateLayerEventArgs e)
 {
     Dispatcher.Invoke(
         () =>
         {
             this.InvalidateVisual();
         });
 }
Esempio n. 11
0
 private void Invalidate(object sender, InvalidateLayerEventArgs e) => Dispatcher.Invoke(() => InvalidateVisual());
Esempio n. 12
0
 private void OnIvalidateLayer(InvalidateLayerEventArgs eventArgs)
 {
     if (DrawLayerBuffer != null)
     {
         DrawLayerBuffer(this, eventArgs);
     }
 }