- Timestamp:
- 10/11/14 03:32:15 (10 years ago)
- Location:
- branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3
- Files:
-
- 6 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/HeuristicLab.Optimization.Networks.Views-3.3.csproj
r11423 r11449 85 85 </ItemGroup> 86 86 <ItemGroup> 87 <Compile Include="EntitySelector.cs"> 88 <SubType>UserControl</SubType> 89 </Compile> 90 <Compile Include="EntitySelector.Designer.cs"> 91 <DependentUpon>EntitySelector.cs</DependentUpon> 92 </Compile> 93 <Compile Include="EntitySelectorDialog.cs"> 94 <SubType>Form</SubType> 95 </Compile> 96 <Compile Include="EntitySelectorDialog.Designer.cs"> 97 <DependentUpon>EntitySelectorDialog.cs</DependentUpon> 98 </Compile> 99 <Compile Include="EntityView.cs"> 100 <SubType>UserControl</SubType> 101 </Compile> 102 <Compile Include="EntityView.Designer.cs"> 103 <DependentUpon>EntityView.cs</DependentUpon> 104 </Compile> 87 105 <Compile Include="PortView.cs"> 88 106 <SubType>UserControl</SubType> -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/InputPortView.Designer.cs
r11438 r11449 27 27 private System.ComponentModel.IContainer components = null; 28 28 29 /// <summary>30 /// Clean up any resources being used.31 /// </summary>32 /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>33 protected override void Dispose(bool disposing) {34 if (disposing) {35 if (components != null) components.Dispose();36 }37 base.Dispose(disposing);38 }39 40 29 #region Component Designer generated code 41 30 … … 45 34 /// </summary> 46 35 private void InitializeComponent() { 36 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(InputPortView)); 47 37 this.outputPortGroupBox = new System.Windows.Forms.GroupBox(); 38 this.setOutputPortButton = new System.Windows.Forms.Button(); 39 this.clearOutputPortButton = new System.Windows.Forms.Button(); 48 40 this.outputPortView = new HeuristicLab.Optimization.Networks.Views.PortView(); 49 41 this.valueGroupBox.SuspendLayout(); … … 55 47 // valueGroupBox 56 48 // 57 this.valueGroupBox.Location = new System.Drawing.Point(0, 129);58 this.valueGroupBox.Size = new System.Drawing.Size(645, 388);59 this.valueGroupBox.TabIndex = 6;49 this.valueGroupBox.Location = new System.Drawing.Point(0, 82); 50 this.valueGroupBox.Size = new System.Drawing.Size(645, 435); 51 this.valueGroupBox.TabIndex = 4; 60 52 // 61 53 // valuePanel 62 54 // 63 this.valuePanel.Size = new System.Drawing.Size(633, 363);55 this.valuePanel.Size = new System.Drawing.Size(633, 410); 64 56 // 65 57 // valueViewHost 66 58 // 67 this.valueViewHost.Size = new System.Drawing.Size(633, 363); 68 // 69 // pathTextBox 70 // 71 this.pathTextBox.Location = new System.Drawing.Point(71, 26); 72 this.pathTextBox.Size = new System.Drawing.Size(549, 20); 59 this.valueViewHost.Size = new System.Drawing.Size(633, 410); 73 60 // 74 61 // nameTextBox … … 83 70 this.outputPortGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 84 71 | System.Windows.Forms.AnchorStyles.Right))); 72 this.outputPortGroupBox.Controls.Add(this.setOutputPortButton); 73 this.outputPortGroupBox.Controls.Add(this.clearOutputPortButton); 85 74 this.outputPortGroupBox.Controls.Add(this.outputPortView); 86 this.outputPortGroupBox.Location = new System.Drawing.Point(0, 52);75 this.outputPortGroupBox.Location = new System.Drawing.Point(0, 26); 87 76 this.outputPortGroupBox.Name = "outputPortGroupBox"; 88 this.outputPortGroupBox.Size = new System.Drawing.Size(645, 71);89 this.outputPortGroupBox.TabIndex = 5;77 this.outputPortGroupBox.Size = new System.Drawing.Size(645, 50); 78 this.outputPortGroupBox.TabIndex = 3; 90 79 this.outputPortGroupBox.TabStop = false; 91 80 this.outputPortGroupBox.Text = "&Output Port"; 92 this.outputPortGroupBox.DragDrop += new System.Windows.Forms.DragEventHandler(this.outputPortGroupBox_DragDrop); 93 this.outputPortGroupBox.DragEnter += new System.Windows.Forms.DragEventHandler(this.outputPortGroupBox_DragEnterOver); 94 this.outputPortGroupBox.DragOver += new System.Windows.Forms.DragEventHandler(this.outputPortGroupBox_DragEnterOver); 81 // 82 // setOutputPortButton 83 // 84 this.setOutputPortButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Edit; 85 this.setOutputPortButton.Location = new System.Drawing.Point(6, 19); 86 this.setOutputPortButton.Name = "setOutputPortButton"; 87 this.setOutputPortButton.Size = new System.Drawing.Size(24, 24); 88 this.setOutputPortButton.TabIndex = 0; 89 this.setOutputPortButton.UseVisualStyleBackColor = true; 90 this.setOutputPortButton.Click += new System.EventHandler(this.setOutputPortButton_Click); 91 // 92 // clearOutputPortButton 93 // 94 this.clearOutputPortButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Remove; 95 this.clearOutputPortButton.Location = new System.Drawing.Point(36, 19); 96 this.clearOutputPortButton.Name = "clearOutputPortButton"; 97 this.clearOutputPortButton.Size = new System.Drawing.Size(24, 24); 98 this.clearOutputPortButton.TabIndex = 1; 99 this.clearOutputPortButton.UseVisualStyleBackColor = true; 100 this.clearOutputPortButton.Click += new System.EventHandler(this.clearOutputPortButton_Click); 95 101 // 96 102 // outputPortView 97 103 // 98 this.outputPortView.Caption = "Port View"; 104 this.outputPortView.AllowDrop = true; 105 this.outputPortView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 106 | System.Windows.Forms.AnchorStyles.Left) 107 | System.Windows.Forms.AnchorStyles.Right))); 108 this.outputPortView.Caption = "Output Port View"; 99 109 this.outputPortView.Content = null; 100 this.outputPortView.Dock = System.Windows.Forms.DockStyle.Fill; 101 this.outputPortView.Location = new System.Drawing.Point(3, 16); 110 this.outputPortView.Location = new System.Drawing.Point(66, 21); 102 111 this.outputPortView.Name = "outputPortView"; 103 112 this.outputPortView.ReadOnly = true; 104 this.outputPortView.Size = new System.Drawing.Size(639, 52); 105 this.outputPortView.TabIndex = 0; 113 this.outputPortView.Size = new System.Drawing.Size(573, 23); 114 this.outputPortView.TabIndex = 2; 115 this.outputPortView.DragDrop += new System.Windows.Forms.DragEventHandler(this.outputPortView_DragDrop); 116 this.outputPortView.DragEnter += new System.Windows.Forms.DragEventHandler(this.outputPortView_DragEnterOver); 117 this.outputPortView.DragOver += new System.Windows.Forms.DragEventHandler(this.outputPortView_DragEnterOver); 106 118 // 107 119 // InputPortView … … 110 122 this.Controls.Add(this.outputPortGroupBox); 111 123 this.Name = "InputPortView"; 112 this.Controls.SetChildIndex(this.pathLabel, 0);113 this.Controls.SetChildIndex(this.pathTextBox, 0);114 124 this.Controls.SetChildIndex(this.nameLabel, 0); 115 125 this.Controls.SetChildIndex(this.nameTextBox, 0); … … 130 140 protected System.Windows.Forms.GroupBox outputPortGroupBox; 131 141 protected PortView outputPortView; 142 protected System.Windows.Forms.Button clearOutputPortButton; 143 protected System.Windows.Forms.Button setOutputPortButton; 132 144 133 145 -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/InputPortView.cs
r11438 r11449 30 30 [Content(typeof(IInputPort), false)] 31 31 public partial class InputPortView : ValuePortView { 32 protected EntitySelectorDialog entitySelectorDialog; 33 32 34 public new IInputPort Content { 33 35 get { return (IInputPort)base.Content; } … … 37 39 public InputPortView() { 38 40 InitializeComponent(); 41 } 42 43 protected override void Dispose(bool disposing) { 44 if (disposing) { 45 if (entitySelectorDialog != null) entitySelectorDialog.Dispose(); 46 if (components != null) components.Dispose(); 47 } 48 base.Dispose(disposing); 39 49 } 40 50 … … 56 66 base.SetEnabledStateOfControls(); 57 67 outputPortGroupBox.Enabled = Content != null && !ReadOnly; 68 setOutputPortButton.Enabled = Content != null && !ReadOnly; 69 clearOutputPortButton.Enabled = Content != null && Content.OutputPort != null && !ReadOnly; 58 70 } 59 71 … … 62 74 Invoke(new EventHandler(Content_OutputPortChanged), sender, e); 63 75 else { 76 clearOutputPortButton.Enabled = Content.OutputPort != null && !ReadOnly; 64 77 outputPortView.Content = Content.OutputPort; 65 78 } 66 79 } 67 80 68 protected virtual void outputPortGroupBox_DragEnterOver(object sender, DragEventArgs e) { 81 protected virtual void setOutputPortButton_Click(object sender, EventArgs e) { 82 if (entitySelectorDialog == null) { 83 entitySelectorDialog = new EntitySelectorDialog(); 84 entitySelectorDialog.Caption = "Select Output Port"; 85 } 86 87 IEntity root = Content; 88 while (root.Parent != null) 89 root = root.Parent; 90 entitySelectorDialog.EntitySelector.Root = root; 91 92 if (entitySelectorDialog.ShowDialog(this) == DialogResult.OK) { 93 Content.OutputPort = entitySelectorDialog.EntitySelector.SelectedEntity as IOutputPort; 94 } 95 } 96 protected virtual void clearOutputPortButton_Click(object sender, EventArgs e) { 97 Content.OutputPort = null; 98 } 99 100 protected virtual void outputPortView_DragEnterOver(object sender, DragEventArgs e) { 69 101 e.Effect = DragDropEffects.None; 70 102 if (!ReadOnly && (e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) is IOutputPort)) { … … 72 104 } 73 105 } 74 protected virtual void outputPort GroupBox_DragDrop(object sender, DragEventArgs e) {106 protected virtual void outputPortView_DragDrop(object sender, DragEventArgs e) { 75 107 if (e.Effect != DragDropEffects.None) { 76 108 IOutputPort port = e.Data.GetData(HeuristicLab.Common.Constants.DragDropDataFormat) as IOutputPort; -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/NetworkView.cs
r11409 r11449 28 28 [Content(typeof(Network), true)] 29 29 [Content(typeof(INetwork), false)] 30 public partial class NetworkView : NamedItemView {30 public partial class NetworkView : EntityView { 31 31 public new INetwork Content { 32 32 get { return (INetwork)base.Content; } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/NodeView.cs
r11409 r11449 28 28 [Content(typeof(Node), true)] 29 29 [Content(typeof(INode), false)] 30 public partial class NodeView : NamedItemView {30 public partial class NodeView : EntityView { 31 31 public new INode Content { 32 32 get { return (INode)base.Content; } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/PortView.Designer.cs
r11438 r11449 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.pathLabel = new System.Windows.Forms.Label();48 this.pathTextBox = new System.Windows.Forms.TextBox();49 47 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 50 48 this.SuspendLayout(); … … 54 52 this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft); 55 53 this.errorProvider.SetIconPadding(this.nameTextBox, 2); 56 this.nameTextBox.Location = new System.Drawing.Point(69, 0);57 this.nameTextBox.Size = new System.Drawing.Size(551, 20);58 //59 // infoLabel60 //61 this.infoLabel.Location = new System.Drawing.Point(626, 3);62 //63 // pathLabel64 //65 this.pathLabel.AutoSize = true;66 this.pathLabel.Location = new System.Drawing.Point(3, 29);67 this.pathLabel.Name = "pathLabel";68 this.pathLabel.Size = new System.Drawing.Size(32, 13);69 this.pathLabel.TabIndex = 3;70 this.pathLabel.Text = "&Path:";71 //72 // pathTextBox73 //74 this.pathTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)75 | System.Windows.Forms.AnchorStyles.Right)));76 this.pathTextBox.Location = new System.Drawing.Point(69, 26);77 this.pathTextBox.Name = "pathTextBox";78 this.pathTextBox.ReadOnly = true;79 this.pathTextBox.Size = new System.Drawing.Size(551, 20);80 this.pathTextBox.TabIndex = 4;81 54 // 82 55 // PortView 83 56 // 84 57 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 85 this.Controls.Add(this.pathTextBox);86 this.Controls.Add(this.pathLabel);87 58 this.Name = "PortView"; 88 this.Size = new System.Drawing.Size(645, 517);89 this.Controls.SetChildIndex(this.nameLabel, 0);90 this.Controls.SetChildIndex(this.nameTextBox, 0);91 this.Controls.SetChildIndex(this.infoLabel, 0);92 this.Controls.SetChildIndex(this.pathLabel, 0);93 this.Controls.SetChildIndex(this.pathTextBox, 0);94 59 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 95 60 this.ResumeLayout(false); … … 100 65 #endregion 101 66 102 protected System.Windows.Forms.Label pathLabel;103 protected System.Windows.Forms.TextBox pathTextBox;104 67 105 68 -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/PortView.cs
r11438 r11449 29 29 [Content(typeof(Port), true)] 30 30 [Content(typeof(IPort), false)] 31 public partial class PortView : NamedItemView {31 public partial class PortView : EntityView { 32 32 public new IPort Content { 33 33 get { return (IPort)base.Content; } … … 39 39 } 40 40 41 protected override void DeregisterContentEvents() {42 Content.PathChanged -= Content_PathChanged;43 base.DeregisterContentEvents();44 }45 protected override void RegisterContentEvents() {46 base.RegisterContentEvents();47 Content.PathChanged += Content_PathChanged;48 }49 50 41 protected override void OnContentChanged() { 51 42 base.OnContentChanged(); 52 pathTextBox.Text = Content == null ? string.Empty : Content.Path;53 43 } 54 44 55 45 protected override void SetEnabledStateOfControls() { 56 46 base.SetEnabledStateOfControls(); 57 pathTextBox.Enabled = Content != null;58 }59 60 protected virtual void Content_PathChanged(object sender, System.EventArgs e) {61 if (InvokeRequired)62 Invoke(new EventHandler(Content_PathChanged), sender, e);63 else {64 pathTextBox.Text = Content.Path;65 }66 47 } 67 48 } -
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/ValuePortView.Designer.cs
r11438 r11449 64 64 | System.Windows.Forms.AnchorStyles.Right))); 65 65 this.valueGroupBox.Controls.Add(this.valuePanel); 66 this.valueGroupBox.Location = new System.Drawing.Point(0, 52);66 this.valueGroupBox.Location = new System.Drawing.Point(0, 26); 67 67 this.valueGroupBox.Name = "valueGroupBox"; 68 this.valueGroupBox.Size = new System.Drawing.Size(645, 4 65);69 this.valueGroupBox.TabIndex = 5;68 this.valueGroupBox.Size = new System.Drawing.Size(645, 491); 69 this.valueGroupBox.TabIndex = 3; 70 70 this.valueGroupBox.TabStop = false; 71 71 this.valueGroupBox.Text = "Value"; … … 79 79 this.valuePanel.Location = new System.Drawing.Point(6, 19); 80 80 this.valuePanel.Name = "valuePanel"; 81 this.valuePanel.Size = new System.Drawing.Size(633, 4 40);81 this.valuePanel.Size = new System.Drawing.Size(633, 466); 82 82 this.valuePanel.TabIndex = 0; 83 83 // … … 91 91 this.valueViewHost.Name = "valueViewHost"; 92 92 this.valueViewHost.ReadOnly = false; 93 this.valueViewHost.Size = new System.Drawing.Size(633, 4 40);93 this.valueViewHost.Size = new System.Drawing.Size(633, 466); 94 94 this.valueViewHost.TabIndex = 0; 95 95 this.valueViewHost.ViewsLabelVisible = true; … … 101 101 this.Controls.Add(this.valueGroupBox); 102 102 this.Name = "ValuePortView"; 103 this.Controls.SetChildIndex(this.pathLabel, 0);104 this.Controls.SetChildIndex(this.pathTextBox, 0);105 103 this.Controls.SetChildIndex(this.nameLabel, 0); 106 104 this.Controls.SetChildIndex(this.nameTextBox, 0);
Note: See TracChangeset
for help on using the changeset viewer.