Example #1
0
        public MainWindow()
        {
            InitializeComponent();
            Polyline line = new Polyline();
            Polyline line2 = new Polyline();
            line.VerticalAlignment = VerticalAlignment.Center;
            line.Stroke = SystemColors.WindowTextBrush;
            line.StrokeThickness = 2;

            for (int i = -200; i < 200; i++)
            {
                line.Points.Add(new Point(i, Algorithm.CalFitness(i)));
            }

            panel.Children.Add(line);

            Algorithm alogrithm = new Algorithm();

            for (int j = 0; j < Algorithm.MAX_CHANGE; j++)
            {
                List<Polyline> lines = alogrithm.Graph();
                for (int i = 0; i < lines.Count; i++)
                {
                    panel.Children.Add(lines[i]);
                }

                alogrithm.Running ();
            }

            bestX.Content = alogrithm.GlobeBestX.ToString();
            bestY.Content = alogrithm.GlobleBestFitness.ToString();
        }
Example #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.YAxisCells = ((System.Windows.Controls.StackPanel)(target));
                return;

            case 2:
                this.gridPath = ((System.Windows.Shapes.Path)(target));
                return;

            case 3:
                this.polyline = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 4:
                this.polygon = ((System.Windows.Shapes.Polygon)(target));
                return;

            case 5:
                this.pointCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 6:
                this.lblOriginCell = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.XAxisCells = ((System.Windows.Controls.StackPanel)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #3
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 11 "..\..\MainWindow.xaml"
                ((KinectDrawing.MainWindow)(target)).Closing += new System.ComponentModel.CancelEventHandler(this.Window_Closing);

            #line default
            #line hidden
                return;

            case 2:
                this.camera = ((System.Windows.Controls.Image)(target));
                return;

            case 3:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this.brush = ((KinectDrawing.DrawingBrush)(target));
                return;

            case 5:
                this.trail = ((System.Windows.Shapes.Polyline)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #4
0
        private void DrawCar(Map map)
        {
            if (lastCar != null)
            {
                Canvas_trackPlanner.Children.Remove(lastCar);
            }

            const double CAR_WIDTH          = 55;
            const double CAR_HEIGHT         = 25;
            const double FRONT_SHOWER_LENTH = 10;

            System.Windows.Shapes.Polyline car = new Polyline();
            car.StrokeThickness = 7;
            car.Stroke          = new SolidColorBrush(Colors.Red);
            car.Points          = new PointCollection()
            {
                new Point(map.car.x + CAR_WIDTH / 2, map.car.y + CAR_HEIGHT / 2),
                new Point(map.car.x - CAR_WIDTH / 2, map.car.y + CAR_HEIGHT / 2),
                new Point(map.car.x - CAR_WIDTH / 2, map.car.y - CAR_HEIGHT / 2),
                new Point(map.car.x + CAR_WIDTH / 2, map.car.y - CAR_HEIGHT / 2),
                new Point(map.car.x + CAR_WIDTH / 2, map.car.y),
                new Point(map.car.x + CAR_WIDTH + FRONT_SHOWER_LENTH / 2, map.car.y),
                new Point(map.car.x + CAR_WIDTH / 2, map.car.y),
                new Point(map.car.x + CAR_WIDTH / 2, map.car.y + CAR_HEIGHT / 2)
            };

            RotateTransform rt = new RotateTransform(map.car.angle, map.car.x, map.car.y);

            car.Points = new PointCollection(car.Points.Select(x => rt.Transform(x)));
            Canvas_trackPlanner.Children.Add(car);

            lastCar = car;
        }
        protected override void OnStylusDown(StylusDownEventArgs args)
        {
            base.OnStylusDown(args);
            Point ptStylus = args.GetPosition(canv);

            // ���� �ձ� Polyline�� ������ ���濡 ���
            polyStylus = new Polyline();
            polyStylus.Stroke = brushStylus;
            polyStylus.StrokeThickness = widthStroke;
            polyStylus.StrokeStartLineCap = PenLineCap.Round;
            polyStylus.StrokeEndLineCap = PenLineCap.Round;
            polyStylus.StrokeLineJoin = PenLineJoin.Round;
            polyStylus.Points = new PointCollection();
            polyStylus.Points.Add(ptStylus);

            // �׸��ڿ����� �� Polyline
            polyShadow = new Polyline();
            polyShadow.Stroke = brushShadow;
            polyShadow.StrokeThickness = widthStroke;
            polyShadow.StrokeStartLineCap = PenLineCap.Round;
            polyShadow.StrokeEndLineCap = PenLineCap.Round;
            polyShadow.StrokeLineJoin = PenLineJoin.Round;
            polyShadow.Points = new PointCollection();
            polyShadow.Points.Add(ptStylus + vectShadow);

            // ������ ��� �������� ������ �׸��� ���������� ����
            canv.Children.Insert(canv.Children.Count / 2, polyShadow);

            // ���� �������� ����� ���������� �߰�
            canv.Children.Add(polyStylus);

            CaptureStylus();
            isDrawing = true;
            args.Handled = true;
        }
        protected override void OnStylusDown(StylusDownEventArgs args)
        {
            base.OnStylusDown(args);
            Point ptStylus = args.GetPosition(canv);

            // Create a Polyline with rounded ends and joins for the foreground.
            polyStylus = new Polyline();
            polyStylus.Stroke = brushStylus;
            polyStylus.StrokeThickness = widthStroke;
            polyStylus.StrokeStartLineCap = PenLineCap.Round;
            polyStylus.StrokeEndLineCap = PenLineCap.Round;
            polyStylus.StrokeLineJoin = PenLineJoin.Round;
            polyStylus.Points = new PointCollection();
            polyStylus.Points.Add(ptStylus);

            // Another Polyline for the shadow.
            polyShadow = new Polyline();
            polyShadow.Stroke = brushShadow;
            polyShadow.StrokeThickness = widthStroke;
            polyShadow.StrokeStartLineCap = PenLineCap.Round;
            polyShadow.StrokeEndLineCap = PenLineCap.Round;
            polyShadow.StrokeLineJoin = PenLineJoin.Round;
            polyShadow.Points = new PointCollection();
            polyShadow.Points.Add(ptStylus + vectShadow);

            // Insert shadow before all foreground polylines.
            canv.Children.Insert(canv.Children.Count / 2, polyShadow);

            // Foreground can go at end.
            canv.Children.Add(polyStylus);

            CaptureStylus();
            isDrawing = true;
            args.Handled = true;
        }
Example #7
0
    /// <summary>
    /// Instantiates LineGraph.
    /// </summary>
    public LineGraph() {
      this.DefaultStyleKey = typeof(LineGraph);
      _lineGraph = new Polyline();

      BindBrush();
      BindStrokeThickness();
    }
Example #8
0
        public void DrawPuzzle(DotPuzzle puzzle, Canvas colorPointCanvas, Polyline figurePolyline)
        {

            try
            {
                if (puzzle != null)
                {
                    colorPointCanvas.Children.Clear();
                    figurePolyline.Points.Clear();
                    for (int i = 0; i < puzzle.Dots.Count; i++)
                    {
                        Grid dotContainer = new Grid();
                        dotContainer.Width = 80;
                        dotContainer.Height = 80;
                        if (i == 0 || i == puzzle.Dots.Count - 1)
                        {
                            if (i == 0)
                                dotContainer.Children.Add(new Canvas() { Background = new ImageBrush(ConvertBitmapToBitmapSource((Resources.greenBall))) }); // do punktu startowego i koncowego potrzebna grafika, najlepiej jakas animacja
                            if (i == puzzle.Dots.Count - 1)
                                dotContainer.Children.Add(new Canvas() { Background = new ImageBrush(ConvertBitmapToBitmapSource((Resources.redBall))) });
                            

                            TextBlock dotLabel = new TextBlock();
                            //dotLabel.Text = (i + 1).ToString();
                            dotLabel.Foreground = Brushes.White;
                            dotLabel.FontSize = 35;
                            dotLabel.HorizontalAlignment = HorizontalAlignment.Center;
                            dotLabel.VerticalAlignment = VerticalAlignment.Center;
                            dotContainer.Children.Add(dotLabel);

                            Canvas.SetTop(dotContainer, puzzle.Dots[i].Y - (dotContainer.Height / 2));
                            Canvas.SetLeft(dotContainer, puzzle.Dots[i].X - (dotContainer.Width / 2));
                            colorPointCanvas.Children.Add(dotContainer);

                        }
                        else
                            dotContainer.Children.Add(new Ellipse() { Fill = figurePolyline.Stroke });

                        //TextBlock dotLabel = new TextBlock();
                        ////dotLabel.Text = (i + 1).ToString();
                        //dotLabel.Foreground = Brushes.White;
                        //dotLabel.FontSize = 35;
                        //dotLabel.HorizontalAlignment = System.Windows.HorizontalAlignment.Center;
                        //dotLabel.VerticalAlignment = System.Windows.VerticalAlignment.Center;
                        //dotContainer.Children.Add(dotLabel);

                        //Canvas.SetTop(dotContainer, puzzle.Dots[i].Y - (dotContainer.Height / 2));
                        //Canvas.SetLeft(dotContainer, puzzle.Dots[i].X - (dotContainer.Width / 2));
                        //ColorPointCanvas.Children.Add(dotContainer);
                        figurePolyline.Points.Add(new Point(puzzle.Dots[i].X, puzzle.Dots[i].Y));

                    }
                }
            }
            catch (Exception ex)
            {


            }
        }
Example #9
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.User = ((System.Windows.Controls.Label)(target));
                return;

            case 2:
                this.Details = ((System.Windows.Controls.Label)(target));
                return;

            case 3:
                this.background1 = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 4:
                this.background2 = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 5:
                this.Mask = ((System.Windows.Controls.Border)(target));
                return;

            case 6:
                this.UserAvater = ((System.Windows.Media.ImageBrush)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #10
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.CrayonElement = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 3:
                this.PuzzleBoardElement = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this.GameBoardElement = ((System.Windows.Controls.Canvas)(target));
                return;

            case 5:
                this.HandCursorElement = ((System.Windows.Controls.Image)(target));
                return;

            case 6:
                this.HandCursorScale = ((System.Windows.Media.ScaleTransform)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #11
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.painting_Canvas = ((System.Windows.Controls.Canvas)(target));

            #line 10 "..\..\MainWindow.xaml"
                this.painting_Canvas.MouseMove += new System.Windows.Input.MouseEventHandler(this.painting_Canvas_MouseMove);

            #line default
            #line hidden

            #line 10 "..\..\MainWindow.xaml"
                this.painting_Canvas.MouseLeftButtonDown += new System.Windows.Input.MouseButtonEventHandler(this.painting_Canvas_MouseLeftButtonDown);

            #line default
            #line hidden
                return;

            case 2:
                this.polyLine = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 3:
                this.snakeHead = ((System.Windows.Shapes.Ellipse)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #12
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.LayoutRoot = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.PuzzleBoardElement = ((System.Windows.Controls.Canvas)(target));
                return;

            case 3:
                this.CrayonElement = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 4:
                this.GameBoardElement = ((System.Windows.Controls.Canvas)(target));
                return;

            case 5:
                this.HandCursorElement = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 6:
                this.HandCursorScale = ((System.Windows.Media.RotateTransform)(target));
                return;

            case 7:
                this.Button1 = ((System.Windows.Controls.Button)(target));

            #line 36 "..\..\MainWindow.xaml"
                this.Button1.Click += new System.Windows.RoutedEventHandler(this.NewLigature);

            #line default
            #line hidden
                return;

            case 8:
                this.Button2 = ((System.Windows.Controls.Button)(target));

            #line 37 "..\..\MainWindow.xaml"
                this.Button2.Click += new System.Windows.RoutedEventHandler(this.RedrawPuzzle);

            #line default
            #line hidden
                return;

            case 9:
                this.Button3 = ((System.Windows.Controls.Button)(target));

            #line 38 "..\..\MainWindow.xaml"
                this.Button3.Click += new System.Windows.RoutedEventHandler(this.ReadPuzzle);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        public Spiral()
        {
            Title = "Spiral";

            // Make Canvas content of window.
            Canvas canv = new Canvas();
            canv.SizeChanged += CanvasOnSizeChanged;
            Content = canv;

            // Make Polyline child of Canvas.
            poly = new Polyline();
            poly.Stroke = SystemColors.WindowTextBrush;
            canv.Children.Add(poly);

            // Define the points.
            Point[] pts = new Point[numpts];

            for (int i = 0; i < numpts; i++)
            {
                double angle = i * 2 * Math.PI / (numpts / revs);
                double scale = 250 * (1 - (double) i / numpts);

                pts[i].X = scale * Math.Cos(angle);
                pts[i].Y = scale * Math.Sin(angle);
            }
            poly.Points = new PointCollection(pts);
        }
        public void DrawLine(IList<ScreenPoint> points, OxyColor stroke, double thickness, double[] dashArray,
                             OxyPenLineJoin lineJoin, bool aliased)
        {
            var e = new Polyline();
            if (stroke != null && thickness > 0)
            {
                e.Stroke = GetCachedBrush(stroke);

                switch (lineJoin)
                {
                    case OxyPenLineJoin.Round:
                        e.StrokeLineJoin = PenLineJoin.Round;
                        break;
                    case OxyPenLineJoin.Bevel:
                        e.StrokeLineJoin = PenLineJoin.Bevel;
                        break;
                    //  The default StrokeLineJoin is Miter
                }

                if (thickness != 1) // default values is 1
                    e.StrokeThickness = thickness;
                if (dashArray != null)
                    e.StrokeDashArray = new DoubleCollection(dashArray);
            }
            // pl.Fill = null;
            if (aliased)
                e.SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Aliased);

            var pc = new PointCollection(points.Count);
            foreach (var p in points)
                pc.Add(ToPoint(p));
            e.Points = pc;

            Add(e);
        }
        private void tekenLijn()
        {
            //Polyline aanmaken
            Polyline line = new Polyline();
            line.Stroke = Brushes.Aquamarine;
            line.Visibility = Visibility.Visible;
            line.StrokeThickness = 3;

            //Punten
            PointCollection punten = new PointCollection();

            //Dingen die in de formule ingevuld gaan worden
            double a = 100;// canvas.Height / 2; //De evenwichtsstand
            double b = 2;// canvas.Height / 4; //De amplitude
            //double d = Convert.ToDouble(ActualHeightProperty.ToString()) ; //de x-coördinaat van een punt waar de grafiek stijgend de evenwichtsstand snijdt

            double windowbreedte = canvas.ActualWidth;
            double windowhoogte = canvas.ActualHeight/2;

            //Alle punten overlopen
            for (int i = 0; i < windowbreedte; i++)
            {
                //punten.Add(new Point() { X = i, Y = windowhoogte * (1 - Math.Sin(i * (Math.PI / (windowbreedte/6))))});
                punten.Add(new Point(i,  Math.Sin(((2*Math.PI )/ b) * (i - windowbreedte)) * windowhoogte));
                //2,5 + 2,5 sin(2π / 9(x – 3))

            }

            line.Points = punten;

            //Lijn tekenen
            canvas.Children.Add(line);

        }
 private void addBorder(object sender, RoutedEventArgs e)
 {
     try
     {
         Polyline border = new Polyline();
         string[] points = borderTextBox.Text.Split('\n');
         string[] xAndY = new string[2];
         List<Double> xOfPoint = new List<Double>();
         List<Double> yOfPoint = new List<Double>();
         for (int i = 0; i < points.Length; i++)
         {
             xAndY = points[i].Split(',');
             xOfPoint.Add(Convert.ToDouble(xAndY[0]));
             yOfPoint.Add(Convert.ToDouble(xAndY[1]));
             border.Points.Add(new Point(xOfPoint[i], yOfPoint[i]));
         }
         border.Stroke = new SolidColorBrush(Color.FromRgb(0, 0, 0));
         border.Name = "border";
         MainWindow.polylineList.Add(border);
         var mainWindowInstant = (MainWindow)App.Current.MainWindow;
         mainWindowInstant.getCanvas.Children.Add(border);
         mainWindowInstant.reprintItemList();
         borderTextBox.Clear();
     }
     catch { }
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.Quit = ((System.Windows.Controls.MenuItem)(target));

            #line 19 "..\..\..\Views\BurndownChart - Copier.xaml"
                this.Quit.Click += new System.Windows.RoutedEventHandler(this.Quit_Click);

            #line default
            #line hidden
                return;

            case 2:
                this.lnIdeal = ((System.Windows.Shapes.Line)(target));
                return;

            case 3:
                this.lnCurrent = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 4:
                this.brdrGraphic = ((System.Windows.Controls.Border)(target));
                return;

            case 5:
                this.lblDayBegin = ((System.Windows.Controls.Label)(target));
                return;

            case 6:
                this.lblDayEnd = ((System.Windows.Controls.Label)(target));
                return;

            case 7:
                this.lblComplexityMax = ((System.Windows.Controls.Label)(target));
                return;

            case 8:
                this.lblComplexityZero = ((System.Windows.Controls.Label)(target));
                return;

            case 9:
                this.btnCancel = ((System.Windows.Controls.Button)(target));

            #line 36 "..\..\..\Views\BurndownChart - Copier.xaml"
                this.btnCancel.Click += new System.Windows.RoutedEventHandler(this.Quit_Click);

            #line default
            #line hidden

            #line 36 "..\..\..\Views\BurndownChart - Copier.xaml"
                this.btnCancel.TouchUp += new System.EventHandler <System.Windows.Input.TouchEventArgs>(this.Quit_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #18
0
        public Computing()
        {
            Result = new Moment(0);
            //Tmr = new Timer(3000);
            //Tmr.AutoReset = true;
            //Tmr.Elapsed += Tmr_Elapsed;

            InpFileName = @"D:\ballistics\ballisticwpf\config.txt";
            OutFileName = @"D:\ballistics\ballisticwpf\result.txt";

            //string InpFileName = @"C:\Users\Andrey\Documents\Visual Studio 2015\Projects\ballistics\ballisticwpf\config.txt";
            //string OutFileName = @"C:\Users\Andrey\Documents\Visual Studio 2015\Projects\ballistics\ballisticwpf\result.txt";
            Config = new Configuration(0);
            Config.ReadConfugurationFromFile(InpFileName);

            bool ExistFlag = File.Exists(OutFileName);
            if (ExistFlag)
            {
                File.Delete(OutFileName);
            }

            Positions = new PointCollection();
            Positions.Add(new Point(0, 0));

            Chart = new Polyline();
            Chart.Points = Positions;

            //BgrWork = ((BackgroundWorker)this.FindResource("bgrWork"));
            //ComplexArg = new ComplexForAsyns(Config);
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.yGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this._myGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this._myCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this._myPolyline = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 5:
                this._myPolyline2 = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 6:
                this.xLableCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 7:
                this.xGrid = ((System.Windows.Controls.Grid)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public StatisticsLinesManager()
        {
            Center = 200;
            MaxWidth = 1000;

            _WinningsStatisticsLine = new System.Windows.Shapes.Polyline
            {
                StrokeThickness = 2,
                Stroke = Brushes.Red,
                Visibility = Visibility.Collapsed
            };

            _NumberRepetitionsLine = new System.Windows.Shapes.Polyline
            {
                StrokeThickness = 2,
                Stroke = Brushes.Blue,
                Visibility = Visibility.Collapsed
            };

            _NumberRepetitions2Line = new System.Windows.Shapes.Polyline
            {
                StrokeThickness = 2,
                Stroke = Brushes.Red,
                Visibility = Visibility.Collapsed
            };
        }
Example #21
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.polyline = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 2:
                this.dot_from = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 3:
                this.dot_to = ((System.Windows.Shapes.Rectangle)(target));
                return;

            case 4:
                this.line = ((System.Windows.Shapes.Line)(target));
                return;

            case 5:
                this.polygon = ((System.Windows.Shapes.Polygon)(target));
                return;
            }
            this._contentLoaded = true;
        }
        public void AddFunction(IEnumerable<Point> points, Color color, string description)
        {
            if(!squaresFunctions.ContainsKey(description) && !functions.ContainsKey(description))
            {
                Polyline polyline = new Polyline();
                polyline.Stroke = new SolidColorBrush(color);
                polyline.StrokeThickness = CalculateThickness(0.005, R2.Width, R2.Height);
                PointCollection pColl = new PointCollection(points);
                polyline.Points = pColl;


                var nwFour = new Four(polyline.Points.Min(p => p.X), polyline.Points.Max(p => p.Y),
                    polyline.Points.Min(p => p.Y), polyline.Points.Max(p => p.Y));
           
                squaresFunctions.Add(description, nwFour);

                RecalculateSquare();
                GoToCenter();
                DrowCoordinates();

                R2.Children.Add(polyline);

                Label lbl = new Label();
                lbl.Content = description;
                lbl.Foreground = new SolidColorBrush(color);
                Descriptions.Children.Add(lbl);

                functions.Add(description, new Tuple<Polyline, Label>(polyline, lbl));
            }
        }
Example #23
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 23 "..\..\..\..\Animation\CurveDawer\CurveDrawer.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ClickDecrease);

            #line default
            #line hidden
                return;

            case 2:

            #line 24 "..\..\..\..\Animation\CurveDawer\CurveDrawer.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_ClickIncrease);

            #line default
            #line hidden
                return;

            case 3:
                this.myCan = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this.myLine = ((System.Windows.Shapes.Polyline)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #24
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.MainCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 2:
                this.polyline = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 3:
                this.First = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 4:
                this.Second = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 5:
                this.Third = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 6:
                this.Fourth = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 7:
                this.Fifth = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 8:
                this.Sixth = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 9:
                this.Seventh = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 10:
                this.Eighth = ((System.Windows.Shapes.Ellipse)(target));
                return;

            case 11:
                this.SearchField = ((System.Windows.Controls.TextBox)(target));
                return;

            case 12:

            #line 95 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
        public static Polyline ConstructPolyline(PointF P0, PointF P1, PointF P2, PointF P3, bool isSelfLoopedRelation = false)
        {
            float p12Dist      = (float)Math.Sqrt(Math.Pow(P2.X - P1.X, 2) + Math.Pow(P2.Y - P1.Y, 2));
            int   divisionsNum = Math.Max((int)(p12Dist * .2f), 8);
            float tStep        = 1f / (float)divisionsNum;

            P0.Y *= .5f;
            P3.Y *= 1.5f;
            Polyline        newPolyLine           = new System.Windows.Shapes.Polyline();
            PointCollection polylinePointsCollect = new PointCollection();

            if (isSelfLoopedRelation == false)
            {
                BuildACurve(P0, P1, P2, P3, tStep, polylinePointsCollect);
            }
            else
            {
                PointF P6 = P3;
                PointF P5 = P2;
                P3 = new PointF(P1.X - 160, P1.Y - 50);
                P2 = new PointF(P3.X + 35, P1.Y + 10f);
                PointF P4 = new PointF(P3.X + 35, P5.Y - 10f);
                BuildACurve(P0, P1, P2, P3, tStep, polylinePointsCollect);
                BuildACurve(P1, P2, P3, P4, tStep, polylinePointsCollect);
                BuildACurve(P2, P3, P4, P5, tStep, polylinePointsCollect);
                BuildACurve(P3, P4, P5, P6, tStep, polylinePointsCollect);

                /*
                 * for (float t = 0; t <= 1; t += tStep)
                 * {
                 *  if (t + tStep > 1) t = 1;
                 *  PointF newPF = CatmullRomEq(P0, P1, P2, P3, t);
                 *  polylinePointsCollect.Add(new System.Windows.Point((int)Math.Round(newPF.X), (int)Math.Round(newPF.Y)));
                 * }
                 * for (float t = 0; t <= 1; t += tStep)
                 * {
                 *  if (t + tStep > 1) t = 1;
                 *  PointF newPF = CatmullRomEq(P1, P2, P3, P4, t);
                 *  polylinePointsCollect.Add(new System.Windows.Point((int)Math.Round(newPF.X), (int)Math.Round(newPF.Y)));
                 * }
                 * for (float t = 0; t <= 1; t += tStep)
                 * {
                 *  if (t + tStep > 1) t = 1;
                 *  PointF newPF = CatmullRomEq(P2, P3, P4, P5, t);
                 *  polylinePointsCollect.Add(new System.Windows.Point((int)Math.Round(newPF.X), (int)Math.Round(newPF.Y)));
                 * }
                 * for (float t = 0; t <= 1; t += tStep)
                 * {
                 *  if (t + tStep > 1) t = 1;
                 *  PointF newPF = CatmullRomEq(P3, P4, P5, P6, t);
                 *  polylinePointsCollect.Add(new System.Windows.Point((int)Math.Round(newPF.X), (int)Math.Round(newPF.Y)));
                 * }
                 */
            }
            newPolyLine.Points          = polylinePointsCollect;
            newPolyLine.Stroke          = System.Windows.Media.Brushes.Black;
            newPolyLine.StrokeThickness = 2;
            return(newPolyLine);
        }
Example #26
0
 public DataSeries()
 {
     LineSeries = new Polyline();
     LineThickness = 1;
     SeriesName = "Default Name";
     LineColor = Brushes.Black;
     Symbols = new NoneSymbols();
 }
Example #27
0
 public Polyline GetBodySegment(JointCollection joints, Brush brush, params JointType[] ids)
 {
     var points = new PointCollection(ids.Length);
     foreach (var t in ids)
         points.Add(GetDisplayPosition(joints[t]));
     var polyline = new Polyline { Points = points, Stroke = brush, StrokeThickness = 6 };
     return polyline;
 }
Example #28
0
 protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e)
 {
     jolidessin = new Polyline();
     (App.Current as App).drawlist.Add(jolidessin);
     jolidessin.Stroke = this.Resources["PhoneForegroundBrush"] as Brush;
     jolidessin.StrokeThickness = (double)5;
      	        base.OnNavigatedTo(e);
 }
Example #29
0
 private void ConfigurePolyLine()
 {
     f_polyLine = new Polyline
     {
         StrokeThickness = (double)GraphicContent.GraphicToolProperties.Thickness,
         Stroke = new SolidColorBrush((Color)GraphicContent.GraphicToolProperties.Color),
         Effect = DropShadowEffect()
     };
 }
Example #30
0
        public PolyLineHandleGroup(MoonlightController controller, Polyline child)
            : base(controller, child)
        {
            PointCollection points = child.Points;
            for (int i=0; i<points.Count; i++)
                AddHandle(new PolyLineHandle(Controller, this, i));

            Update();
        }
Example #31
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) {
     switch (connectionId)
     {
     case 1:
     this.polyline1 = ((System.Windows.Shapes.Polyline)(target));
     return;
     }
     this._contentLoaded = true;
 }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 7 "..\..\MainWindow.xaml"
                ((ProjectileMotion.MainWindow)(target)).SizeChanged += new System.Windows.SizeChangedEventHandler(this.MainWindow_OnSizeChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.InitialSpeedBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.InitialSpeedHintTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 4:
                this.AngleBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.AngleHintTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 6:
                this.SamplingBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 7:
                this.SamplingHintTextBlock = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 8:

            #line 36 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.DrawButton_OnClick);

            #line default
            #line hidden
                return;

            case 9:
                this.Border = ((System.Windows.Controls.Border)(target));
                return;

            case 10:
                this.ProjectileMotionPolyline = ((System.Windows.Shapes.Polyline)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #33
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 147 "..\..\MainWindow.xaml"
                ((System.Windows.Shapes.Rectangle)(target)).MouseDown += new System.Windows.Input.MouseButtonEventHandler(this.Rectangle_MouseDown);

            #line default
            #line hidden
                return;

            case 2:

            #line 245 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Button_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.DownloadIcon = ((System.Windows.Shapes.Path)(target));
                return;

            case 4:
                this.UploadIcon = ((System.Windows.Shapes.Path)(target));
                return;

            case 5:
                this.GraphScrollViewer = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 6:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 7:
                this.polyline = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 8:
                this.average = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 9:
                this.XAxis = ((System.Windows.Controls.ItemsControl)(target));
                return;

            case 10:
                this.YAxis = ((System.Windows.Controls.ItemsControl)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #34
0
 private void SoundPlay(WaveOut waveOut, BinauralBeatsWaveOscillator wave, Polyline line, int leftFrequency, int rightFrequency, short amplitude)
 {
     double volumeGainFactor = 0.01;
     waveOut.Volume = (float)(amplitudeSlider.Value * volumeGainFactor);
     wave.LeftFrequency = leftFrequency;
     wave.RightFrequency = rightFrequency;
     wave.Amplitude = amplitude;
     waveOut.Play();
     waveGraphDrawing(line, wave, waveOut);
 }
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/EcosCab;component/Controls/ucLocomotiveSpeedSlider.xaml", System.UriKind.Relative));
     this.pnlSlider = ((System.Windows.Controls.Grid)(this.FindName("pnlSlider")));
     this.sliderBack = ((System.Windows.Shapes.Polyline)(this.FindName("sliderBack")));
     this.sliderFill = ((System.Windows.Shapes.Polyline)(this.FindName("sliderFill")));
 }
Example #36
0
 void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
 {
     switch (connectionId)
     {
     case 1:
         this.polyline1 = ((System.Windows.Shapes.Polyline)(target));
         return;
     }
     this._contentLoaded = true;
 }
Example #37
0
 private void waveGraphDrawing(Polyline line, WaveOscillator wave, WaveOut waveOut)
 {
     line.Points.Clear();
     double halfCanvasActualHeight = waveGraphCanvas.ActualHeight / 2;
     double minusHalfCanvasActualHeight = halfCanvasActualHeight * (-1);
     for (int i = 0; i < waveGraphCanvas.ActualWidth; i++)
     {
         line.Points.Add(new Point(i, (double)wave.drawBuffer[i] / (double)wave.Amplitude * minusHalfCanvasActualHeight * waveOut.Volume + halfCanvasActualHeight));
     }
     waveTip.Text = string.Format("Current Wave: {0}\t Frequency: {1}\t Amplitude: {2}\t", wave.currentType, wave.Frequency, (int)(wave.Amplitude * waveOut.Volume));
 }
Example #38
0
 private Polyline CreateFigure1(Skeleton skeleton, System.Windows.Media.Brush brush, JointType[] joints)
 {
     System.Windows.Shapes.Polyline figure = new System.Windows.Shapes.Polyline();
     figure.StrokeThickness = 8;
     figure.Stroke          = brush;
     for (int i = 0; i < joints.Length; i++)
     {
         figure.Points.Add(GetJointPoint(skeleton.Joints[joints[i]]));
     }
     return(figure);
 }
 public Polynomial()
 {
     name = "";
     function = "";
     drawingColor = Colors.Black;
     plot = new Polyline();
     xMin = -19;
     xMax = 19;
     yMin = -19;
     yMax = 19;
 }
Example #40
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.priceBookGrid = ((System.Windows.Controls.Grid)(target));
                return;

            case 2:
                this.bidList = ((System.Windows.Controls.ListBox)(target));
                return;

            case 3:
                this.askList = ((System.Windows.Controls.ListBox)(target));
                return;

            case 4:
                this.priceList = ((System.Windows.Controls.ListBox)(target));
                return;

            case 5:
                this.gridCanvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 6:
                this.priceLine = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 7:
                this.vwapLine = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 8:
                this.toggleHighAgg = ((System.Windows.Controls.Button)(target));

            #line 122 "..\..\..\Views\MainWindow.xaml"
                this.toggleHighAgg.Click += new System.Windows.RoutedEventHandler(this.toggleHighAgg_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.toggleVwapAgg = ((System.Windows.Controls.Button)(target));

            #line 131 "..\..\..\Views\MainWindow.xaml"
                this.toggleVwapAgg.Click += new System.Windows.RoutedEventHandler(this.toggleVwapAgg_Click);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }
Example #41
0
 public LineGraph()
 {
     InitializeComponent();
     m_polyline = new Polyline();
     m_targetPolyline = new Polyline();
     m_line = new Line();
     canvas1.Children.Add(m_polyline);
     canvas1.Children.Add(m_targetPolyline);
     canvas1.Children.Add(m_line);
     m_zeroline = new Point[2];
 }
Example #42
0
        public ArrowShape()
        {
            polyline = new Polyline();
            polyline.Stroke = Brushes.SlateGray;
            polyline.StrokeThickness = 3;

            arrow = new Polyline();
            arrow.Stroke = Brushes.SlateGray;
            arrow.StrokeThickness = 3;
            arrow.StrokeEndLineCap = PenLineCap.Round;
        }
Example #43
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 15 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.StackPanel)(target)).AddHandler(System.Windows.Controls.Primitives.TextBoxBase.TextChangedEvent, new System.Windows.Controls.TextChangedEventHandler(this.TextBoxBase_OnTextChanged));

            #line default
            #line hidden
                return;

            case 2:
                this.leftTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 3:
                this.rightTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 4:
                this.bottomTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 5:
                this.topTextBox = ((System.Windows.Controls.TextBox)(target));
                return;

            case 6:

            #line 25 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.ComboBox)(target)).SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.Selector_OnSelectionChanged);

            #line default
            #line hidden
                return;

            case 7:
                this.canvas = ((System.Windows.Controls.Canvas)(target));

            #line 31 "..\..\MainWindow.xaml"
                this.canvas.SizeChanged += new System.Windows.SizeChangedEventHandler(this.Canvas_OnSizeChanged);

            #line default
            #line hidden
                return;

            case 8:
                this.plotPolyline = ((System.Windows.Shapes.Polyline)(target));
                return;
            }
            this._contentLoaded = true;
        }
 public Polyline Draw(double X, double Y)
 {
     Polyline line = new Polyline();
     //Canvas.SetTop(line, Y);
     //Canvas.SetLeft(line, X);
     line.Points.Add(new Point(X, Y));
     line.StrokeThickness = 200;
     line.Fill = Brushes.Transparent;
     line.Stroke = Brushes.Black;
     return line;
 }
 public Polyline Create(IEnumerable<Point> points)
 {
     Polyline polyline = new Polyline
     {
         Stroke = Brush,
         StrokeThickness = _brushThickness,
         Opacity = _opacity,
         Points = new PointCollection(points)
     };
     return polyline;
 }
        public Polyline Create(Route route)
        {
            Polyline polyline = new Polyline
            {
                Stroke = Brush,
                StrokeThickness = _brushThickness,
                Opacity = _opacity,
                Points = CreatePointCollection(route)
            };

            return polyline;
        }
Example #47
0
        public Polyline GetPolyline(SolidColorBrush brush)
        {
            if (pl == null) pl = new Polyline()
                {
                    Stroke = brush,
                    StrokeThickness = Height,
                    Points = new PointCollection(Line)
                };
            else if (pl.Stroke != brush) pl.Stroke = brush;

            return pl;
        }
Example #48
0
        public MainWindow()
        {
            InitializeComponent();

            wavs = new List<WAV>();
            pl = new Polyline();
            timeLine = new Line();

            posX = 1;
            blockWidth = 4;
            render = RenderWAV.Bars;
        }
Example #49
0
        Polyline ZigZag(int offset)
        {
            Polyline poly = new Polyline();
            poly.Stroke = SystemColors.ControlTextBrush;
            poly.Points = new PointCollection();

            for (int x = 0; x <= 100; x += 10)
            {
                poly.Points.Add(new Point(x, (x+offset)%20));
            }
            return poly;
        }
Example #50
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.chart = ((Panuon.UI.Charts.PUDoughnutChart)(target));

            #line 11 "..\..\..\2_DoughnutChart\PUDoughnutChart.xaml"
                this.chart.SizeChanged += new System.Windows.SizeChangedEventHandler(this.chart_SizeChanged);

            #line default
            #line hidden
                return;

            case 2:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 3:
                this.canvasYAxis = ((System.Windows.Controls.Canvas)(target));
                return;

            case 4:
                this.canvasXAxis = ((System.Windows.Controls.Canvas)(target));
                return;

            case 5:
                this.canvasContainer = ((System.Windows.Controls.Canvas)(target));
                return;

            case 6:
                this.pathGrid = ((System.Windows.Shapes.Path)(target));
                return;

            case 7:
                this.polyline = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 8:
                this.polygon = ((System.Windows.Shapes.Polygon)(target));
                return;

            case 9:
                this.canvasPoints = ((System.Windows.Controls.Canvas)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #51
0
        /// <summary>
        /// Versucht eine Liste von Listen von Punkten zu einer Liste von Shape Polylinien umzuwandeln, wobei jede innere Liste einer Polylinie entspricht
        /// </summary>
        /// <param name="listOfPoints">Liste von der Liste von den Punkten, die konvertiert werden müssen</param>
        /// <returns>Liste von Shape Polylinien</returns>
        List <shapes.Polyline> ToPolyLine2(List <List <System.Drawing.Point> > listOfPoints)
        {
            List <shapes.Polyline> listPls = new List <System.Windows.Shapes.Polyline>();

            foreach (List <System.Drawing.Point> polyLine_as_List_Of_Point in listOfPoints)
            {
                shapes.Polyline neuShPolyLine = new System.Windows.Shapes.Polyline();
                foreach (System.Drawing.Point pt in polyLine_as_List_Of_Point)
                {
                    neuShPolyLine.Points.Add(new System.Windows.Point(pt.X, pt.Y));
                }
                listPls.Add(neuShPolyLine);
            }


            return(listPls);
        }
Example #52
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 4 "..\..\..\..\Windows\Exercises\Collect.xaml"
                ((EMAT3.Windows.Exercises.CollectionWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.groupBox_collection = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 3:
                this.btn_zero = ((System.Windows.Controls.Button)(target));

            #line 11 "..\..\..\..\Windows\Exercises\Collect.xaml"
                this.btn_zero.Click += new System.Windows.RoutedEventHandler(this.btn_zero_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.btn_start = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.XY = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 6:
                this.XZ = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 7:
                this.lbl_output = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #53
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.tbXLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 2:
                this.tbYLabel = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 3:
                this.poly = ((System.Windows.Shapes.Polyline)(target));
                return;
            }
            this._contentLoaded = true;
        }
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.cnv = ((System.Windows.Controls.Canvas)(target));
                return;

            case 2:
                this.pln = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 3:
                this.elps = ((System.Windows.Shapes.Ellipse)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #55
0
        /// <summary>
        /// versucht, eine Liste von Polylinien  aus einer Liste von Listen von PolylinienSegmenten  zu gewinnen
        /// </summary>
        /// <param name="listPLS"> Liste Polylininen Segmente</param>
        /// <returns>Liste Polylinien</returns>
        List <List <sh.Polyline> > ToPolyLine(List <List <PolyLineSegment> > listPLS)
        {
            List <List <sh.Polyline> > listPls = new List <List <System.Windows.Shapes.Polyline> >();

            foreach (List <PolyLineSegment> listPL in listPLS)
            {
                List <sh.Polyline> ListPL = new List <System.Windows.Shapes.Polyline>();
                foreach (PolyLineSegment PLS in listPL)
                {
                    sh.Polyline PL = new System.Windows.Shapes.Polyline();
                    foreach (System.Windows.Point Pt in PLS.Points)
                    {
                        PL.Points.Add(Pt);
                    }
                    ListPL.Add(PL);
                }
                listPls.Add(ListPL);
            }
            return(listPls);
        }
Example #56
0
        /// <summary>
        /// versucht, eine Liste von Polylinien  aus einer Liste von Listen von PolylinienSegmenten  zu gewinnen
        /// </summary>
        /// <param name="PolyLineSegmentsListList"> Liste Polylininen Segmente</param>
        /// <returns>Liste Polylinien</returns>
        List <List <shapes.Polyline> > ConvertPolyLineSegmentsToPolyline(List <List <PolyLineSegment> > PolyLineSegmentsListList)
        {
            List <List <shapes.Polyline> > shapePolylineList = new List <List <System.Windows.Shapes.Polyline> >();

            foreach (List <PolyLineSegment> polyLineSegmentsList in PolyLineSegmentsListList)
            {
                List <shapes.Polyline> ListPL = new List <System.Windows.Shapes.Polyline>();
                foreach (PolyLineSegment PLS in polyLineSegmentsList)
                {
                    shapes.Polyline PL = new System.Windows.Shapes.Polyline();
                    foreach (System.Windows.Point Pt in PLS.Points)
                    {
                        PL.Points.Add(Pt);
                    }
                    ListPL.Add(PL);
                }
                shapePolylineList.Add(ListPL);
            }
            return(shapePolylineList);
        }
Example #57
0
        /// <summary>
        /// Convert polylines to Polylines from shape
        /// </summary>
        void convertLwPolylinesToShapePolylines()
        {
            foreach (LwPolyline lwPolyline in listConvertedLwPolyline)
            {
                shapes.Polyline shapePolyline = new shapes.Polyline();

                PointCollection listOfPoints = new PointCollection();

                List <System.Windows.Point> ListPoi = listOfPoints.ToList();

                foreach (LwPolylineVertex lwPolylineVertex in lwPolyline.Vertexes.ToList())
                {
                    System.Windows.Point actualPoint = new System.Windows.Point(lwPolylineVertex.Location.X, lwPolylineVertex.Location.Y);
                    listOfPoints.Add(actualPoint);
                }

                shapePolyline.Points = listOfPoints;

                listConvertedShapePolylines.Add(shapePolyline);
            }
        }
Example #58
0
        public Polyline GetCanvasSpline(netDxf.Entities.Spline InputSpline, Vector3 startVector, double canvasHeight)
        {
            var transformedControlPointsList = new PointCollection();

            foreach (var item in InputSpline.PolygonalVertexes(chordVariable))
            {
                transformedControlPointsList.Add(new Point(item.X - startVector.X,
                                                           -item.Y + canvasHeight + startVector.Y));
            }

            var g = new StreamGeometry();
            StreamGeometryContext gc;

            using (gc = g.Open())
            {
                gc.BeginFigure(
                    transformedControlPointsList.First(),
                    false,
                    false);


                gc.PolyLineTo(transformedControlPointsList, false, false);
            }

            var path = new Path
            {
                Stroke          = Brushes.Black,
                StrokeThickness = 1,
                Data            = g
            };


            //return path;
            var temp = new Polyline();

            temp.Stroke          = Brushes.Black;
            temp.StrokeThickness = 1;
            temp.Points          = transformedControlPointsList;
            return(temp);
        }
Example #59
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\MainControlUI.xaml"
                ((ZFreeGo.ChoicePhase.ControlCenter.MainControlUI)(target)).Loaded += new System.Windows.RoutedEventHandler(this.Window_Loaded);

            #line default
            #line hidden
                return;

            case 2:
                this.themes = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 3:
                this.portName = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 4:
                this.baudRate = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 5:
                this.dataBits = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 6:
                this.portParity = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 7:
                this.stopBits = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 8:
                this.openSerialPort = ((System.Windows.Controls.Button)(target));
                return;

            case 9:
                this.systemStateGroup = ((System.Windows.Controls.GroupBox)(target));
                return;

            case 10:
                this.setHezhaPhase = ((System.Windows.Controls.TextBox)(target));
                return;

            case 11:
                this.jiaoDuRadio = ((System.Windows.Controls.RadioButton)(target));

            #line 175 "..\..\MainControlUI.xaml"
                this.jiaoDuRadio.Checked += new System.Windows.RoutedEventHandler(this.jiaoDuRadio_Checked);

            #line default
            #line hidden
                return;

            case 12:
                this.huduRadio = ((System.Windows.Controls.RadioButton)(target));

            #line 176 "..\..\MainControlUI.xaml"
                this.huduRadio.Checked += new System.Windows.RoutedEventHandler(this.huDuRadio_Checked);

            #line default
            #line hidden
                return;

            case 13:
                this.cavas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 14:
                this.sinWave = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 15:
                this.lineCursor = ((System.Windows.Shapes.Line)(target));
                return;

            case 16:
                this.cavasRight = ((System.Windows.Controls.Canvas)(target));
                return;

            case 17:
                this.roundCursor = ((System.Windows.Shapes.Line)(target));
                return;
            }
            this._contentLoaded = true;
        }
Example #60
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:

            #line 8 "..\..\MainWindowKeyboard.xaml"
                ((Klawiatura.MainWindow)(target)).Loaded += new System.Windows.RoutedEventHandler(this.WindowLoaded);

            #line default
            #line hidden

            #line 8 "..\..\MainWindowKeyboard.xaml"
                ((Klawiatura.MainWindow)(target)).Activated += new System.EventHandler(this.WindowAtivated);

            #line default
            #line hidden

            #line 8 "..\..\MainWindowKeyboard.xaml"
                ((Klawiatura.MainWindow)(target)).GotFocus += new System.Windows.RoutedEventHandler(this.WindowGotFocus);

            #line default
            #line hidden
                return;

            case 2:
                this.grid = ((System.Windows.Controls.Grid)(target));
                return;

            case 3:
                this.button = ((System.Windows.Controls.Button)(target));
                return;

            case 4:
                this.button_1 = ((System.Windows.Controls.Button)(target));
                return;

            case 5:
                this.button_2 = ((System.Windows.Controls.Button)(target));
                return;

            case 6:
                this.button_3 = ((System.Windows.Controls.Button)(target));

            #line 39 "..\..\MainWindowKeyboard.xaml"
                this.button_3.Click += new System.Windows.RoutedEventHandler(this.ButtonClick4Test);

            #line default
            #line hidden
                return;

            case 7:
                this.button_4 = ((System.Windows.Controls.Button)(target));
                return;

            case 8:
                this.button_5 = ((System.Windows.Controls.Button)(target));
                return;

            case 9:
                this.button_6 = ((System.Windows.Controls.Button)(target));
                return;

            case 10:
                this.button_7 = ((System.Windows.Controls.Button)(target));
                return;

            case 11:
                this.button_8 = ((System.Windows.Controls.Button)(target));
                return;

            case 12:
                this.button_9 = ((System.Windows.Controls.Button)(target));
                return;

            case 13:
                this.buttonDash = ((System.Windows.Controls.Button)(target));
                return;

            case 14:
                this.buttonEqual = ((System.Windows.Controls.Button)(target));
                return;

            case 15:
                this.buttonUpComma = ((System.Windows.Controls.Button)(target));
                return;

            case 16:
                this.buttonq = ((System.Windows.Controls.Button)(target));
                return;

            case 17:
                this.buttonCapsLock = ((System.Windows.Controls.Button)(target));
                return;

            case 18:
                this.buttonTab = ((System.Windows.Controls.Button)(target));
                return;

            case 19:
                this.buttonw = ((System.Windows.Controls.Button)(target));
                return;

            case 20:
                this.button_ę = ((System.Windows.Controls.Button)(target));

            #line 151 "..\..\MainWindowKeyboard.xaml"
                this.button_ę.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_ę);

            #line default
            #line hidden
                return;

            case 21:
                this.buttonr = ((System.Windows.Controls.Button)(target));
                return;

            case 22:
                this.buttont = ((System.Windows.Controls.Button)(target));
                return;

            case 23:
                this.buttony = ((System.Windows.Controls.Button)(target));
                return;

            case 24:
                this.buttonu = ((System.Windows.Controls.Button)(target));
                return;

            case 25:
                this.buttoni = ((System.Windows.Controls.Button)(target));
                return;

            case 26:
                this.button_ó = ((System.Windows.Controls.Button)(target));

            #line 199 "..\..\MainWindowKeyboard.xaml"
                this.button_ó.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_ó);

            #line default
            #line hidden
                return;

            case 27:
                this.buttonp = ((System.Windows.Controls.Button)(target));
                return;

            case 28:
                this.buttonLeftSquareBracket = ((System.Windows.Controls.Button)(target));
                return;

            case 29:
                this.buttonRightSquareBracket = ((System.Windows.Controls.Button)(target));
                return;

            case 30:
                this.button_ą = ((System.Windows.Controls.Button)(target));

            #line 231 "..\..\MainWindowKeyboard.xaml"
                this.button_ą.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_ą);

            #line default
            #line hidden
                return;

            case 31:
                this.button_ś = ((System.Windows.Controls.Button)(target));

            #line 239 "..\..\MainWindowKeyboard.xaml"
                this.button_ś.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_ś);

            #line default
            #line hidden
                return;

            case 32:
                this.buttond = ((System.Windows.Controls.Button)(target));
                return;

            case 33:
                this.buttonf = ((System.Windows.Controls.Button)(target));
                return;

            case 34:
                this.buttong = ((System.Windows.Controls.Button)(target));
                return;

            case 35:
                this.buttonh = ((System.Windows.Controls.Button)(target));
                return;

            case 36:
                this.buttonj = ((System.Windows.Controls.Button)(target));
                return;

            case 37:
                this.buttonk = ((System.Windows.Controls.Button)(target));
                return;

            case 38:
                this.button_ł = ((System.Windows.Controls.Button)(target));

            #line 295 "..\..\MainWindowKeyboard.xaml"
                this.button_ł.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_ł);

            #line default
            #line hidden
                return;

            case 39:
                this.buttonSemicolon = ((System.Windows.Controls.Button)(target));
                return;

            case 40:
                this.buttonSingeQuotes = ((System.Windows.Controls.Button)(target));
                return;

            case 41:
                this.buttonv = ((System.Windows.Controls.Button)(target));
                return;

            case 42:
                this.buttonb = ((System.Windows.Controls.Button)(target));
                return;

            case 43:
                this.button_ń = ((System.Windows.Controls.Button)(target));

            #line 341 "..\..\MainWindowKeyboard.xaml"
                this.button_ń.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_ń);

            #line default
            #line hidden
                return;

            case 44:
                this.buttonm = ((System.Windows.Controls.Button)(target));
                return;

            case 45:
                this.buttonComma = ((System.Windows.Controls.Button)(target));
                return;

            case 46:
                this.buttonDot = ((System.Windows.Controls.Button)(target));
                return;

            case 47:
                this.buttonSlash = ((System.Windows.Controls.Button)(target));
                return;

            case 48:
                this.buttonBackspace = ((System.Windows.Controls.Button)(target));
                return;

            case 49:
                this.buttonBackSlash = ((System.Windows.Controls.Button)(target));
                return;

            case 50:
                this.buttonEnter = ((System.Windows.Controls.Button)(target));
                return;

            case 51:
                this.space = ((System.Windows.Controls.Button)(target));
                return;

            case 52:
                this.buttonExclamationMark = ((System.Windows.Controls.Button)(target));
                return;

            case 53:
                this.buttonStar = ((System.Windows.Controls.Button)(target));
                return;

            case 54:
                this.buttonRoundLeftBracket = ((System.Windows.Controls.Button)(target));
                return;

            case 55:
                this.buttonRightRoundBracket = ((System.Windows.Controls.Button)(target));
                return;

            case 56:
                this.buttonCurlyLeftBracket = ((System.Windows.Controls.Button)(target));
                return;

            case 57:
                this.buttonCurlyRightBracket = ((System.Windows.Controls.Button)(target));
                return;

            case 58:
                this.buttonColon = ((System.Windows.Controls.Button)(target));
                return;

            case 59:
                this.buttonQuotation = ((System.Windows.Controls.Button)(target));
                return;

            case 60:
                this.buttonLeftMinoritySign = ((System.Windows.Controls.Button)(target));
                return;

            case 61:
                this.buttonRightMinoritySign = ((System.Windows.Controls.Button)(target));
                return;

            case 62:
                this.buttonQuestionMark = ((System.Windows.Controls.Button)(target));
                return;

            case 63:
                this.buttonBitAnd = ((System.Windows.Controls.Button)(target));
                return;

            case 64:
                this.button_37_Copy5 = ((System.Windows.Controls.Button)(target));
                return;

            case 65:
                this.buttoną = ((System.Windows.Controls.Button)(target));
                return;

            case 66:
                this.buttonę = ((System.Windows.Controls.Button)(target));
                return;

            case 67:
                this.buttonź = ((System.Windows.Controls.Button)(target));
                return;

            case 68:
                this.buttonż = ((System.Windows.Controls.Button)(target));
                return;

            case 69:
                this.buttonń = ((System.Windows.Controls.Button)(target));
                return;

            case 70:
                this.buttonś = ((System.Windows.Controls.Button)(target));
                return;

            case 71:
                this.buttonć = ((System.Windows.Controls.Button)(target));
                return;

            case 72:
                this.buttonó = ((System.Windows.Controls.Button)(target));
                return;

            case 73:
                this.buttonOr = ((System.Windows.Controls.Button)(target));
                return;

            case 74:
                this.buttonBitNegation = ((System.Windows.Controls.Button)(target));
                return;

            case 75:
                this.buttonPercent = ((System.Windows.Controls.Button)(target));
                return;

            case 76:
                this.button_z = ((System.Windows.Controls.Button)(target));

            #line 605 "..\..\MainWindowKeyboard.xaml"
                this.button_z.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_żź);

            #line default
            #line hidden
                return;

            case 77:
                this.buttonx = ((System.Windows.Controls.Button)(target));
                return;

            case 78:
                this.button_c = ((System.Windows.Controls.Button)(target));

            #line 621 "..\..\MainWindowKeyboard.xaml"
                this.button_c.MouseWheel += new System.Windows.Input.MouseWheelEventHandler(this.PolishLetter_ć);

            #line default
            #line hidden
                return;

            case 79:
                this.buttonadd = ((System.Windows.Controls.Button)(target));
                return;

            case 80:
                this.buttonSharp = ((System.Windows.Controls.Button)(target));
                return;

            case 81:
                this.buttonDollar = ((System.Windows.Controls.Button)(target));
                return;

            case 82:
                this.buttonPlus = ((System.Windows.Controls.Button)(target));
                return;

            case 83:
                this.buttonXOR = ((System.Windows.Controls.Button)(target));
                return;

            case 84:
                this.textBox = ((System.Windows.Controls.TextBox)(target));

            #line 670 "..\..\MainWindowKeyboard.xaml"
                this.textBox.TextChanged += new System.Windows.Controls.TextChangedEventHandler(this.TextBoxTextChanged);

            #line default
            #line hidden
                return;

            case 85:
                this.buttonClear = ((System.Windows.Controls.Button)(target));

            #line 671 "..\..\MainWindowKeyboard.xaml"
                this.buttonClear.Click += new System.Windows.RoutedEventHandler(this.ClearContentOfTextBoxAndSuggestions);

            #line default
            #line hidden
                return;

            case 86:
                this.buttonToUpper = ((System.Windows.Controls.Button)(target));
                return;

            case 87:
                this.buttonToLower = ((System.Windows.Controls.Button)(target));
                return;

            case 88:
                this.buttonSearch = ((System.Windows.Controls.Button)(target));
                return;

            case 89:
                this.buttonSave = ((System.Windows.Controls.Button)(target));

            #line 703 "..\..\MainWindowKeyboard.xaml"
                this.buttonSave.Click += new System.Windows.RoutedEventHandler(this.SaveContentOfTextBoxToFile);

            #line default
            #line hidden
                return;

            case 90:
                this.buttonLang = ((System.Windows.Controls.Button)(target));
                return;

            case 91:
                this.canvasSuggestions = ((System.Windows.Controls.Canvas)(target));
                return;

            case 92:
                this.comboBoxForSuggestions = ((System.Windows.Controls.ComboBox)(target));

            #line 727 "..\..\MainWindowKeyboard.xaml"
                this.comboBoxForSuggestions.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.SelectItemFromComboBox);

            #line default
            #line hidden
                return;

            case 93:
                this.canvas = ((System.Windows.Controls.Canvas)(target));
                return;

            case 94:
                this.polylineTraceOfPath = ((System.Windows.Shapes.Polyline)(target));
                return;

            case 95:
                this.buttonDraw = ((System.Windows.Controls.Button)(target));
                return;

            case 96:
                this.one = ((System.Windows.Controls.Image)(target));
                return;

            case 97:
                this.autoSugg = ((System.Windows.Controls.Button)(target));
                return;
            }
            this._contentLoaded = true;
        }