0

我对矩阵的操作很少,每个操作都取决于用户的选择。每个操作都有自己的界面。为了保存上次操作的数据,我使用 GroupBox 来保存界面的按钮。例如,如果我决定要添加 2 个矩阵并键入它们并得到结果,但随后我切换到分析矩阵(并使添加的 GroupBox 不可见),我不会丢失添加界面的数据,我可以返回添加并使 GroupBox 可见。

我的问题是是否有更好的方法来保存整个界面而不仅仅是使 GroupBox 可见/不可见。将数据保存在某个 .txt 文件中并重新重建整个界面会更好吗?基本上我问是否可以使用 GroupBox 保存包含来自用户的数据的 Gui 界面?希望我的问题很清楚。我正在使用 Windows 表单 在此先感谢。

4

2 回答 2

0

Of course it is better if you keep all your controls with input data available at immediate request, without recreating every time the user interface, when your user switch from input to analyze or viceversa. This will give a snappy response time and a better usability.

From a conceptual point of view, I don't like to hide/show controls on the screen. In your scenario I will try do divide the UI interface in two parts, one with the input controls and another for the analyzing activities. (SplitContainer comes to mind) In this way the user will be able to see on which input data is working and allows you (perhaps) to dinamically change the analyzing results while changing the input data.

However, I don't know how complex are the input data and analyze parts. Sometimes, if you have a very cluttered form is better to separate the two functionality inside a tabcontrol or separate windows (or, as you have already done, with this groupbox hide/show functionality).

于 2012-05-27T09:17:46.247 回答
0

您不需要“保存整个界面”。应保存当前正在处理的应用程序数据,然后从当前 UI 中保存足够的状态数据,以便能够重新创建其状态。这意味着您不会保存整个组合框,而是只需保存每个单选按钮的选定状态。尝试以与 UI 无关的合理方式保存状态数据,这样,如果您更改 UI,就不必完全重写状态保存功能。

于 2012-05-27T09:07:09.497 回答