Esempio n. 1
0
        public void lineCreator(unitDialogue from, unitDialogue to)
        {
            Line line = new Line();

            line.Stroke          = System.Windows.Media.Brushes.LightSteelBlue;
            line.StrokeThickness = 5;
            Canvas.SetZIndex(line, -1);

            var c1 = lineCreator_coordinatesHelper(from);
            var c2 = lineCreator_coordinatesHelper(to);

            lineCoordinatesUpdater(line, c1.Item1, c1.Item2, 1);
            lineCoordinatesUpdater(line, c2.Item1, c2.Item2, 2);

            List <unitDialogue> connx = new List <unitDialogue>();

            connx.Add(from);
            connx.Add(to);
            line.Tag = connx;
            line.MouseRightButtonDown += new MouseButtonEventHandler(lineDeleter);
            linkfrom.paths[linkfrom.contextItemSelected].line = line;
            linkfrom.ContextBuilder();
            linkfrom.contextItemSelected = -1;
            jesus.Children.Add(line);
        }
        public void addOption(object Sender, RoutedEventArgs e)
        {
            object f**k = MaterialDesignThemes.Wpf.DialogHostEx.ShowDialog(hmm, null);

            if (open.paths.Count == 1 && open.paths[0].optname.ToString().Equals("Default"))
            {
                if (open.paths[0].next != null)
                {
                    mw.lineDeleter(open.paths[0].line, null);
                }
                open.paths.Clear();
            }
            open.paths.Add(new path("ayy"));
            open.ContextBuilder();
            refresher(open);
        }