Ignore:
Timestamp:
05/02/16 15:25:14 (5 years ago)
Author:
bburlacu
Message:

#2288: Used localization when formatting strings. Add canceling in CreateTargetVariationExperimentDialog. Remove use of C# 4.6 language features.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/RunCollectionVariableInteractionNetworkView.cs

    r13806 r13821  
    2424using System.ComponentModel;
    2525using System.Drawing;
     26using System.Globalization;
    2627using System.Linq;
    2728using System.Text;
     
    237238            vn.AddVertex(junctionNode);
    238239            nodes[junctionLabel] = junctionNode;
    239             junctionNode.Label = string.Format("Target quality: {0:0.000}", solutionsEnsemble.TrainingRSquared);
     240            junctionNode.Label = solutionsEnsemble.TrainingRSquared.ToString("N3", CultureInfo.CurrentCulture);
    240241          }
    241242          IArc arc;
     
    247248              nodes[v] = variableNode;
    248249            }
    249             arc = new Arc(variableNode, junctionNode) { Weight = impact, Label = string.Format("Impact: {0:0.000}", impact) };
     250            arc = new Arc(variableNode, junctionNode) { Weight = impact, Label = impact.ToString("N3", CultureInfo.CurrentCulture) };
    250251            vn.AddArc(arc);
    251252          }
    252253          var trainingR2 = ((IRegressionSolution)((JunctionNetworkNode)junctionNode).Data).TrainingRSquared;
    253           arc = new Arc(junctionNode, targetNode) { Weight = junctionNode.InArcs.Sum(x => x.Weight), Label = string.Format("Quality: {0:0.000}", trainingR2) };
     254          arc = new Arc(junctionNode, targetNode) { Weight = junctionNode.InArcs.Sum(x => x.Weight), Label = trainingR2.ToString("N3", CultureInfo.CurrentCulture) };
    254255          vn.AddArc(arc);
    255256        } else {
     
    261262              nodes[v] = variableNode;
    262263            }
    263             var arc = new Arc(variableNode, targetNode) { Weight = impact, Label = string.Format("Impact: {0:0.000}", impact) };
     264            var arc = new Arc(variableNode, targetNode) {
     265              Weight = impact, Label = impact.ToString("N3", CultureInfo.CurrentCulture)
     266            };
    264267            vn.AddArc(arc);
    265268          }
     
    392395      double impact;
    393396      if (!double.TryParse(tb.Text, out impact))
    394         impact = 0.1;
     397        impact = 0.2;
    395398      var network = ApplyThreshold(variableInteractionNetwork, impact);
    396399      graphChart.Graph = network;
Note: See TracChangeset for help on using the changeset viewer.