修改反馈
This commit is contained in:
parent
0c7743423c
commit
cec825a27c
@ -6,11 +6,11 @@ using System.Linq;
|
|||||||
|
|
||||||
namespace QFramework.Example
|
namespace QFramework.Example
|
||||||
{
|
{
|
||||||
|
|
||||||
public class UIInput_AnHuiBaoShiData : UIPanelData
|
public class UIInput_AnHuiBaoShiData : UIPanelData
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
public partial class UIInput_AnHuiBaoShi : UIPanel
|
public partial class UIInput_AnHuiBaoShi : UIPanel
|
||||||
{
|
{
|
||||||
|
|
||||||
public int CurrentInputIndex;//当前索引次数
|
public int CurrentInputIndex;//当前索引次数
|
||||||
@ -23,7 +23,7 @@ namespace QFramework.Example
|
|||||||
public string[] targetMin; // 设置最小目标值
|
public string[] targetMin; // 设置最小目标值
|
||||||
|
|
||||||
[Header("最大目标值错误次数")]
|
[Header("最大目标值错误次数")]
|
||||||
public int errowIntMax = 0;//最大目标值错误次数
|
public int errowIntMax = 0;//最大目标值错误次数
|
||||||
[Header("最小目标值错误次数")]
|
[Header("最小目标值错误次数")]
|
||||||
public int errowIntMin = 0;//最小目标值错误次数
|
public int errowIntMin = 0;//最小目标值错误次数
|
||||||
[Header("错误弹窗")]
|
[Header("错误弹窗")]
|
||||||
@ -31,9 +31,9 @@ namespace QFramework.Example
|
|||||||
public Button errowTipClickBtn;//错误弹窗,确认按钮
|
public Button errowTipClickBtn;//错误弹窗,确认按钮
|
||||||
|
|
||||||
|
|
||||||
private string tMP_InputField1Value= "1.770";
|
private string tMP_InputField1Value = "1.770";
|
||||||
|
|
||||||
private string tMP_InputField2Value= "1.762";
|
private string tMP_InputField2Value = "1.762";
|
||||||
|
|
||||||
private string tMP_InputField3Value = "0.008";
|
private string tMP_InputField3Value = "0.008";
|
||||||
|
|
||||||
@ -45,14 +45,34 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
public GameObject ZheSheInput;//输入三个数值的输入框
|
public GameObject ZheSheInput;//输入三个数值的输入框
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void OnReSet()
|
||||||
|
{
|
||||||
|
|
||||||
|
InputFieldmax.gameObject.SetActive(true);
|
||||||
|
InputFieldmin.gameObject.SetActive(true);
|
||||||
|
images[0].gameObject.SetActive(true);
|
||||||
|
images[1].gameObject.SetActive(false);
|
||||||
|
images[2].gameObject.SetActive(false);
|
||||||
|
images[3].gameObject.SetActive(false);
|
||||||
|
images[4].gameObject.SetActive(false);
|
||||||
|
tMP_InputField1.gameObject.SetActive(false);
|
||||||
|
tMP_InputField2.gameObject.SetActive(false);
|
||||||
|
tMP_InputField3.gameObject.SetActive(false);
|
||||||
|
errowTip.gameObject.SetActive(false);
|
||||||
|
CurrentInputIndex = 0;
|
||||||
|
errowIntMax = 0;
|
||||||
|
errowIntMin = 0;
|
||||||
|
}
|
||||||
protected override void OnInit(IUIData uiData = null)
|
protected override void OnInit(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
mData = uiData as UIInput_AnHuiBaoShiData ?? new UIInput_AnHuiBaoShiData();
|
mData = uiData as UIInput_AnHuiBaoShiData ?? new UIInput_AnHuiBaoShiData();
|
||||||
|
OnReSet();
|
||||||
}
|
OnOpen();
|
||||||
|
}
|
||||||
protected override void OnOpen(IUIData uiData = null)
|
|
||||||
|
protected override void OnOpen(IUIData uiData = null)
|
||||||
{
|
{
|
||||||
|
|
||||||
transform.SetAsLastSibling();
|
transform.SetAsLastSibling();
|
||||||
@ -62,11 +82,11 @@ namespace QFramework.Example
|
|||||||
CurrentInputIndex = 0;
|
CurrentInputIndex = 0;
|
||||||
errowIntMax = 0;
|
errowIntMax = 0;
|
||||||
errowIntMin = 0;
|
errowIntMin = 0;
|
||||||
|
|
||||||
|
|
||||||
InputFieldmax.onEndEdit.RemoveAllListeners();
|
InputFieldmax.onEndEdit.RemoveAllListeners();
|
||||||
InputFieldmin.onEndEdit.RemoveAllListeners();
|
InputFieldmin.onEndEdit.RemoveAllListeners();
|
||||||
|
|
||||||
InputFieldmax.onEndEdit.AddListener(CheckInputMax);
|
InputFieldmax.onEndEdit.AddListener(CheckInputMax);
|
||||||
InputFieldmin.onEndEdit.AddListener(CheckInputMin);
|
InputFieldmin.onEndEdit.AddListener(CheckInputMin);
|
||||||
|
|
||||||
@ -81,10 +101,10 @@ namespace QFramework.Example
|
|||||||
public void CheackAllInputField()
|
public void CheackAllInputField()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (tMP_InputField1.text== tMP_InputField1Value && tMP_InputField2.text == tMP_InputField2Value&&
|
if (tMP_InputField1.text == tMP_InputField1Value && tMP_InputField2.text == tMP_InputField2Value &&
|
||||||
tMP_InputField3.text == tMP_InputField3Value )
|
tMP_InputField3.text == tMP_InputField3Value)
|
||||||
{
|
{
|
||||||
|
|
||||||
StringEventSystem.Global.Send("InputUI使用结束");
|
StringEventSystem.Global.Send("InputUI使用结束");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -92,7 +112,7 @@ namespace QFramework.Example
|
|||||||
|
|
||||||
private void CheacktMP_InputField1String(string userInput)
|
private void CheacktMP_InputField1String(string userInput)
|
||||||
{
|
{
|
||||||
if (userInput==tMP_InputField1Value)
|
if (userInput == tMP_InputField1Value)
|
||||||
{
|
{
|
||||||
tMP_InputField1.text = tMP_InputField1Value;
|
tMP_InputField1.text = tMP_InputField1Value;
|
||||||
tMP_InputField1.DeactivateInputField();
|
tMP_InputField1.DeactivateInputField();
|
||||||
@ -102,7 +122,7 @@ namespace QFramework.Example
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
tMP_InputField1ErrowIndex++;
|
tMP_InputField1ErrowIndex++;
|
||||||
if (tMP_InputField1ErrowIndex>=3)
|
if (tMP_InputField1ErrowIndex >= 3)
|
||||||
{
|
{
|
||||||
tMP_InputField1.text = tMP_InputField1Value;
|
tMP_InputField1.text = tMP_InputField1Value;
|
||||||
tMP_InputField1.DeactivateInputField();
|
tMP_InputField1.DeactivateInputField();
|
||||||
@ -112,7 +132,7 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
errowTip.gameObject.SetActive(true);
|
errowTip.gameObject.SetActive(true);
|
||||||
tMP_InputField1.text = string.Empty;
|
tMP_InputField1.text = string.Empty;
|
||||||
}
|
}
|
||||||
@ -179,10 +199,10 @@ namespace QFramework.Example
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="userInput"></param>
|
/// <param name="userInput"></param>
|
||||||
private void CheckInputMax(string userInput)
|
private void CheckInputMax(string userInput)
|
||||||
{
|
{
|
||||||
var v = targetMax[CurrentInputIndex].ToString();
|
var v = targetMax[CurrentInputIndex].ToString();
|
||||||
if (v != userInput)
|
if (v != userInput)
|
||||||
{
|
{
|
||||||
//第3次,填入正确答案
|
//第3次,填入正确答案
|
||||||
if (errowIntMax >= 3)
|
if (errowIntMax >= 3)
|
||||||
{
|
{
|
||||||
@ -196,8 +216,8 @@ namespace QFramework.Example
|
|||||||
errowIntMax++;
|
errowIntMax++;
|
||||||
errowTip.gameObject.SetActive(true);
|
errowTip.gameObject.SetActive(true);
|
||||||
InputFieldmax.text = string.Empty;
|
InputFieldmax.text = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -208,7 +228,7 @@ namespace QFramework.Example
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
Debug.Log("填写数值正确");
|
Debug.Log("填写数值正确");
|
||||||
userInput= targetMax.ToString();
|
userInput = targetMax.ToString();
|
||||||
SetNextInput();
|
SetNextInput();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -220,7 +240,7 @@ namespace QFramework.Example
|
|||||||
/// <param name="userInput"></param>
|
/// <param name="userInput"></param>
|
||||||
private void CheckInputMin(string userInput)
|
private void CheckInputMin(string userInput)
|
||||||
{
|
{
|
||||||
|
|
||||||
var v = targetMin[CurrentInputIndex].ToString();
|
var v = targetMin[CurrentInputIndex].ToString();
|
||||||
if (v != userInput)
|
if (v != userInput)
|
||||||
{
|
{
|
||||||
@ -231,8 +251,8 @@ namespace QFramework.Example
|
|||||||
InputFieldmin.text = targetMin[CurrentInputIndex].ToString();
|
InputFieldmin.text = targetMin[CurrentInputIndex].ToString();
|
||||||
InputFieldmin.DeactivateInputField();
|
InputFieldmin.DeactivateInputField();
|
||||||
InputFieldmin.readOnly = true;
|
InputFieldmin.readOnly = true;
|
||||||
|
|
||||||
Invoke("SetNextInput",2f);
|
Invoke("SetNextInput", 2f);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
errowIntMin++;
|
errowIntMin++;
|
||||||
@ -256,21 +276,21 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
protected override void OnShow()
|
protected override void OnShow()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnHide()
|
protected override void OnHide()
|
||||||
{
|
{
|
||||||
StringEventSystem.Global.Send("InputUI使用结束");
|
StringEventSystem.Global.Send("InputUI使用结束");
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnClose()
|
protected override void OnClose()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetNextInput()
|
private void SetNextInput()
|
||||||
{
|
{
|
||||||
if (InputFieldmax.text == targetMax[CurrentInputIndex].ToString()&& InputFieldmin.text ==targetMin[CurrentInputIndex].ToString())
|
if (InputFieldmax.text == targetMax[CurrentInputIndex].ToString() && InputFieldmin.text == targetMin[CurrentInputIndex].ToString())
|
||||||
{
|
{
|
||||||
//InputFieldmax.ActivateInputField();
|
//InputFieldmax.ActivateInputField();
|
||||||
//InputFieldmin.ActivateInputField();
|
//InputFieldmin.ActivateInputField();
|
||||||
@ -282,7 +302,7 @@ namespace QFramework.Example
|
|||||||
InputFieldmax.readOnly = false;
|
InputFieldmax.readOnly = false;
|
||||||
InputFieldmin.readOnly = false;
|
InputFieldmin.readOnly = false;
|
||||||
|
|
||||||
|
|
||||||
InputFieldmax.text = string.Empty;
|
InputFieldmax.text = string.Empty;
|
||||||
InputFieldmin.text = string.Empty;
|
InputFieldmin.text = string.Empty;
|
||||||
|
|
||||||
@ -292,9 +312,9 @@ namespace QFramework.Example
|
|||||||
CurrentInputIndex++;
|
CurrentInputIndex++;
|
||||||
if (CurrentInputIndex < images.Length)
|
if (CurrentInputIndex < images.Length)
|
||||||
{
|
{
|
||||||
|
|
||||||
// 先递增索引
|
// 先递增索引
|
||||||
|
|
||||||
foreach (var item in images)
|
foreach (var item in images)
|
||||||
{
|
{
|
||||||
item.gameObject.SetActive(false);
|
item.gameObject.SetActive(false);
|
||||||
@ -309,9 +329,9 @@ namespace QFramework.Example
|
|||||||
}
|
}
|
||||||
ZheSheInput.gameObject.SetActive(true);
|
ZheSheInput.gameObject.SetActive(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<Descript>
|
<Descript>
|
||||||
折射仪又称折光仪,用来测定折射率、双折率、光性,折射率是物质的重要物理常数之一。折射仪主要由高折射率棱镜(铅玻璃或立方氧化锆)、棱镜反射镜、透镜、标尺(内标尺或外标尺)和目镜等组成。可用于:1.鉴定宝石,可测定RI1.35-1.81之间宝石的折射率值;2.可测定宝石的双折射率(DR);3.确定宝石的轴性,如一轴晶、二轴晶和各向同性(等轴晶系、非晶质);4.确定宝石的光性符号,如各向异性宝石的正光性和负光性。
|
折射仪又称折光仪,用来测定折射率、双折率、光性、轴性,折射率是物质的重要物理常数之一。折射仪主要由高折射率棱镜(铅玻璃或立方氧化锆)、棱镜反射镜、透镜、标尺(内标尺或外标尺)和目镜等组成。可用于:1.鉴定宝石,可测定RI1.35-1.81之间宝石的折射率值;2.可测定宝石的双折射率(DR);3.确定宝石的轴性,如一轴晶、二轴晶和各向同性(等轴晶系、非晶质);4.确定宝石的光性符号,如各向异性宝石的正光性和负光性。
|
||||||
</Descript>
|
</Descript>
|
||||||
|
|
||||||
<Device>
|
<Device>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user