コード例 #1
0
        private void AddConnection(OutputReference connection)
        {
            if (connection.SourceToolId == Tool.Identifier)
            {
                throw new Exception("Tool cannot be referenced by itself.");
            }

            _outputs.Add(connection);
        }
コード例 #2
0
        private void LinkButton_Click(object sender, RoutedEventArgs e)
        {
            if (!(entityList.SelectedItem is Tool srcTool))
            {
                throw new ArgumentNullException(nameof(srcTool));
            }
            Reference = new OutputReference(srcTool.Identifier, entityOutputs.SelectedItem as Output);

            Close();
        }
コード例 #3
0
        public ToolConnectionWindow(IEnumerable <Tool> toolControls, Tool currentTool, OutputReference reference = null)
        {
            InitializeComponent();
            _currentTool = currentTool;

            Reference = reference;
            entityList.ItemsSource = toolControls;
            _outputList.Add(new Output());
            entityOutputs.ItemsSource = _outputList;
        }