コード例 #1
0
        void newThumb_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            cedit = new ComponentEdit(entityfile);

            MyThumb thumb = sender as MyThumb;

            cedit.Left = e.GetPosition(canvas1).X;
            cedit.Top  = e.GetPosition(canvas1).Y;

            cedit.stackPanel1.Children.Clear();


            Component clicked = LoadedComponents[thumb.Title];

            foreach (var item in clicked.Items)
            {
                Label lb1 = new Label();
                lb1.Content = item.name;

                TextBox tb1 = new TextBox();
                tb1.Name = "_" + item.name;

                cedit.stackPanel1.Children.Add(lb1);
                cedit.stackPanel1.Children.Add(tb1);
            }

            cedit.editingcomponentname = thumb.Title;
            cedit.Title = "Editing Component " + thumb.Title;
            cedit.Owner = this;
            cedit.Show();
        }
コード例 #2
0
        void newThumb_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            
            cedit = new ComponentEdit(entityfile);

            MyThumb thumb = sender as MyThumb;

            cedit.Left = e.GetPosition(canvas1).X;
            cedit.Top = e.GetPosition(canvas1).Y;

            cedit.stackPanel1.Children.Clear();

            
            Component clicked = LoadedComponents[thumb.Title];

            foreach (var item in clicked.Items)
            {
                Label lb1 = new Label();
                lb1.Content = item.name;

                TextBox tb1 = new TextBox();
                tb1.Name = "_"+item.name ;

                cedit.stackPanel1.Children.Add(lb1);
                cedit.stackPanel1.Children.Add(tb1);
            }

            cedit.editingcomponentname = thumb.Title;
            cedit.Title = "Editing Component " + thumb.Title;
            cedit.Owner = this;
            cedit.Show();
        }