private void MenuItem_Add_Defaults_V3DataOnGrid_Click(object sender, RoutedEventArgs e) { V3DataOnGrid data = new V3DataOnGrid("Default", new DateTime(), new Grid1D(1, 2), new Grid1D(1, 2)); data.InitRandom(0, 1); Collection.Add(data); }
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { if (value != null) { V3DataOnGrid item = (V3DataOnGrid)value; return("nodes on Ox: " + item.x.num.ToString() + "\nnodes on Oy: " + item.y.num.ToString()); } return(""); }
public void AddDefaults() { V3DataOnGrid don1 = new V3DataOnGrid(new Grid1D(5.0f, 0), new Grid1D(5.0f, 0), "a", new DateTime(2020, 11, 20)); V3DataCollection dc1 = new V3DataCollection("a", new DateTime(2020, 11, 20)); V3DataOnGrid don2 = new V3DataOnGrid(new Grid1D(0.5f, 6), new Grid1D(0.5f, 6), "aa", new DateTime(2020, 11, 20)); don2.InitRandom(0.0f, 1.0f); V3DataCollection dc2 = new V3DataCollection("aa", new DateTime(2020, 11, 20)); dc2.InitRandom(10, 3.0f, 3.0f, 0.0f, 1.0f); V3DataOnGrid don3 = new V3DataOnGrid(new Grid1D(1.0f, 5), new Grid1D(0.5f, 7), "aaa", new DateTime(2020, 11, 20)); don3.InitRandom(0.0f, 1.0f); V3DataCollection dc3 = (V3DataCollection)(don3); collect.Add(don1); collect.Add(dc1); collect.Add(don2); collect.Add(dc2); collect.Add(don3); collect.Add(dc3); }
public void AddDefaults() { V3DataOnGrid don1 = new V3DataOnGrid(new Grid1D(5.0f, 0), new Grid1D(5.0f, 0), "a", new DateTime(2020, 11, 20)); V3DataCollection dc1 = new V3DataCollection("a", new DateTime(2020, 11, 20)); V3DataOnGrid don2 = new V3DataOnGrid(new Grid1D(0.5f, 6), new Grid1D(0.5f, 6), "aa", new DateTime(2020, 11, 20)); don2.InitRandom(0.0f, 1.0f); V3DataCollection dc2 = new V3DataCollection("aa", new DateTime(2020, 11, 20)); dc2.InitRandom(10, 3.0f, 3.0f, 0.0f, 1.0f); V3DataOnGrid don3 = new V3DataOnGrid(new Grid1D(1.0f, 5), new Grid1D(0.5f, 7), "aaa", new DateTime(2020, 11, 20)); don3.InitRandom(0.0f, 1.0f); V3DataCollection dc3 = (V3DataCollection)(don3); collect.Add(don1); collect.Add(dc1); collect.Add(don2); collect.Add(dc2); collect.Add(don3); collect.Add(dc3); CollectionChanged?.Invoke(this, new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); }