void IUIWidget.OnOperationChange(Shared.Core.Operation operation)
        {
            string lineOne = null;

            if (!string.IsNullOrWhiteSpace(_expressionLineOne))
            {
                lineOne = operation != null?operation.ToString(_expressionLineOne) : "(n/A)";
            }
            string lineTwo = null;

            if (!string.IsNullOrWhiteSpace(_expressionLineTwo))
            {
                lineTwo = operation != null?operation.ToString(_expressionLineTwo) : "(n/A)";
            }
            string lineThree = null;

            if (!string.IsNullOrWhiteSpace(_expressionLineThree))
            {
                lineThree = operation != null?operation.ToString(_expressionLineThree) : "(n/A)";
            }
            LineOne.Inlines.Clear();
            LineTwo.Inlines.Clear();
            LineThree.Inlines.Clear();

            LineOne.Inlines.Add(Helper.Execute(lineOne));
            LineTwo.Inlines.Add(Helper.Execute(lineTwo));
            LineThree.Inlines.Add(Helper.Execute(lineThree));
        }
        void IUIWidget.OnOperationChange(Shared.Core.Operation operation)
        {
            string lineOne   = FormatLine(_expressionLineOne, operation);
            string lineTwo   = FormatLine(_expressionLineTwo, operation);
            string lineThree = FormatLine(_expressionLineThree, operation);

            LineOne.Inlines.Clear();
            LineTwo.Inlines.Clear();
            LineThree.Inlines.Clear();

            LineOne.Inlines.Add(Helper.Execute(lineOne));
            LineTwo.Inlines.Add(Helper.Execute(lineTwo));
            LineThree.Inlines.Add(Helper.Execute(lineThree));
        }
Beispiel #3
0
        private string FormatLine(string expression, Shared.Core.Operation operation)
        {
            if (!string.IsNullOrWhiteSpace(expression))
            {
                try
                {
                    return(operation != null?operation.ToString(expression) : "(n/A)");
                }
                catch (AssertionFailedException)
                {
                    // This exception may occure if the format of the value is broken or other problems with the format exist...
                    return(string.Empty);
                }
            }

            return(string.Empty);
        }
Beispiel #4
0
 public void OnOperationChange(Shared.Core.Operation operation)
 {
     _operation = operation;
     SetValues();
 }
Beispiel #5
0
 void IUIWidget.OnOperationChange(Shared.Core.Operation operation)
 {
     _dataContext.OnOperationChange(operation);
 }
 void IOperationViewer.OnOperationChanged(Shared.Core.Operation operation)
 {
     _viewModel.Operation = operation;
 }