tune
This commit is contained in:
@@ -94,8 +94,8 @@
|
||||
<ol>
|
||||
<li>Normal message handling:</li>
|
||||
</ol>
|
||||
<pre><code class="lang-csharp" name="Normal Messages">MessageHost.AddMessage("Operation completed successfully.");
|
||||
MessageHost.AddWarning("Please check your input.");
|
||||
<pre><code class="lang-csharp" name="Normal Messages">MessageHost.ReportMessage("Operation completed successfully.");
|
||||
MessageHost.ReportWarning("Please check your input.");
|
||||
</code></pre>
|
||||
<ol start="2">
|
||||
<li>Exception handling in synchronous code:</li>
|
||||
|
||||
@@ -307,7 +307,7 @@ namespace HiNC_2025_win_desktop.Geom
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageHost.AddError(string.Format(Application.Current.FindResource("Vec3d_Update_Error").ToString(), ex.Message));
|
||||
MessageHost.ReportError(string.Format(Application.Current.FindResource("Vec3d_Update_Error").ToString(), ex.Message));
|
||||
ex.ShowException(this);
|
||||
}
|
||||
finally
|
||||
@@ -398,7 +398,7 @@ namespace HiNC_2025_win_desktop.Geom
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
MessageHost.AddError(string.Format(Application.Current.FindResource("Vec3d_Update_Error").ToString(), ex.Message));
|
||||
MessageHost.ReportError(string.Format(Application.Current.FindResource("Vec3d_Update_Error").ToString(), ex.Message));
|
||||
ex.ShowException(this);
|
||||
}
|
||||
finally
|
||||
@@ -555,7 +555,7 @@ namespace HiNC_2025_win_desktop.Geom
|
||||
catch (Exception ex)
|
||||
{
|
||||
// 记录异常但不中断用户操作
|
||||
MessageHost.AddError(string.Format(Application.Current.FindResource("Vec3d_Update_Error").ToString(), ex.Message));
|
||||
MessageHost.ReportError(string.Format(Application.Current.FindResource("Vec3d_Update_Error").ToString(), ex.Message));
|
||||
ex.ShowException(this);
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user