调整代码
This commit is contained in:
@@ -267,6 +267,8 @@ public partial class MainWindow
|
||||
}
|
||||
|
||||
private bool _loaded = false;
|
||||
private int currentStep;
|
||||
|
||||
private void Window_Loaded(object sender, RoutedEventArgs e) { _loaded = true; }
|
||||
|
||||
private void Switch_OnClick(object sender, RoutedEventArgs e) { ThemeManager.SwitchThemeMode(); }
|
||||
@@ -419,6 +421,47 @@ public partial class MainWindow
|
||||
};
|
||||
window.ShowDialog();
|
||||
}
|
||||
|
||||
private void MyTutorial_Close(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show("教程已关闭");
|
||||
ShowCurrentStep();
|
||||
}
|
||||
|
||||
private void MyTutorial_Back(object sender, RoutedEventArgs e)
|
||||
{
|
||||
MessageBox.Show("返回上一步");
|
||||
}
|
||||
|
||||
|
||||
private void StartBtn_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
currentStep = 1;
|
||||
ShowCurrentStep();
|
||||
}
|
||||
|
||||
private void MyTutorial_Next(object sender, RoutedEventArgs e)
|
||||
{
|
||||
currentStep++;
|
||||
ShowCurrentStep();
|
||||
}
|
||||
|
||||
private void ShowCurrentStep()
|
||||
{
|
||||
switch (currentStep)
|
||||
{
|
||||
case 1:
|
||||
MyTutorial.ShowStep(TargetButton, "保存功能", "点击这里可以保存你当前的进度。", "1 / 2");
|
||||
break;
|
||||
case 2:
|
||||
MyTutorial.ShowStep(StartBtn, "删除功能", "谨慎使用,这会清除数据。", "2 / 2");
|
||||
break;
|
||||
|
||||
default:
|
||||
MyTutorial.Close();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region 数据模型
|
||||
@@ -506,7 +549,7 @@ public class Area
|
||||
{
|
||||
public Area()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public Area(int Id, string Name)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user