1空调温度控制软件源代码资料.docx

上传人:b****7 文档编号:26195243 上传时间:2023-06-17 格式:DOCX 页数:161 大小:45.01KB
下载 相关 举报
1空调温度控制软件源代码资料.docx_第1页
第1页 / 共161页
1空调温度控制软件源代码资料.docx_第2页
第2页 / 共161页
1空调温度控制软件源代码资料.docx_第3页
第3页 / 共161页
1空调温度控制软件源代码资料.docx_第4页
第4页 / 共161页
1空调温度控制软件源代码资料.docx_第5页
第5页 / 共161页
点击查看更多>>
下载资源
资源描述

1空调温度控制软件源代码资料.docx

《1空调温度控制软件源代码资料.docx》由会员分享,可在线阅读,更多相关《1空调温度控制软件源代码资料.docx(161页珍藏版)》请在冰豆网上搜索。

1空调温度控制软件源代码资料.docx

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.

///Theoldindex.

///Thenewindex.

publicvoidMove(intoldIndex,intnewIndex)

{

this.MoveItem(oldIndex,newIndex);

}

///Addstherange.

///Theitems.

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.

///Elementtogetvalueofthepropertyfrom.

///ValueoftheBaseZoomLevelproperty.

publicstaticdoubleGetBaseZoomLevel(DependencyObjectelement)

{

return(double)element.GetValue(BaseZoomLevelProperty);

}

///GetsvalueoftheattachableHotSpotproperty.

///Elementtogetvalueofthepropertyfrom.

///ValueoftheHotSpotproperty.

publicstaticHotSpotGetHotSpot(DependencyObjectelement)

{

return(HotSpot)element.GetValue(HotSpotProperty);

}

///GetsvalueoftheattachableGeographicalSizeproperty.

///Elementtogetvalueofthepropertyfrom.

///ValueoftheGeographicalSizeproperty.

publicstaticLocationGetGeographicalSize(DependencyObjectelement)

{

return(Location)element.GetValue(GeographicalSizeProperty);

}

///GetsvalueoftheattachableLocationproperty.

///Elementtogetvalueofthepropertyfrom.

///ValueoftheLocationproperty.

publicstaticLocationGetLocation(DependencyObjectelement)

{

return(Location)element.GetValue(LocationProperty);

}

///GetsvalueoftheattachableMaxScaleproperty.

///TheMaxScaleaffectFrameworkElements(exceptMapShapebasedones.)

///Itspecifymaximumscalefactorwhichwillbeappliedtotheframeworkelementwhen

///ithasBaseZoomLevelpropertysetandwezoominmapcontrol.

///Elementtogetvalueofthepropertyfrom.

///ValueoftheMaxScaleproperty.

pub

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 经管营销 > 经济市场

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1