コード例 #1
0
ファイル: SettingsProfile.cs プロジェクト: AkselH88/Endure
        public void Remove(string input)
        {
            int index = ChartInputs.IndexOf(input);

            ChartInputs.RemoveAt(index);
            Ellipses.RemoveAt(index);
            Lines.RemoveAt(index);
            WrapItems.Children.RemoveAt(index);

            /*foreach(StackPanel item in WrapItems.Children)
             * {
             *  if((item.Children[0] as TextBlock).Text == input)
             *  {
             *      WrapItems.Children.Remove(item);
             *      break;
             *  }
             * }*/
        }
コード例 #2
0
ファイル: SettingsProfile.cs プロジェクト: AkselH88/Endure
        public void Add(string name, Brush ellipse, Brush line)
        {
            ChartInputs.Add(name);
            Ellipses.Add(ellipse);
            Lines.Add(line);
            StackPanel Items = new StackPanel()
            {
                Margin = new Thickness()
                {
                    Left  = 5,
                    Right = 5
                },
                Orientation = Orientation.Vertical,
                Children    =
                {
                    CreateTextBlock(name),
                    CreateTextBox(name)
                }
            };

            WrapItems.Children.Add(Items);
        }