WpfApplication8/MainWindow.xaml.cs
(完整代码) 1KBusing System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
namespace WpfApplication8
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void Storyboard_CurrentTimeInvalidated(object sender,EventArgs e)
{
//运行时计时状态
Clock storyboardClock = (Clock)sender;
if (storyboardClock.CurrentProgress == null) {
lblTime.Content = "";
progressBar1.Value = 0;
}
else
{
//获取当前时间
lblTime.Content = storyboardClock.CurrentTime.ToString();
//当前迭代中的当前进度
progressBar1.Value = (double)storyboardClock.CurrentProgress;
}
}
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
