Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/07/14 08:32:58 (10 years ago)
Author:
swagner
Message:

#2205: Worked on optimization networks

Location:
branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3
Files:
2 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/HeuristicLab.Optimization.Networks.Views-3.3.csproj

    r11412 r11421  
    4949  </ItemGroup>
    5050  <ItemGroup>
     51    <Compile Include="PortView.cs">
     52      <SubType>UserControl</SubType>
     53    </Compile>
     54    <Compile Include="PortView.Designer.cs">
     55      <DependentUpon>PortView.cs</DependentUpon>
     56    </Compile>
    5157    <Compile Include="VariablesNodeView.cs">
    5258      <SubType>UserControl</SubType>
     
    6773      <DependentUpon>InputPortView.cs</DependentUpon>
    6874    </Compile>
    69     <Compile Include="PortView.cs">
     75    <Compile Include="ValuePortView.cs">
    7076      <SubType>UserControl</SubType>
    7177    </Compile>
    72     <Compile Include="PortView.Designer.cs">
    73       <DependentUpon>PortView.cs</DependentUpon>
     78    <Compile Include="ValuePortView.Designer.cs">
     79      <DependentUpon>ValuePortView.cs</DependentUpon>
    7480    </Compile>
    7581    <Compile Include="NodeView.cs">
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/InputPortView.cs

    r11412 r11421  
    2929  [Content(typeof(IInputPort<>), false)]
    3030  [Content(typeof(IInputPort), false)]
    31   public partial class InputPortView : PortView {
     31  public partial class InputPortView : ValuePortView {
    3232    public new IInputPort Content {
    3333      get { return (IInputPort)base.Content; }
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/PortView.Designer.cs

    r11412 r11421  
    4545    /// </summary>
    4646    private void InitializeComponent() {
    47       this.valueGroupBox = new System.Windows.Forms.GroupBox();
    48       this.valuePanel = new System.Windows.Forms.Panel();
    49       this.valueViewHost = new HeuristicLab.MainForm.WindowsForms.ViewHost();
    5047      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    51       this.valueGroupBox.SuspendLayout();
    52       this.valuePanel.SuspendLayout();
    5348      this.SuspendLayout();
    5449      //
     
    6459      this.infoLabel.Location = new System.Drawing.Point(626, 3);
    6560      //
    66       // valueGroupBox
    67       //
    68       this.valueGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    69             | System.Windows.Forms.AnchorStyles.Left)
    70             | System.Windows.Forms.AnchorStyles.Right)));
    71       this.valueGroupBox.Controls.Add(this.valuePanel);
    72       this.valueGroupBox.Location = new System.Drawing.Point(0, 26);
    73       this.valueGroupBox.Name = "valueGroupBox";
    74       this.valueGroupBox.Size = new System.Drawing.Size(645, 491);
    75       this.valueGroupBox.TabIndex = 3;
    76       this.valueGroupBox.TabStop = false;
    77       this.valueGroupBox.Text = "Value";
    78       //
    79       // valuePanel
    80       //
    81       this.valuePanel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
    82             | System.Windows.Forms.AnchorStyles.Left)
    83             | System.Windows.Forms.AnchorStyles.Right)));
    84       this.valuePanel.Controls.Add(this.valueViewHost);
    85       this.valuePanel.Location = new System.Drawing.Point(6, 19);
    86       this.valuePanel.Name = "valuePanel";
    87       this.valuePanel.Size = new System.Drawing.Size(633, 466);
    88       this.valuePanel.TabIndex = 0;
    89       //
    90       // valueViewHost
    91       //
    92       this.valueViewHost.Caption = "View";
    93       this.valueViewHost.Content = null;
    94       this.valueViewHost.Dock = System.Windows.Forms.DockStyle.Fill;
    95       this.valueViewHost.Enabled = false;
    96       this.valueViewHost.Location = new System.Drawing.Point(0, 0);
    97       this.valueViewHost.Name = "valueViewHost";
    98       this.valueViewHost.ReadOnly = false;
    99       this.valueViewHost.Size = new System.Drawing.Size(633, 466);
    100       this.valueViewHost.TabIndex = 0;
    101       this.valueViewHost.ViewsLabelVisible = true;
    102       this.valueViewHost.ViewType = null;
    103       //
    10461      // PortView
    10562      //
    10663      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
    107       this.Controls.Add(this.valueGroupBox);
    10864      this.Name = "PortView";
    10965      this.Size = new System.Drawing.Size(645, 517);
     
    11167      this.Controls.SetChildIndex(this.nameTextBox, 0);
    11268      this.Controls.SetChildIndex(this.infoLabel, 0);
    113       this.Controls.SetChildIndex(this.valueGroupBox, 0);
    11469      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    115       this.valueGroupBox.ResumeLayout(false);
    116       this.valuePanel.ResumeLayout(false);
    11770      this.ResumeLayout(false);
    11871      this.PerformLayout();
     
    12275    #endregion
    12376
    124     protected System.Windows.Forms.GroupBox valueGroupBox;
    125     protected System.Windows.Forms.Panel valuePanel;
    126     protected MainForm.WindowsForms.ViewHost valueViewHost;
    127 
    128 
    129 
    13077
    13178  }
  • branches/OptimizationNetworks/HeuristicLab.Optimization.Networks.Views/3.3/PortView.cs

    r11412 r11421  
    2828namespace HeuristicLab.Optimization.Networks.Views {
    2929  [View("Port View")]
    30   [Content(typeof(Port<>), true)]
    31   [Content(typeof(IPort<>), false)]
     30  [Content(typeof(Port), true)]
    3231  [Content(typeof(IPort), false)]
    3332  public partial class PortView : NamedItemView {
     
    4039      InitializeComponent();
    4140    }
    42 
    43     protected override void DeregisterContentEvents() {
    44       Content.ValueChanged -= Content_ValueChanged;
    45       base.DeregisterContentEvents();
    46     }
    47 
    48     protected override void RegisterContentEvents() {
    49       base.RegisterContentEvents();
    50       Content.ValueChanged += Content_ValueChanged;
    51     }
    52 
    53     protected override void OnContentChanged() {
    54       base.OnContentChanged();
    55       if (Content == null) {
    56         valueViewHost.Content = null;
    57       } else {
    58         valueViewHost.ViewType = null;
    59         valueViewHost.Content = Content.Value as IContent;
    60       }
    61     }
    62 
    63     protected override void SetEnabledStateOfControls() {
    64       base.SetEnabledStateOfControls();
    65       valueGroupBox.Enabled = (Content as IContent) != null;
    66     }
    67     protected virtual void Content_ValueChanged(object sender, System.EventArgs e) {
    68       if (InvokeRequired)
    69         Invoke(new EventHandler(Content_ValueChanged), sender, e);
    70       else {
    71         valueViewHost.ViewType = null;
    72         valueViewHost.Content = Content.Value as IContent;
    73 
    74       }
    75     }
    7641  }
    7742}
Note: See TracChangeset for help on using the changeset viewer.