1空调温度控制软件源代码资料.docx
- 文档编号:26195243
- 上传时间:2023-06-17
- 格式:DOCX
- 页数:161
- 大小:45.01KB
1空调温度控制软件源代码资料.docx
《1空调温度控制软件源代码资料.docx》由会员分享,可在线阅读,更多相关《1空调温度控制软件源代码资料.docx(161页珍藏版)》请在冰豆网上搜索。
1空调温度控制软件源代码资料
/******************************************************
//**软件首页类
//******************************************************/
usingSystem;
usingSystem.Collections.Generic;
usingSystem.Linq;
usingSystem.Text;
usingSystem.Windows;
usingSystem.Windows.Controls;
usingSystem.Windows.Data;
usingSystem.Windows.Documents;
usingSystem.Windows.Input;
usingSystem.Windows.Media;
usingSystem.Windows.Media.Imaging;
usingSystem.Windows.Navigation;
usingSystem.Windows.Shapes;
usingSystem.IO;
publicpartialclassSoftware{
///Movesthespecifiedoldindex.
///
///
publicvoidMove(intoldIndex,intnewIndex)
{
this.MoveItem(oldIndex,newIndex);
}
///Addstherange.
///
publicvoidAddRange(paramsT[]items)
{
this.BeginUpdate();
for(inti=0;i { this.Add(items[i]); } this.EndUpdate(); } ///Beginstheupdate. publicvoidBeginUpdate() { this.update++; } ///Endstheupdate. publicvoidEndUpdate() { this.EndUpdate(true); } internalvirtualvoidEndUpdate(boolnotify) { update--; if(update<=0) { this.update=0; if(notify) { OnCollectionChanged(newNotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Reset)); } } } #endregion #regionOverrides protectedinternalintVersion { get { returnthis.version; } } protectedboolIsInUpdate { get{returnthis.update>0;} } protectedoverridevoidInsertItem(intindex,Titem) { base.InsertItem(index,item); this.OnPropertyChanged("Count"); this.OnPropertyChanged("Item[]"); this.OnCollectionChanged(NotifyCollectionChangedAction.Add,item,index); } protectedoverridevoidSetItem(intindex,Titem) { ToldItem=base[index]; base.SetItem(index,item); this.OnPropertyChanged("Item[]"); this.OnCollectionChanged(NotifyCollectionChangedAction.Replace,oldItem,item,index); } protectedoverridevoidRemoveItem(intindex) { Titem=base[index]; base.RemoveItem(index); this.OnPropertyChanged("Count"); this.OnPropertyChanged("Item[]"); this.OnCollectionChanged(NotifyCollectionChangedAction.Remove,item,index); } protectedoverridevoidClearItems() { base.ClearItems(); this.OnPropertyChanged("Count"); this.OnPropertyChanged("Item[]"); this.OnCollectionChanged(NotifyCollectionChangedAction.Reset); } protectedvirtualvoidMoveItem(intoldIndex,intnewIndex) { Titem=base[oldIndex]; base.RemoveItem(oldIndex); base.InsertItem(newIndex,item); this.OnPropertyChanged("Item[]"); this.OnCollectionChanged(NotifyCollectionChangedAction.Move,item,newIndex,oldIndex); } #endregion #regionINotifyCollectionChangedMembers publiceventNotifyCollectionChangedEventHandlerCollectionChanged; protectedvirtualvoidOnCollectionChanged(NotifyCollectionChangedEventArgsargs) { if(this.CollectionChanged! =null&&update==0) { this.CollectionChanged(this,args); this.version++; } } privatevoidOnCollectionChanged(NotifyCollectionChangedActionaction) { OnCollectionChanged(newNotifyCollectionChangedEventArgs(action)); } privatevoidOnCollectionChanged(NotifyCollectionChangedActionaction,objectitem,intindex) { OnCollectionChanged(newNotifyCollectionChangedEventArgs(action,item,index)); } privatevoidOnCollectionChanged(NotifyCollectionChangedActionaction,objectoldItem,objectitem,intindex) { OnCollectionChanged(newNotifyCollectionChangedEventArgs(action,oldItem,item,index)); } #endregion #regionINotifyPropertyChangedMembers publiceventPropertyChangedEventHandlerPropertyChanged; protectedvirtualvoidOnPropertyChanged(PropertyChangedEventArgse) { if(this.PropertyChanged! =null) { this.PropertyChanged(this,e); } } protectedvoidOnPropertyChanged(stringpropertyName) { this.OnPropertyChanged(newPropertyChangedEventArgs(propertyName)); } #endregion } } } /****************************************************** //**校准设置类 //******************************************************/ usingSystem; usingSystem.Collections.Generic; usingSystem.Linq; usingSystem.Text; usingSystem.Windows; usingSystem.Windows.Controls; usingSystem.Windows.Data; usingSystem.Windows.Documents; usingSystem.Windows.Input; usingSystem.Windows.Media; usingSystem.Windows.Media.Imaging; usingSystem.Windows.Navigation; usingSystem.Windows.Shapes; usingSystem.IO; publicpartialclassCalibrationsettings{ ///Baseclassforalllayers. publicabstractclassMapLayer: ItemsControl,ILayer { ///IdentifiestheBaseZoomLeveldependencyproperty. publicstaticreadonlyDependencyPropertyBaseZoomLevelProperty=DependencyProperty.RegisterAttached( "BaseZoomLevel", typeof(double), typeof(MapLayer), newPropertyMetadata(double.NaN,newPropertyChangedCallback(LocationChangedHandler))); ///IdentifiestheHotSpotdependencyproperty. publicstaticreadonlyDependencyPropertyHotSpotProperty=DependencyProperty.RegisterAttached( "HotSpot", typeof(HotSpot), typeof(MapLayer), newPropertyMetadata(null,newPropertyChangedCallback(LocationChangedHandler))); ///IdentifiestheGeographicalSizedependencyproperty. publicstaticreadonlyDependencyPropertyGeographicalSizeProperty=DependencyProperty.RegisterAttached( "GeographicalSize", typeof(Location), typeof(MapLayer), newPropertyMetadata(Location.Empty,newPropertyChangedCallback(GeographicalSizeChangedHandler))); ///IdentifiestheLocationdependencyproperty. publicstaticreadonlyDependencyPropertyLocationProperty=DependencyProperty.RegisterAttached( "Location", typeof(Location), typeof(MapLayer), newPropertyMetadata(Location.Empty,newPropertyChangedCallback(LocationChangedHandler))); ///IdentifiestheMaxScaledependencyproperty. publicstaticreadonlyDependencyPropertyMaxScaleProperty=DependencyProperty.RegisterAttached( "MaxScale", typeof(double), typeof(MapLayer), newPropertyMetadata(double.NaN,newPropertyChangedCallback(LocationChangedHandler))); ///IdentifiestheMinScaledependencyproperty. publicstaticreadonlyDependencyPropertyMinScaleProperty=DependencyProperty.RegisterAttached( "MinScale", typeof(double), typeof(MapLayer), newPropertyMetadata(double.NaN,newPropertyChangedCallback(LocationChangedHandler))); ///IdentifiestheZoomRangedependencyproperty. publicstaticreadonlyDependencyPropertyZoomRangeProperty=DependencyProperty.RegisterAttached( "ZoomRange", typeof(ZoomRange), typeof(MapLayer), newPropertyMetadata(ZoomRange.Empty,newPropertyChangedCallback(LocationChangedHandler))); privateWeakReferencemapControl=null; ///InitializesanewinstanceoftheMapLayerclass. protectedMapLayer() { this.Loaded+=newRoutedEventHandler(this.BaseLayer_Loaded); } ///Getsorsetsmapcontrolthislayerbelongsto. publicRadMapMapControl { get { if(this.mapControl! =null &&this.mapControl.IsAlive) { returnthis.mapControl.TargetasRadMap; } else { returnnull; } } set { RadMapoldMap=null; if(this.mapControl! =null &&this.mapControl.IsAlive) { oldMap=this.mapControl.TargetasRadMap; } this.mapControl=value! =null? newWeakReference(value): null; this.OnMapChanged(oldMap,value); } } ///GetsvalueoftheattachableBaseZoomLevelproperty. ///TheBaseZoomLevelaffectFrameworkElements(exceptMapShapebasedones.) ///Itspecifyzoomlevelwhereframeworkelementintheinformationlayer ///haveScaleTransformwithscale=1.Ifthispropertyisset,then ///scaletransformationwillbeappliedtotheframeworkelementwhen ///wezoomin/outmapcontrol. /// /// publicstaticdoubleGetBaseZoomLevel(DependencyObjectelement) { return(double)element.GetValue(BaseZoomLevelProperty); } ///GetsvalueoftheattachableHotSpotproperty. /// /// publicstaticHotSpotGetHotSpot(DependencyObjectelement) { return(HotSpot)element.GetValue(HotSpotProperty); } ///GetsvalueoftheattachableGeographicalSizeproperty. /// /// publicstaticLocationGetGeographicalSize(DependencyObjectelement) { return(Location)element.GetValue(GeographicalSizeProperty); } ///GetsvalueoftheattachableLocationproperty. /// /// publicstaticLocationGetLocation(DependencyObjectelement) { return(Location)element.GetValue(LocationProperty); } ///GetsvalueoftheattachableMaxScaleproperty. ///TheMaxScaleaffectFrameworkElements(exceptMapShapebasedones.) ///Itspecifymaximumscalefactorwhichwillbeappliedtotheframeworkelementwhen ///ithasBaseZoomLevelpropertysetandwezoominmapcontrol. /// /// pub
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 空调 温度 控制 软件 源代码 资料
![提示](https://static.bdocx.com/images/bang_tan.gif)