Пример #1
0
        public EcosystemExplorerWindow()
        {
            InitializeComponent();

            Icon = Icons.GetIcon(1815);

            zoomToOneHImage.Source      = Icons.GetIcon(491);
            zoomToFullImage.Source      = Icons.GetIcon(492);
            autoScrollImage.Source      = Icons.GetIcon(1502);
            drawCellImage.Source        = Icons.GetIcon(1536);
            perspectiveViewImage.Source = Icons.GetIcon(65);
            iconsViewImage.Source       = Icons.GetIcon(327);
            transparentViewImage.Source = Icons.GetIcon(463);
            duplicateWindowImage.Source = Icons.GetIcon(1263);

            //Временно для теста нод ----------
            ThingsManager ThingsManager = new ThingsManager();

            ThingsManagerControl = new EcosystemControl(null);
            ThingGrid.Children.Add(ThingsManagerControl);

            ThingsManager.OnNewThing += ThingsManager_NewOWLOSThing;
            ThingsManager.Load();
            //END OF Временно для теста нод ---

            //Настраиваем разметы элементы в зависимости от выбраного размера сетки
            ThingGrid.Width = ThingGrid.Height = cellSize;
            viewbox.Width   = viewbox.Height = cellSize / 10;

            autoScrollImage.Tag = 0;
            drawCellImage.Tag   = 1;

            //Рисуем сетку
            Dispatcher.BeginInvoke((Action)DrawCell, DispatcherPriority.Send);
        }
Пример #2
0
        //private DependencyPropertyDescriptor dp = DependencyPropertyDescriptor.FromProperty(
        //Ellipse.RenderTransformProperty,
        //typeof(Ellipse));

        public EcosystemRelationLine(FrameworkElement parent, EcosystemControl aWorldObjectControl, EcosystemControl bWorldObjectControl,
                                     FrameworkElement frameworkElement, Panel panel,
                                     Point[] offsetA = null, Point[] offsetB = null)
        {
            Parent   = parent;
            aControl = aWorldObjectControl;
            bControl = bWorldObjectControl;
            this.frameworkElement = frameworkElement;
            this.panel            = panel;

            if (offsetA != null && offsetA.Length == 2)
            {
                this.offsetA = offsetA;
            }
            else
            {
                this.offsetA[0] = new Point(ellipseWidth, ellipseHeight / 2);
                this.offsetA[1] = new Point(100, 0);
            }

            if (offsetB != null && offsetB.Length == 2)
            {
                this.offsetB = offsetB;
            }
            else
            {
                this.offsetB[0] = new Point(0, 25);
                this.offsetB[1] = new Point(-100, 0);
            }
        }
Пример #3
0
        public void Dispose()
        {
            if (IsDisposed)
            {
                throw new ObjectDisposedException("Can't get access to disposed object.");
            }

            IsDisposed = true;
            RemoveRelationLine();
            ecosystemPathLine = default(EcosystemPathLine);
            aControl          = null;
            bControl          = null;
            frameworkElement  = null;
            panel             = null;
            ellipse           = null;
            curveLine         = null;
            Parent            = null;
        }
Пример #4
0
        public OWLOSPanelControl()
        {
            InitializeComponent();

            parentControl = new EcosystemControl(this);
        }