Ignore:
Timestamp:
Apr 23, 2009, 10:14:50 PM (13 years ago)
Author:
Sören Rinne
Message:
  • added BoolComparator, compares two boolean inputs
  • added setting in TextOutput to display boolean values as numeric values (true/false vs. 1/0)
Location:
trunk/CrypPlugins/TextOutput
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/CrypPlugins/TextOutput/TextOutput.cs

    r232 r296  
    410410        else if (value is bool)
    411411        {
    412           fillValue = ((bool)value).ToString();
     412            if (settings.BooleanAsNumeric)
     413            {
     414                fillValue = Convert.ToInt32(value).ToString();
     415            }
     416            else
     417            {
     418                fillValue = ((bool)value).ToString();
     419            }
    413420        }
    414421        else if (value is CryptoolStream)
  • trunk/CrypPlugins/TextOutput/TextOutputSettings.cs

    r224 r296  
    333333        {
    334334          append = value;
     335          hasChanges = true;
    335336          OnPropertyChanged("Append");
    336337        }
     
    394395    }
    395396
     397    private bool booleanAsNumeric = false;
     398    [ContextMenu("Display boolean as numeric value", "With this checkbox enabled, incoming boolean values will be displayed as numeric values (1/0 instead of True/False).", 5, DisplayLevel.Experienced, ContextMenuControlType.CheckBox, null, new string[] { "Display boolean as numeric value" })]
     399    [TaskPane("Display boolean as numeric value", "With this checkbox enabled, incoming boolean values will be displayed as numeric values (1/0 instead of True/False).", null, 5, false, DisplayLevel.Beginner, ControlType.CheckBox, "", null)]
     400    public bool BooleanAsNumeric
     401    {
     402        get { return booleanAsNumeric; }
     403        set
     404        {
     405            if (value != booleanAsNumeric)
     406            {
     407                booleanAsNumeric = value;
     408                hasChanges = true;
     409                OnPropertyChanged("BooleanAsNumeric");
     410            }
     411        }
     412    }
     413
    396414    private bool flushOnPreExecution = true;
    397     [ContextMenu("Flush text on PreExec", "Flush all text boxes on PreExecution call.", 5, DisplayLevel.Beginner, ContextMenuControlType.CheckBox, null, new string[] {"Flush text on PreExec"})]
    398     [TaskPane("Flush text on PreExec", "Flush all text boxes on PreExecution call.", null, 5, false, DisplayLevel.Beginner, ControlType.CheckBox, null)]
     415    [ContextMenu("Flush text on PreExec", "Flush all text boxes on PreExecution call.", 6, DisplayLevel.Beginner, ContextMenuControlType.CheckBox, null, new string[] {"Flush text on PreExec"})]
     416    [TaskPane("Flush text on PreExec", "Flush all text boxes on PreExecution call.", null, 6, false, DisplayLevel.Beginner, ControlType.CheckBox, null)]
    399417    public bool FlushOnPreExecution
    400418    {
     
    405423        {
    406424          flushOnPreExecution = value;
     425          hasChanges = true;
    407426          OnPropertyChanged("FlushOnPreExecution");
    408427        }
Note: See TracChangeset for help on using the changeset viewer.