예제 #1
0
        private void AddGraph(object sender, RoutedEventArgs e)
        {
            var name = GraphNameBox.Text.Trim();
            var dim  = ((Button)sender).Content;

            if (string.IsNullOrWhiteSpace(name) || _graphs.Any(it => it.Name == name))
            {
                return;
            }
            _graphs.Add(new GraphicViewModel(name, byte.Parse((string)dim)));
            GraphNameBox.Text = $"Graph{++_graphCount}";
            GraphNameBox.SelectAll();
            GraphList.SelectedIndex = GraphList.Items.Count - 1;
        }
예제 #2
0
 private void GraphListPane_PaneOpening(SplitView sender, object args)
 {
     GraphNameBox.Text = $"Graph{_graphCount}";
     GraphNameBox.SelectAll();
 }