/// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void CreateFunction_Executed(object sender, ExecutedRoutedEventArgs e)
        {
            SequenceParametersWindow win = new SequenceParametersWindow();
            win.Title = "New Function parameters";
            win.InputName = "name of the function";
            win.InputDescription = "";
            win.IsValidInputNameCallback = GraphDataManager.Instance.IsValidFunctionName;
            win.Owner = MainWindow.Instance;

            if (win.ShowDialog() == false)
            {
                return;
            }

            SequenceFunction newSeq = new SequenceFunction(win.InputName);
            newSeq.Description = win.InputDescription;
            GraphDataManager.Instance.AddFunction(newSeq);

            FlowGraphControlViewModel wm = new FlowGraphControlViewModel(newSeq);
            wm.InitialNodeFromNewFunction();
            FlowGraphManager.Instance.Add(wm);

            MainWindow.Instance.FlowGraphManagerControl.OpenGraphInNewTab(newSeq);
        }
示例#2
0
 /// <summary>
 ///
 /// </summary>
 public void RemoveFunction(SequenceFunction seq_)
 {
     m_GraphFunctionList.Remove(seq_);
 }
示例#3
0
 /// <summary>
 ///
 /// </summary>
 public void AddFunction(SequenceFunction seq_)
 {
     m_GraphFunctionList.Add(seq_);
 }