/// <summary> /// Updates the information about the currently selected block /// </summary> public void ListBlockContent() { // Only show things if the selected block is available if (_selected == null) { splitContainer1.Hide(); AttributeList.SetComponent(null); } else { splitContainer1.Show(); // Update the data on the top page BlockTypeName.Text = _selected.InternalName; AttributeList.SetComponent(_selected); } }
/// <summary> /// Updates the information about the currently selected block /// </summary> public void ListBlockContent() { // Only show things if the selected block is available if (_selected == null) { splitContainer1.Hide(); AttributeList.SetComponent(null); } else { splitContainer1.Show(); // Update the data on the top page BlockName.Text = _selected.Name; var realType = _selected.InternalName; var dc = _selected as DataConnection; if (dc != null) { if (dc.MediaConnection != null) { realType += $"\nMedia : {dc.MediaConnection.InternalName}"; } if (dc.Poller != null) { realType += $"\nPoller : {dc.Poller.InternalName}"; } if (dc.Converter != null) { realType += $"\nConverter : {dc.Converter.InternalName}"; } } BlockDataText.Text = $"Type : {realType}\nAvailable Inputs : {(_selected.InputCount == -1 ? "Unlimited" : _selected.InputCount.ToString())}\nAvailable Outputs : {_selected.OutputCount}";; AttributeList.SetComponent(_selected); } }
/// <summary> /// Changes the block that is being edited /// </summary> /// <param name="component">The IConnectable block editing is switching to</param> public void SetViewingComponent(DataConnection component) { _selected = component; AttributeList.SetComponent(_selected); ListBlockContent(); }