Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.DataImporter/HeuristicLab.DataImporter.Command/View/SearchWithMatchOperationCommandView.cs @ 6133

Last change on this file since 6133 was 6133, checked in by gkronber, 13 years ago

#1471: imported generic parts of DataImporter from private code base

File size: 1.3 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.ComponentModel;
4using System.Data;
5using System.Drawing;
6using System.Text;
7using System.Windows.Forms;
8
9namespace HeuristicLab.DataImporter.Command.View {
10  public partial class SearchWithMatchOperationCommandView : SearchCommandView {
11    public SearchWithMatchOperationCommandView()
12      : base() {
13      InitializeComponent();
14      cmbMatchOperation.Items.AddRange(Enum.GetNames(typeof(HeuristicLab.DataImporter.Command.MatchOperation)));
15      cmbMatchOperation.SelectedIndex = 0;
16    }
17
18    public SearchWithMatchOperationCommandView(SearchWithMatchOperationCommandBase command) :this(){
19      this.Command = command;
20    }
21
22    public new SearchWithMatchOperationCommandBase Command {
23      get { return (SearchWithMatchOperationCommandBase)base.Command; }
24      set { base.Command = value; this.UpdateCommand(); }
25    }
26
27    public MatchOperation MatchOperation {
28      get { return this.Command.MatchOperation; }
29    }
30
31    private void cmbMatchOperation_SelectedIndexChanged(object sender, System.EventArgs e) {
32      this.UpdateCommand();
33    }
34
35    private void UpdateCommand() {
36      if (Command != null)
37        this.Command.MatchOperation = (MatchOperation)Enum.Parse(typeof(MatchOperation), cmbMatchOperation.SelectedItem.ToString());
38    }
39  }
40}
Note: See TracBrowser for help on using the repository browser.