資源簡介
語音聊天程序WPF,這 個 程序最大的特點是用WPF所寫。

代碼片段和文件信息
//
//?ColorPicker.cs?
//?An?HSB?(hue?saturation?brightness)?based
//?color?picker.
//
//?
using?System;
using?System.Windows;
using?System.Windows.Navigation;
using?System.Windows.Media;
using?System.Windows.Media.Animation;
using?System.Windows.Shapes;
using?System.Windows.Ink;
using?System.Windows.Controls;
using?System.Collections.Generic;
using?System.Windows.Input;
using?System.Windows.Data;
using?System.Windows.Markup;
using?System.Text;
namespace?Microsoft.Samples.CustomControls
{
????#region?ColorPicker
????public?class?ColorPicker?:?Control
????{
????????static?ColorPicker()
????????{
????????????DefaultstyleKeyProperty.Overridemetadata(typeof(ColorPicker)?new?frameworkPropertymetadata(typeof(ColorPicker)));
????????}
????????public?ColorPicker()
????????{
????????????templateApplied?=?false;
????????????m_color?=?Colors.White;
????????????shouldFindPoint?=?true;
????????????SetValue(AProperty?m_color.A);
????????????SetValue(RProperty?m_color.R);
????????????SetValue(GProperty?m_color.G);
????????????SetValue(BProperty?m_color.B);
????????????SetValue(SelectedColorProperty?m_color);
????????}
????????#region?Public?Methods
????????
????????public?override?void?OnApplyTemplate()
????????{
????????????base.OnApplyTemplate();
????????????m_ColorDetail?=?GetTemplateChild(ColorDetailName)?as?frameworkElement;
????????????m_ColorMarker?=?GetTemplateChild(ColorMarkerName)?as?Path;
????????????m_ColorSlider?=?GetTemplateChild(ColorSliderName)?as?SpectrumSlider;
????????????m_ColorSlider.ValueChanged?+=?new?RoutedPropertyChangedEventHandler(baseColorChanged);
????????????
????????????
????????????m_ColorMarker.RenderTransform?=?markerTransform;
????????????m_ColorMarker.RenderTransformOrigin?=?new?Point(0.5?0.5);
????????????m_ColorDetail.MouseLeftButtonDown?+=?new?MouseButtonEventHandler(OnMouseLeftButtonDown);
????????????m_ColorDetail.PreviewMouseMove?+=?new?MouseEventHandler(onmousemove);
????????????m_ColorDetail.SizeChanged?+=?new?SizeChangedEventHandler(ColorDetailSizeChanged);
????????????templateApplied?=?true;
????????????shouldFindPoint?=?true;
????????????isAlphaChange?=?false;
????????????
????????????SelectedColor?=?m_color;
????????????
????????????
????????????
????????}
????????#endregion
????????#region?Public?Properties
????????//?Gets?or?sets?the?selected?color.
????????public?System.Windows.Media.Color?SelectedColor
????????{
????????????get
????????????{
????????????????return?(System.Windows.Media.Color)GetValue(SelectedColorProperty);
????????????}
????????????set
????????????{
????????????????SetValue(SelectedColorProperty?m_color);
????????????????setColor((Color)value);
????????????}
????????}
????????#region?RGB?Properties
????????//?Gets?or?sets?the?ARGB?alpha?value?of?the?selected?color.
????????public?byte?A
????????{
????????????get
????????????{
????????????????return?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????38400??2010-06-07?23:09??ColorPickerLib\bin\Debug\ColorPicker.dll
?????文件??????58880??2010-06-07?23:09??ColorPickerLib\bin\Debug\ColorPicker.pdb
?????文件??????20845??2007-12-21?20:30??ColorPickerLib\ColorPicker.cs
?????文件???????4957??2010-06-07?23:06??ColorPickerLib\ColorPicker.csproj
?????文件????????497??2010-06-07?23:06??ColorPickerLib\ColorPicker.csproj.user
?????文件???????1211??2007-12-21?20:30??ColorPickerLib\ColorPickerDialog.xaml
?????文件???????1995??2007-12-21?20:30??ColorPickerLib\ColorPickerDialog.xaml.cs
?????文件????????869??2010-06-07?23:09??ColorPickerLib\obj\Debug\ColorPicker.csproj.FileListAbsolute.txt
?????文件??????38400??2010-06-07?23:09??ColorPickerLib\obj\Debug\ColorPicker.dll
?????文件??????18057??2010-06-07?23:09??ColorPickerLib\obj\Debug\ColorPicker.g.resources
?????文件??????58880??2010-06-07?23:09??ColorPickerLib\obj\Debug\ColorPicker.pdb
?????文件???????1721??2010-06-07?23:09??ColorPickerLib\obj\Debug\ColorPickerDialog.baml
?????文件???????4222??2010-06-07?23:09??ColorPickerLib\obj\Debug\ColorPickerDialog.g.cs
?????文件????????240??2010-06-07?23:33??ColorPickerLib\obj\Debug\ColorPicker_MarkupCompile.cache
?????文件????????210??2010-06-07?23:09??ColorPickerLib\obj\Debug\ColorPicker_MarkupCompile.lref
?????文件???????5937??2010-06-07?23:33??ColorPickerLib\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????2901??2010-06-07?23:09??ColorPickerLib\obj\Debug\GeneratedInternalTypeHelper.g.cs
?????文件??????16038??2010-06-07?23:09??ColorPickerLib\obj\Debug\Themes\generic.baml
?????文件???????9455??2007-12-21?20:30??ColorPickerLib\SupportingClasses.cs
?????文件??????34084??2007-12-21?20:30??ColorPickerLib\Themes\generic.xaml
?????文件??????18432??2010-06-07?23:09??Media\bin\Debug\Media.dll
?????文件??????42496??2010-06-07?23:09??Media\bin\Debug\Media.pdb
?????文件???????4632??2010-06-04?16:54??Media\Media.csproj
?????文件????????452??2010-06-04?16:54??Media\Media.csproj.user
?????文件???????5722??2010-06-07?23:09??Media\obj\Debug\DesignTimeResolveAssemblyReferencesInput.cache
?????文件???????1143??2010-06-07?23:09??Media\obj\Debug\Media.csproj.FileListAbsolute.txt
?????文件??????18432??2010-06-07?23:09??Media\obj\Debug\Media.dll
?????文件??????42496??2010-06-07?23:09??Media\obj\Debug\Media.pdb
?????文件???????1440??2009-10-24?17:57??Media\Properties\AssemblyInfo.cs
?????文件???????3047??2009-10-24?17:57??Media\Wave\native\MMSYSERR.cs
............此處省略156個文件信息
評論
共有 條評論