91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 249KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-05-16
  • 語(yǔ)言: C#
  • 標(biāo)簽: wpf??led??時(shí)鐘??鐘表??watch??

資源簡(jiǎn)介

wpf led時(shí)鐘 指針時(shí)鐘,原創(chuàng)。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Text;
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.Imaging;
using?System.Windows.Navigation;
using?System.Windows.Shapes;
using?System.Windows.Threading;

namespace?Clock
{
????///?
????///?Follow?steps?1a?or?1b?and?then?2?to?use?this?custom?control?in?a?XAML?file.
????///
????///?Step?1a)?Using?this?custom?control?in?a?XAML?file?that?exists?in?the?current?project.
????///?Add?this?xmlNamespace?attribute?to?the?root?element?of?the?markup?file?where?it?is?
????///?to?be?used:
????///
????///?????xmlns:MyNamespace=“clr-namespace:Clock“
????///
????///
????///?Step?1b)?Using?this?custom?control?in?a?XAML?file?that?exists?in?a?different?project.
????///?Add?this?xmlNamespace?attribute?to?the?root?element?of?the?markup?file?where?it?is?
????///?to?be?used:
????///
????///?????xmlns:MyNamespace=“clr-namespace:Clock;assembly=Clock“
????///
????///?You?will?also?need?to?add?a?project?reference?from?the?project?where?the?XAML?file?lives
????///?to?this?project?and?Rebuild?to?avoid?compilation?errors:
????///
????///?????Right?click?on?the?target?project?in?the?Solution?Explorer?and
????///?????“Add?Reference“->“Projects“->[Browse?to?and?select?this?project]
????///
????///
????///?Step?2)
????///?Go?ahead?and?use?your?control?in?the?XAML?file.
????///
????///?????
????///
????///?

????public?class?MyClock?:?Control
????{
????????static?MyClock()
????????{
????????????DefaultstyleKeyProperty.Overridemetadata(typeof(MyClock)?new?frameworkPropertymetadata(typeof(MyClock)));
????????}

????????private?DispatcherTimer?timer;?//?NameSpace:System.Windows.Threading
????????//重載初始化函數(shù)OnInitialized,加入初始化計(jì)時(shí)器代碼
????????protected?override?void?OnInitialized(EventArgs?e)
????????{
????????????base.OnInitialized(e);
????????????UpdateDateTime();
????????????timer?=?new?DispatcherTimer();
????????????timer.Interval?=?TimeSpan.FromMilliseconds(1000);
????????????timer.Tick?+=?new?EventHandler(timer_Tick);
????????????timer.Start();
????????}
????????//計(jì)時(shí)器事件函數(shù)
????????private?void?timer_Tick(object?sender?EventArgs?e)
????????{
????????????UpdateDateTime();
????????}
????????//編寫(xiě)UpdateDateTime函數(shù),用于更新時(shí)間
????????private?void?UpdateDateTime()
????????{
????????????Time?=?DateTime.Now;
????????}

????????public?DateTime?Time
????????{
????????????get?{?return?(DateTime)GetValue(TimeProperty);?}
????????????private?set?{?SetValue(TimeProperty?value);?}
????????}
????????public?static?DependencyProperty?TimeProperty?=?DependencyProperty.Register(
????????????“Time“?typeof(DateTime)?
????????????typeof(MyClock)?
????????????new?Propertymetadata(DateTime.Now?new?PropertyChangedCallback(OnDateTimeInvalidated)));
????????private

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----

?????文件???????9216??2012-08-20?15:34??Clock\Clock\bin\Debug\Clock.dll

?????文件??????28160??2012-08-20?15:34??Clock\Clock\bin\Debug\Clock.pdb

?????文件???????3820??2011-07-20?11:05??Clock\Clock\Clock.csproj

?????文件???????4027??2011-07-20?11:05??Clock\Clock\MyClock.cs

?????文件???????1605??2011-11-18?10:54??Clock\Clock\obj\Debug\Clock.csproj.FileListAbsolute.txt

?????文件???????9216??2012-08-20?15:34??Clock\Clock\obj\Debug\Clock.dll

?????文件???????1364??2012-08-20?15:34??Clock\Clock\obj\Debug\Clock.g.resources

?????文件??????28160??2012-08-20?15:34??Clock\Clock\obj\Debug\Clock.pdb

?????文件????????180??2011-11-18?10:54??Clock\Clock\obj\Debug\Clock.Properties.Resources.resources

?????文件????????187??2012-08-20?15:34??Clock\Clock\obj\Debug\Clock_MarkupCompile.cache

?????文件????????187??2012-08-20?15:33??Clock\Clock\obj\Debug\Clock_MarkupCompile.i.cache

?????文件????????139??2012-08-20?15:33??Clock\Clock\obj\Debug\Clock_MarkupCompile.i.lref

?????文件????????137??2012-08-20?15:34??Clock\Clock\obj\Debug\Clock_MarkupCompile.lref

?????文件??????15146??2012-01-13?14:27??Clock\Clock\obj\Debug\DesignTimeResolveAssemblyReferences.cache

?????文件???????6299??2012-08-20?15:34??Clock\Clock\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache

?????文件??????????7??2012-08-20?15:34??Clock\Clock\obj\Debug\GeneratedInternalTypeHelper.g.cs

?????文件???????2905??2012-08-20?15:34??Clock\Clock\obj\Debug\GeneratedInternalTypeHelper.g.i.cs

?????文件????????220??2011-11-18?10:54??Clock\Clock\obj\Debug\GenerateResource.read.1.tlog

?????文件????????518??2011-11-18?10:54??Clock\Clock\obj\Debug\GenerateResource.write.1.tlog

?????文件????????757??2011-07-20?11:06??Clock\Clock\obj\Debug\JClock.csproj.FileListAbsolute.txt

?????文件???????4608??2011-07-20?11:05??Clock\Clock\obj\Debug\TempPE\Properties.Resources.Designer.cs.dll

?????文件???????1128??2012-08-20?15:34??Clock\Clock\obj\Debug\Themes\Generic.baml

?????文件???????2288??2011-07-20?08:52??Clock\Clock\Properties\AssemblyInfo.cs

?????文件???????2834??2011-07-20?11:05??Clock\Clock\Properties\Resources.Designer.cs

?????文件???????5612??2011-07-20?08:52??Clock\Clock\Properties\Resources.resx

?????文件???????1084??2011-07-20?11:05??Clock\Clock\Properties\Settings.Designer.cs

?????文件????????201??2011-07-20?08:52??Clock\Clock\Properties\Settings.settings

?????文件???????1468??2011-07-20?13:25??Clock\Clock\Themes\Generic.xaml

?????文件???????3529??2011-07-21?12:26??Clock\Clock.sln

????..A..H.?????84480??2012-08-20?15:35??Clock\Clock.suo

............此處省略137個(gè)文件信息

評(píng)論

共有 條評(píng)論