public static Time CreateTime(Window window, BandicamUtil bandicamUtil) { if (time == null) { time = new Time(window, bandicamUtil); } return(time); }
public Time(Window window, BandicamUtil bandicamUtil) { timeView = new TimeView(this, bandicamUtil); this.Owner = window; this.DataContext = timeView; InitializeComponent(); this.Left = 0; this.Top = 0; }
public TimeView(Window window, BandicamUtil bandicamUtil) { this.window = window; this.bandicamUtil = bandicamUtil; countDown.Interval = 1000; countDown.Enabled = true; countDown.Elapsed += new ElapsedEventHandler(Time_Elapsed); countDown.Stop(); this.TimeHour = 0; this.timeMinute = 0; this.HourUpCommand = new DelegateCommand(HourUp); this.HourDownCommand = new DelegateCommand(HourDown); this.MinuteUpCommand = new DelegateCommand(MinuteUp); this.MinuteDownCommand = new DelegateCommand(MinuteDown); this.MinuteUpUpCommand = new DelegateCommand(MinuteUpUp); this.MinuteDownDownCommand = new DelegateCommand(MinuteDownDown); this.CloseCommand = new DelegateCommand(Close); //test //tsLength = TimeSpan.FromSeconds(10); //tsSatrt = DateTime.Now; }