Exemple #1
0
 public void Dispose()
 {
     if (ActiveView == this)
     {
         ActiveView = null;
     }
     if (this.MainCanvas != null)
     {
         this.MainCanvas.clean();
         this.MainCanvas = null;
     }
     if (this.TempCanvas != null)
     {
         this.TempCanvas.clean();
         this.TempCanvas = null;
     }
     if (_view != null)
     {
         this.CoreView.destoryView(_view);
         _view.Dispose();
         _view = null;
     }
     if (this.CoreView != null)
     {
         this.CoreView.Dispose();
         this.CoreView = null;
     }
     WPFImageSourceHelper.Clean();
 }
Exemple #2
0
        public WPFGraphView(Panel container)
        {
            this.CoreView = new GiCoreView();
            this._view = new WPFViewAdapter(this);
            this.CoreView.createView(this._view);

            MainCanvas = new WPFMainCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight };
            TempCanvas = new WPFTempCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight };
            TempCanvas.Background = new SolidColorBrush(Colors.Transparent);

            container.Children.Add(MainCanvas);
            container.Children.Add(TempCanvas);
            Panel.SetZIndex(TempCanvas, 1);

            container.SizeChanged += new SizeChangedEventHandler(container_SizeChanged);
            this.CoreView.onSize(_view, (int)container.ActualWidth, (int)container.ActualHeight);
        }
Exemple #3
0
        private void init(Panel container)
        {
            MainCanvas = new WPFMainCanvas(this.CoreView, _view)
            {
                Width = container.ActualWidth, Height = container.ActualHeight
            };
            TempCanvas = new WPFTempCanvas(this.CoreView, _view)
            {
                Width = container.ActualWidth, Height = container.ActualHeight
            };
            TempCanvas.Background = new SolidColorBrush(Colors.Transparent);

            container.Children.Add(MainCanvas);
            container.Children.Add(TempCanvas);
            Panel.SetZIndex(TempCanvas, 1);

            container.SizeChanged += new SizeChangedEventHandler(container_SizeChanged);
            this.CoreView.onSize(_view, (int)container.ActualWidth, (int)container.ActualHeight);
        }
Exemple #4
0
        private void init(Panel container)
        {
            MainCanvas = new WPFMainCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight };
            TempCanvas = new WPFTempCanvas(this.CoreView, _view) { Width = container.ActualWidth, Height = container.ActualHeight };
            TempCanvas.Background = new SolidColorBrush(Colors.Transparent);

            container.Children.Add(MainCanvas);
            container.Children.Add(TempCanvas);
            Panel.SetZIndex(TempCanvas, 1);

            container.SizeChanged += new SizeChangedEventHandler(container_SizeChanged);
            this.CoreView.onSize(_view, (int)container.ActualWidth, (int)container.ActualHeight);
        }