Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/15/15 16:41:12 (9 years ago)
Author:
jkarder
Message:

#2116: added new breadcrumb navigation prototype

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization.Views/3.3/UserDefinedAlgorithmView.cs

    r12012 r13014  
    5757      base.SetEnabledStateOfControls();
    5858      globalScopeView.Enabled = Content != null;
    59       newOperatorGraphButton.Enabled = Content != null && !ReadOnly;
    60       openOperatorGraphButton.Enabled = Content != null && !ReadOnly;
    6159      operatorGraphViewHost.ReadOnly = Content == null || ReadOnly;
    62     }
    63 
    64     private void newOperatorGraphButton_Click(object sender, EventArgs e) {
    65       Content.OperatorGraph = new OperatorGraph();
    66     }
    67     private void openOperatorGraphButton_Click(object sender, EventArgs e) {
    68       openFileDialog.Title = "Open Operator Graph";
    69       if (openFileDialog.ShowDialog(this) == DialogResult.OK) {
    70         newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = false;
    71         operatorGraphViewHost.Enabled = false;
    72 
    73         ContentManager.LoadAsync(openFileDialog.FileName, delegate(IStorableContent content, Exception error) {
    74           try {
    75             if (error != null) throw error;
    76             OperatorGraph operatorGraph = content as OperatorGraph;
    77             if (operatorGraph == null)
    78               MessageBox.Show(this, "The selected file does not contain an operator graph.", "Invalid File", MessageBoxButtons.OK, MessageBoxIcon.Error);
    79             else
    80               Content.OperatorGraph = operatorGraph;
    81           }
    82           catch (Exception ex) {
    83             ErrorHandling.ShowErrorDialog(this, ex);
    84           }
    85           finally {
    86             Invoke(new Action(delegate() {
    87               operatorGraphViewHost.Enabled = true;
    88               newOperatorGraphButton.Enabled = openOperatorGraphButton.Enabled = true;
    89             }));
    90           }
    91         });
    92       }
    9360    }
    9461  }
Note: See TracChangeset for help on using the changeset viewer.