Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/28/10 23:03:05 (14 years ago)
Author:
cneumuel
Message:

#1215 worked on metaoptimization

Location:
branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3
Files:
5 added
5 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3

    • Property svn:ignore
      •  

        old new  
        22obj
        33HeuristicLab.Problems.MetaOptimization.Views-3.3.csproj.user
         4HeuristicLabProblemsMetaOptimizationViewsPlugin.cs
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/HeuristicLab.Problems.MetaOptimization.Views-3.3.csproj

    r4981 r4982  
    8585  </ItemGroup>
    8686  <ItemGroup>
     87    <None Include="HeuristicLabProblemsMetaOptimizationViewsPlugin.cs.frame" />
    8788    <Compile Include="OptimizableView.cs">
    8889      <SubType>UserControl</SubType>
     
    9091    <Compile Include="OptimizableView.Designer.cs">
    9192      <DependentUpon>OptimizableView.cs</DependentUpon>
     93    </Compile>
     94    <None Include="Properties\AssemblyInfo.cs.frame" />
     95    <Compile Include="RootValueConfigurationView.cs">
     96      <SubType>UserControl</SubType>
     97    </Compile>
     98    <Compile Include="RootValueConfigurationView.Designer.cs">
     99      <DependentUpon>RootValueConfigurationView.cs</DependentUpon>
    92100    </Compile>
    93101    <Compile Include="ValueConfigurationViews\ValueConfigurationCheckedItemList.cs">
     
    126134      <DependentUpon>OptimizableView.cs</DependentUpon>
    127135    </EmbeddedResource>
     136    <EmbeddedResource Include="RootValueConfigurationView.resx">
     137      <DependentUpon>RootValueConfigurationView.cs</DependentUpon>
     138    </EmbeddedResource>
    128139    <EmbeddedResource Include="ValueConfigurationViews\NumericRangeView.resx">
    129140      <DependentUpon>NumericRangeView.cs</DependentUpon>
     
    150161set ProjectDir=$(ProjectDir)
    151162set SolutionDir=$(SolutionDir)
    152 set Outdir=$(Outdir)</PreBuildEvent>
     163set Outdir=$(Outdir)
     164
     165call PreBuildEvent.cmd</PreBuildEvent>
    153166  </PropertyGroup>
    154167  <PropertyGroup>
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/Properties

    • Property svn:ignore set to
      AssemblyInfo.cs
  • branches/HeuristicLab.MetaOptimization/HeuristicLab.Problems.MetaOptimization.Views/3.3/ValueConfigurationViews/ValueConfigurationCheckedItemList.cs

    r4981 r4982  
    1111using System.Windows.Forms;
    1212using HeuristicLab.PluginInfrastructure;
     13using HeuristicLab.Collections;
    1314
    1415namespace HeuristicLab.Problems.MetaOptimization.Views {
     
    2627
    2728    protected override void DeregisterContentEvents() {
    28       // TODO: Deregister your event handlers here
     29      Content.ItemsRemoved -= new Collections.CollectionItemsChangedEventHandler<IValueConfiguration>(Content_ItemsRemoved);
    2930      base.DeregisterContentEvents();
    3031    }
     
    3233    protected override void RegisterContentEvents() {
    3334      base.RegisterContentEvents();
    34       // TODO: Register your event handlers here
     35      Content.ItemsRemoved += new Collections.CollectionItemsChangedEventHandler<IValueConfiguration>(Content_ItemsRemoved);
    3536    }
    3637
    3738    #region Event Handlers (Content)
    38     // TODO: Put event handlers of the content here
     39    private new void Content_ItemsRemoved(object sender, CollectionItemsChangedEventArgs<IValueConfiguration> e) {
     40      if (InvokeRequired) {
     41        Invoke(new EventHandler<CollectionItemsChangedEventArgs<IValueConfiguration>>(Content_ItemsRemoved), sender, e);
     42      } else {
     43        base.Content_ItemsRemoved(sender, e);
     44        SetEnabledStateOfControls();
     45      }
     46    }
    3947    #endregion
    4048
    4149    protected override void OnContentChanged() {
    4250      base.OnContentChanged();
    43       if (Content == null) {
    44         // TODO: Add code when content has been changed and is null
     51      if (Content != null) {
     52        SetEnabledStateOfControls();
    4553      } else {
    46         // TODO: Add code when content has been changed and is not null
    4754      }
    4855    }
    4956
    50 
    5157    protected override void SetEnabledStateOfControls() {
    5258      base.SetEnabledStateOfControls();
    53       // TODO: Enable or disable controls based on whether the content is null or the view is set readonly
     59      if(Content != null) this.removeButton.Enabled = Content.Count > Content.MinItemCount;
     60    }
     61
     62    protected override void itemsListView_SelectedIndexChanged(object sender, EventArgs e) {
     63      base.itemsListView_SelectedIndexChanged(sender, e);
     64      this.removeButton.Enabled = removeButton.Enabled && (Content.Count > Content.MinItemCount);
    5465    }
    5566
    5667    #region Event Handlers (child controls)
    57     // TODO: Put event handlers of child controls here.
    5868    #endregion
    5969
Note: See TracChangeset for help on using the changeset viewer.