void Populate()
 {
     foreach (var p in graph.CustomFunctions)
     {
         FunctionView cp = new FunctionView(p);
         cp.OnRemove += Cp_OnRemove;
         Stack.Children.Add(cp);
     }
 }
 private void AddFunc_Click(object sender, RoutedEventArgs e)
 {
     if (graph != null)
     {
         int           index = graph.CustomFunctions.Count;
         string        name  = "Func" + index;
         FunctionGraph gp    = new FunctionGraph(name);
         gp.AssignParentGraph(graph);
         graph.AddCustomFunction(gp);
         FunctionView cp = new FunctionView(gp);
         cp.OnRemove += Cp_OnRemove;
         Stack.Children.Add(cp);
     }
 }
Exemple #3
0
        void Populate()
        {
            foreach (var k in graph.ParameterFunctions.Keys)
            {
                string[] split = k.Split('.');

                if (split.Length >= 2)
                {
                    FunctionView fp = new FunctionView(split[0], split[1], graph.ParameterFunctions[k]);
                    fp.OnRemove += Cp_OnRemove;
                    Stack.Children.Add(fp);
                }
            }
        }
 private void Cp_OnRemove(FunctionView c)
 {
     Stack.Children.Remove(c);
 }