Esempio n. 1
0
        /// <summary>
        ///     Method triggered when the usesr selects the "Add Input/Output" button
        /// </summary>
        private void AddIOButton_Click(object sender, System.EventArgs e)
        {
            // Show the Add IO Panel
            new IOBlockCreatorPanel(_core).ShowDialog();

            // Refresh the listings
            ListBlocks();
            BlockViewComponent.SetViewingComponent(null);
        }
Esempio n. 2
0
        /// <summary>
        ///     Method triggered when the user selects the "Delete Block" button
        /// </summary>
        private void DeleteBlockButton_Click(object sender, System.EventArgs e)
        {
            // Remove the selected block
            if (_selected == null)
            {
                return;
            }
            _core.DeleteConnectable(_selected);
            _selected = null;

            // Refresh the listings
            ListBlocks();
            BlockViewComponent.SetViewingComponent(null);
        }
Esempio n. 3
0
        /// <summary>
        ///     Method triggere when the user selects a block to edit
        /// </summary>
        private void BlockList_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (BlockList.SelectedIndex < 0)
            {
                _selected = null;
                BlockViewComponent.SetViewingComponent(null);
                ConnectionEditor.SetViewingComponent(_core, null);
                return;
            }

            // List information about the selected block
            _selected = (IConnectable)BlockList.SelectedItem;
            BlockViewComponent.SetViewingComponent(_selected);

            // Update the connection connector
            ConnectionEditor.SetViewingComponent(_core, _selected);
        }