本文整理汇总了C#中IInputField.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# IInputField.GetValue方法的具体用法?C# IInputField.GetValue怎么用?C# IInputField.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IInputField
的用法示例。
在下文中一共展示了IInputField.GetValue方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DetermineInputFieldValue
/// <summary>
/// Called internally to obtain the current value for an input field.
/// </summary>
/// <param name="field">The input field to determine.</param>
/// <param name="index">The current index.</param>
/// <returns>The value for this input field.</returns>
private double DetermineInputFieldValue(IInputField field,
int index)
{
double result = 0;
if (field is InputFieldCSV)
{
InputFieldCSV fieldCSV = (InputFieldCSV)field;
ReadCSV csv = this.csvMap[field];
result = csv.GetDouble(fieldCSV.Offset);
}
else if (field is InputFieldNeuralDataSet)
{
InputFieldNeuralDataSet neuralField = (InputFieldNeuralDataSet)field;
NeuralDataFieldHolder holder = this.dataSetFieldMap
[field];
INeuralDataPair pair = holder.Pair;
int offset = neuralField.Offset;
if (offset < pair.Input.Count)
{
result = pair.Input[offset];
}
else
{
offset -= pair.Input.Count;
result = pair.Ideal[offset];
}
}
else
{
result = field.GetValue(index);
}
field.CurrentValue = result;
return result;
}
示例2: DetermineInputFieldValue
/// <summary>
/// Called internally to obtain the current value for an input field.
/// </summary>
/// <param name="field">The input field to determine.</param>
/// <param name="index">The current index.</param>
/// <returns>The value for this input field.</returns>
private void DetermineInputFieldValue(IInputField field, int index)
{
double result;
if (field is InputFieldCSV)
{
var fieldCSV = (InputFieldCSV)field;
ReadCSV csv = _csvMap[field];
result = csv.GetDouble(fieldCSV.Offset);
}
else if (field is InputFieldMLDataSet)
{
var mlField = (InputFieldMLDataSet)field;
MLDataFieldHolder holder = _dataSetFieldMap
[field];
IMLDataPair pair = holder.Pair;
int offset = mlField.Offset;
if (offset < pair.Input.Count)
{
result = pair.Input[offset];
}
else
{
offset -= pair.Input.Count;
result = pair.Ideal[offset];
}
}
else
{
result = field.GetValue(index);
}
field.CurrentValue = result;
return;
}
示例3: DetermineInputFieldValue
private void DetermineInputFieldValue(IInputField field, int index)
{
double num;
InputFieldCSV dcsv;
if (field is InputFieldCSV)
{
goto Label_00F5;
}
if (field is InputFieldMLDataSet)
{
InputFieldMLDataSet set = (InputFieldMLDataSet) field;
MLDataFieldHolder holder = this._dataSetFieldMap[field];
IMLDataPair pair = holder.Pair;
int offset = set.Offset;
if ((((uint) index) >= 0) && (offset >= pair.Input.Count))
{
offset -= pair.Input.Count;
num = pair.Ideal[offset];
if ((((uint) index) + ((uint) num)) > uint.MaxValue)
{
return;
}
if (((uint) offset) >= 0)
{
if (0 != 0)
{
return;
}
goto Label_0022;
}
goto Label_00F5;
}
num = pair.Input[offset];
}
else
{
num = field.GetValue(index);
}
Label_0022:
field.CurrentValue = num;
return;
Label_00F5:
dcsv = (InputFieldCSV) field;
num = this._csvMap[field].GetDouble(dcsv.Offset);
goto Label_0022;
}