Пример #1
0
 public dip(ui_dependency_line udl)
 {
     this.udl = udl;
 }
Пример #2
0
        public ui_tokenization_line(Grid g, ui_source_line usl)
            : base(g)
        {
            this.usl = usl;

            this.btn_add_alignment = new Button
            {
                Content = "=",
                Width = 28,
                Margin = new Thickness(2, 0, 2, 0),
            };
            btn_add_alignment.Click += (o, e) =>
            {
                var ib = i_row + 1;
                if (ib >= g.RowDefinitions.Count)
                    return;
                var utl_b = ui_source_line.tok_lines_all.FirstOrDefault(x => x.i_row == ib);
                if (utl_b == null)
                    return;
                if (utl_b == this)
                    throw new Exception();
                var ual = new ui_alignment_line(this, utl_b, ib);
                aligns.Add(ual);
            };
            Grid.SetRow(btn_add_alignment, i_row);
            Grid.SetColumn(btn_add_alignment, 1);
            g.Children.Add(btn_add_alignment);

            this.btn_add_dependency = new Button
            {
                Content = "D",
                Width = 28,
                Margin = new Thickness(2, 0, 2, 0),
            };
            btn_add_dependency.Click += (o, e) =>
            {
                var udl = new ui_dependency_line(this, i_row + 1);
                deps.Add(udl);
            };
            Grid.SetRow(btn_add_dependency, i_row);
            Grid.SetColumn(btn_add_dependency, 2);
            g.Children.Add(btn_add_dependency);

            this.sp_toks = new StackPanel
            {
                Orientation = Orientation.Horizontal,
            };
            Grid.SetRow(sp_toks, i_row);
            Grid.SetColumn(sp_toks, 4);
            Grid.SetColumnSpan(sp_toks, 99);
            g.Children.Add(sp_toks);
        }