【发布时间】:2015-06-06 04:20:43
【问题描述】:
我有一个程序,它的行为应该根据它是否已运行多次而改变。是否可以有一个开关在每次运行之间保持其值,告诉程序该做什么?
例如(显然是伪代码):
if (first_run){
make splash screen say "Welcome, Newcomer!";
give a tour of program on boot;
}
else {
make splash screen say "Hello again!";
do not give tour;
}
我看到this,但显然Windows.Storage 的最低支持客户端是Windows 8,我希望我的应用程序可供Windows 7 用户使用。此外,接受的回答者使用the code suggested 会引发Type Windows.Storage.ApplicationDataContainer is not defined 错误。
我是 XAML 和 WPF 的新手,如果这很简单,请见谅;我用谷歌搜索并没有找到相关结果(我什至不知道是否/如何将 C# 嵌入 WPF,因为我在 VS2013 中看不到它的选项)。
谢谢!
【问题讨论】: