Beispiel #1
0
        public ui_alignment_line(ui_tokenization_line utl_a, ui_tokenization_line utl_b, int i_row)
            : base(utl_a.g, i_row)
        {
            this.utl_a = utl_a;
            this.utl_b = utl_b;

            g.UpdateLayout();

            foreach (ui_tokenization_line.tok_display a in utl_a.sp_toks.Children)
            {
                foreach (ui_tokenization_line.tok_display b in utl_b.sp_toks.Children)
                {
                    var l = AttachmentHandles.ConnectVertical(b, a);
                    Grid.SetRowSpan(l, 99);
                    Grid.SetColumnSpan(l, 99);
                    Panel.SetZIndex(l, 99);
                    g.Children.Add(l);
                }
            }
        }
Beispiel #2
0
 void add_new_tok_line()
 {
     utl_cur_edit = new ui_tokenization_line(g, this);
     tok_lines.Add(utl_cur_edit);
     tok_lines_all.Add(utl_cur_edit);
 }
Beispiel #3
0
        public ui_dependency_line(ui_tokenization_line utl, int i_row)
            : base(utl.g, i_row)
        {
            var b = new Border
            {
                BorderBrush = Brushes.Black,
                BorderThickness = new Thickness(1),
                Margin = new Thickness(3),
                Child = new StackPanel
                {
                    Orientation = Orientation.Vertical,
                },
            };
            Grid.SetRow(b, i_row);
            Grid.SetColumn(b, 4);
            Grid.SetColumnSpan(b, 99);
            g.Children.Add(b);
            var sp_updn = (StackPanel)b.Child;

            this.tok_bin = new dip(this)
            {
                Height = 50,
                Background = Brushes.AliceBlue,
            };
            sp_updn.Children.Add(tok_bin);

            this.tree_pan = new TreeLayoutPanel
            {
                MinHeight = 40,
                Background = Brushes.Gainsboro,
            };
            sp_updn.Children.Add(tree_pan);

            ui_tokenization_line.tok_display td;
            double x = 0;
            foreach (ui_tokenization_line.tok_display _td in utl.sp_toks.Children)
            {
                td = new ui_tokenization_line.tok_display(_td.edge);
                DragItemPanel.SetLeft(td, x);
                tok_bin.Children.Add(td);
                td.Measure(util.infinite_size);
                x += td.DesiredSize.Width + 8;
            }
            td = new ui_tokenization_line.tok_display("EC");
            DragItemPanel.SetLeft(td, x);
            tok_bin.Children.Add(td);
        }