示例#1
0
        public void EhView_ChooseErrorFunction(int idx)
        {
            var choice = new SingleInstanceChoice(typeof(IVarianceScaling), _doc.GetErrorEvaluation(idx));

            object choiceAsObject = choice;

            if (Current.Gui.ShowDialog(ref choiceAsObject, "Select error norm"))
            {
                choice = (SingleInstanceChoice)choiceAsObject;
                _doc.SetErrorEvaluation(idx, (IVarianceScaling)choice.Instance);
                _view.Refresh();
            }
        }
示例#2
0
        private string GetTextShownForErrorEvaluation(int i)
        {
            string name = _fitElement.GetErrorEvaluation(i) != null?_fitElement.GetErrorEvaluation(i).ShortName : string.Empty;

            return(name);
        }