Ignore:
Timestamp:
04/16/15 12:32:26 (7 years ago)
Author:
arapeanu
Message:

#2288: Added sliders functionality, dialog box for setting the number of repetitions for each batch + modified node importance weighting

Location:
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3
Files:
2 added
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/CreateTargetVariationExperiment.cs

    r12198 r12320  
    66using HeuristicLab.Optimizer;
    77
    8 namespace HeuristicLab.VariableInteractionNetworks {
    9   internal class CreateTargetVariationExperiment : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider {
    10     public override string Name {
    11       get { return "Create Target Variation &Experiment"; }
     8namespace HeuristicLab.VariableInteractionNetworks
     9{
     10    internal class CreateTargetVariationExperiment : HeuristicLab.MainForm.WindowsForms.MenuItem, IOptimizerUserInterfaceItemProvider
     11    {
     12        public override string Name
     13        {
     14            get { return "Create Target Variation &Experiment"; }
     15        }
     16        public override IEnumerable<string> Structure
     17        {
     18            get { return new string[] { "&Edit" }; }
     19        }
     20        public override int Position
     21        {
     22            get { return 2300; }
     23        }
     24        public override string ToolTipText
     25        {
     26            get { return "Create an experiment for varying the target variable"; }
     27        }
     28
     29        protected override void OnToolStripItemSet(EventArgs e)
     30        {
     31            ToolStripItem.Enabled = false;
     32        }
     33        protected override void OnActiveViewChanged(object sender, EventArgs e)
     34        {
     35            IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
     36            ToolStripItem.Enabled = (activeView != null) && (activeView.Content != null) && (activeView.Content is IOptimizer) && !activeView.Locked;
     37        }
     38
     39        public override void Execute()
     40        {
     41            IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
     42            if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IOptimizer) && !activeView.Locked)
     43            {
     44                using (CreateTargetVariationExperimentDialog dialog = new CreateTargetVariationExperimentDialog((IAlgorithm)activeView.Content))
     45                {
     46                    if (dialog.ShowDialog() == DialogResult.OK) MainFormManager.MainForm.ShowContent(dialog.Experiment);
     47                }
     48            }
     49        }
    1250    }
    13     public override IEnumerable<string> Structure {
    14       get { return new string[] { "&Edit" }; }
    15     }
    16     public override int Position {
    17       get { return 2300; }
    18     }
    19     public override string ToolTipText {
    20       get { return "Create an experiment for varying the target variable"; }
    21     }
    22 
    23     protected override void OnToolStripItemSet(EventArgs e) {
    24       ToolStripItem.Enabled = false;
    25     }
    26     protected override void OnActiveViewChanged(object sender, EventArgs e) {
    27       IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    28       ToolStripItem.Enabled = (activeView != null) && (activeView.Content != null) && (activeView.Content is IOptimizer) && !activeView.Locked;
    29     }
    30 
    31     public override void Execute() {
    32       IContentView activeView = MainFormManager.MainForm.ActiveView as IContentView;
    33       if ((activeView != null) && (activeView.Content != null) && (activeView.Content is IOptimizer) && !activeView.Locked)
    34       {
    35           var experiment = TargetVariation.CreateVariableCombinations((IAlgorithm) activeView.Content);
    36           MainFormManager.MainForm.ShowContent(experiment);
    37       }
    38     }
    39   }
    4051}
  • branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/HeuristicLab.VariableInteractionNetworks-3.3.csproj

    r12198 r12320  
    5656      <SpecificVersion>False</SpecificVersion>
    5757      <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath>
     58      <Private>False</Private>
     59    </Reference>
     60    <Reference Include="HeuristicLab.Data.Views-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">
     61      <SpecificVersion>False</SpecificVersion>
     62      <HintPath>..\..\..\..\trunk\sources\HeuristicLab.Data.Views\3.3\obj\Release\HeuristicLab.Data.Views-3.3.dll</HintPath>
    5863      <Private>False</Private>
    5964    </Reference>
     
    138143  <ItemGroup>
    139144    <Compile Include="CreateTargetVariationExperiment.cs" />
     145    <Compile Include="CreateTargetVariationExperimentDialog.cs">
     146      <SubType>Form</SubType>
     147    </Compile>
     148    <Compile Include="CreateTargetVariationExperimentDialog.Designer.cs">
     149      <DependentUpon>CreateTargetVariationExperimentDialog.cs</DependentUpon>
     150    </Compile>
    140151    <Compile Include="Plugin.cs" />
    141152    <Compile Include="Properties\AssemblyInfo.cs" />
    142     <Compile Include="TargetVariation.cs" />
    143153  </ItemGroup>
    144154  <ItemGroup>
     
    146156    <None Include="Plugin.cs.frame" />
    147157    <None Include="Properties\AssemblyInfo.cs.frame" />
     158  </ItemGroup>
     159  <ItemGroup>
     160    <WCFMetadata Include="Service References\" />
    148161  </ItemGroup>
    149162  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Note: See TracChangeset for help on using the changeset viewer.