void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.MyConrtol = ((Tick.TickControl)(target)); return; case 2: this.showHour = ((Tick.TextShowControl)(target)); return; case 3: this.showMinute = ((Tick.TextShowControl)(target)); return; case 4: this.showSecond = ((Tick.TextShowControl)(target)); return; case 5: this.digiteHour = ((Tick.DigitalTubeControl)(target)); return; case 6: this.digiteMinute = ((Tick.DigitalTubeControl)(target)); return; case 7: this.digiteSecond = ((Tick.DigitalTubeControl)(target)); return; } this._contentLoaded = true; }
private void autoNightMode() { if (DateTime.Now.Hour >= 18) { Status.isDark = true; ThemePassage.ThemeConvert(Theme.Dark); } else { Status.isDark = false; ThemePassage.ThemeConvert(Theme.Light); TickControl control = new TickControl(); control.AutoNightMode += nightMode; control.AutoNightModeStart(); } }
void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target) { switch (connectionId) { case 1: this.myTick = ((Tick.TickControl)(target)); return; case 2: this.gridMasterTimer = ((System.Windows.Controls.Grid)(target)); return; case 3: this.showHour = ((Tick.TextShowControl)(target)); return; case 4: this.showMinute = ((Tick.TextShowControl)(target)); return; case 5: this.showSecond = ((Tick.TextShowControl)(target)); return; case 6: this.gridMinTimer = ((System.Windows.Controls.Grid)(target)); return; case 7: this.digiteHour = ((Tick.DigitalTubeControl)(target)); return; case 8: this.digiteMinute = ((Tick.DigitalTubeControl)(target)); return; case 9: this.digiteSecond = ((Tick.DigitalTubeControl)(target)); return; case 10: this.btnStart = ((System.Windows.Controls.Button)(target)); #line 24 "..\..\..\Page\OrdinaryPage.xaml" this.btnStart.Click += new System.Windows.RoutedEventHandler(this.btnStart_Click); #line default #line hidden return; case 11: this.iconStart = ((MaterialDesignThemes.Wpf.PackIcon)(target)); return; case 12: this.btnReset = ((System.Windows.Controls.Button)(target)); #line 27 "..\..\..\Page\OrdinaryPage.xaml" this.btnReset.Click += new System.Windows.RoutedEventHandler(this.btnReset_Click); #line default #line hidden return; case 13: this.btnRecordA = ((System.Windows.Controls.Button)(target)); #line 30 "..\..\..\Page\OrdinaryPage.xaml" this.btnRecordA.Click += new System.Windows.RoutedEventHandler(this.btnRecordA_Click); #line default #line hidden return; case 14: this.btnRecordB = ((System.Windows.Controls.Button)(target)); #line 33 "..\..\..\Page\OrdinaryPage.xaml" this.btnRecordB.Click += new System.Windows.RoutedEventHandler(this.btnRecordB_Click); #line default #line hidden return; case 15: #line 36 "..\..\..\Page\OrdinaryPage.xaml" ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.btnShowTick_Click); #line default #line hidden return; case 16: this.progressBar = ((System.Windows.Controls.ProgressBar)(target)); return; } this._contentLoaded = true; }