增加提示
This commit is contained in:
@@ -111,11 +111,20 @@
|
||||
<EmbeddedResource Include="frmISP.resx">
|
||||
<DependentUpon>frmISP.cs</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resource-CN.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resource-CN.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<Compile Include="Properties\Resource-CN.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resource-CN.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
|
||||
@@ -343,7 +343,6 @@
|
||||
this.progressBar1.Name = "progressBar1";
|
||||
this.progressBar1.Size = new System.Drawing.Size(621, 34);
|
||||
this.progressBar1.TabIndex = 115;
|
||||
this.progressBar1.Visible = false;
|
||||
//
|
||||
// lblPgsPercentage
|
||||
//
|
||||
|
||||
@@ -226,10 +226,12 @@ namespace WinISP
|
||||
cboConnectedMonitor.Enabled = !isRunning;
|
||||
}
|
||||
|
||||
private void SetStatusMsg(String msg)
|
||||
private void SetStatusMsg(String msg,bool display = false)
|
||||
{
|
||||
toolStripStatusLabel1.Text = msg;
|
||||
Application.DoEvents();
|
||||
|
||||
if(display) MessageBox.Show(msg, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
|
||||
private void frmISP_FormClosing(object sender, FormClosingEventArgs e)
|
||||
@@ -301,7 +303,7 @@ namespace WinISP
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
SetStatusMsg("Could not read file from disk.");
|
||||
SetStatusMsg("Could not read file from disk.",true);
|
||||
}
|
||||
|
||||
if (_binFilePath == String.Empty)
|
||||
@@ -405,7 +407,7 @@ namespace WinISP
|
||||
cboConnectedMonitor.Enabled = false;
|
||||
btnRunDPISP.Enabled = false;
|
||||
pnlConnState.BackColor = Color.Red;
|
||||
SetStatusMsg("Current F/W version is not compatible with this tool.");
|
||||
SetStatusMsg("Current F/W version is not compatible with this tool.", true);
|
||||
}
|
||||
_chipType = chipType;
|
||||
switch (chipType)
|
||||
@@ -893,7 +895,7 @@ namespace WinISP
|
||||
if (SetSentInfo(0) == false)
|
||||
{
|
||||
SetStatusMsg("Adaptive PktLen fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Adaptive PktLen fail.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -964,7 +966,7 @@ namespace WinISP
|
||||
if (SetSentInfo(0) == false)
|
||||
{
|
||||
SetStatusMsg("Adaptive pktDelayTime fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Adaptive pktDelayTime fail.");
|
||||
return;
|
||||
}
|
||||
WriteLog("Adaptive pktDelayTime: " + pktDelayTime.ToString() + "us.", "debug");
|
||||
@@ -1200,7 +1202,7 @@ namespace WinISP
|
||||
if (IsConnect == false)
|
||||
{
|
||||
SetStatusMsg("Initialize ISP connection fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Initialize ISP connection fail.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1217,25 +1219,25 @@ namespace WinISP
|
||||
if (!IsModelNameMatch(_u8ModelName))
|
||||
{
|
||||
SetStatusMsg(Properties.Resources.ModelNameErr);
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, Properties.Resources.ModelNameErr);
|
||||
return;
|
||||
}
|
||||
if (!IsChipNameMatch(_u8ChipName))
|
||||
{
|
||||
SetStatusMsg(Properties.Resources.ChipNameErr);
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, Properties.Resources.ChipNameErr);
|
||||
return;
|
||||
}
|
||||
if (!IsPanelNameMatch(_u8PanelName))
|
||||
{
|
||||
SetStatusMsg(Properties.Resources.PanelNameErr);
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, Properties.Resources.PanelNameErr);
|
||||
return;
|
||||
}
|
||||
if (!IsBoardNameMatch(_u8BoardName))
|
||||
{
|
||||
SetStatusMsg(Properties.Resources.BoardNameErr);
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, Properties.Resources.BoardNameErr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1255,7 +1257,7 @@ namespace WinISP
|
||||
if (rdSize != bin.Length)
|
||||
{
|
||||
SetStatusMsg("Initialize file Information fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Initialize file Information fail.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1379,7 +1381,7 @@ namespace WinISP
|
||||
if (SetSentInfo(sentLen + _flashSectorSize) == false)
|
||||
{
|
||||
SetStatusMsg("Send file fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Send file fail.");
|
||||
return;
|
||||
}
|
||||
checkSum = 0;
|
||||
@@ -1394,7 +1396,7 @@ namespace WinISP
|
||||
if (SetSentInfo(sentLen + _flashSectorSize) == false)
|
||||
{
|
||||
SetStatusMsg("Send file fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Send file fail.");
|
||||
return;
|
||||
}
|
||||
checkSum = 0;
|
||||
@@ -1446,14 +1448,14 @@ namespace WinISP
|
||||
if (SetSentInfo(sentLen) == false)
|
||||
{
|
||||
SetStatusMsg("Send file fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Send file fail.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (retryCnt > MaxRetryCnt)
|
||||
{
|
||||
SetStatusMsg("Send file fail.");
|
||||
SetISPStatus(false);
|
||||
SetISPStatus(false, "Send file fail.");
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -1559,7 +1561,7 @@ namespace WinISP
|
||||
}
|
||||
else
|
||||
{
|
||||
SetStatusMsg("Update firmware fail, " + "Elapsed Time : " + end.ToString() + " ms");
|
||||
SetStatusMsg("Update firmware fail, " + "Elapsed Time : " + end.ToString() + " ms",true);
|
||||
}
|
||||
|
||||
SetISPStatus(false);
|
||||
|
||||
Reference in New Issue
Block a user