示例#1
0
        private void ListViewItem_PreviewNode(object sender, MouseButtonEventArgs e)
        {
            Node        a  = (Node)((ListViewItem)sender).Content;
            ActionsList al = new ActionsList(a);

            // a.name = "test";

            al.Show();
            Console.WriteLine(a.name);

            Console.WriteLine(dcsTree.Last().name);
        }
示例#2
0
 public void insertLeftOrRight(object sender, bool right = false)
 {
     if (!String.IsNullOrEmpty(nodeName.Text))
     {
         Button btn   = (Button)sender;
         int    index = int.Parse(btn.Tag.ToString());
         Config.actionBT.Insert(index, nodeName.Text, right);
         dcsTree.Add(Config.actionBT.getNodeById(Config.actionBT.lastAsgId));
         ActionsList al = new ActionsList(dcsTree.Last());
         al.Show();
         ((MainWindow)System.Windows.Application.Current.MainWindow).UpdateLayout();
         nodeName.Text = "";
     }
 }
示例#3
0
        private void addRoot_Onclick(object sender, RoutedEventArgs e)
        {
            //actions.Add(new Action(ComboBox1.SelectionBoxItem.ToString(), true));
            NewImageBtn.Visibility = Visibility.Hidden;

            nodeName.Text = String.IsNullOrEmpty(nodeName.Text) ? "Root" : nodeName.Text;
            Config.actionBT.Insert(nodeName.Text);
            dcsTree.Add(Config.actionBT.getNodeById(Config.actionBT.lastId));
            ActionsList al = new ActionsList(dcsTree.Last());

            al.Show();
            ((MainWindow)System.Windows.Application.Current.MainWindow).UpdateLayout();
            nodeName.Text = "";
        }