1、1空调温度控制软件源代码资料/*/*软件首页 类/*/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.Im
2、aging;using System.Windows.Navigation;using System.Windows.Shapes;using System.IO;public partial class Software / Moves the specified old index. / The old index. / The new index. public void Move(int oldIndex, int newIndex) this.MoveItem(oldIndex, newIndex); / Adds the range. / The items. public voi
3、d AddRange(params T items) this.BeginUpdate(); for (int i = 0; i items.Length; i+) this.Add(itemsi); this.EndUpdate(); / Begins the update. public void BeginUpdate() this.update+; / Ends the update. public void EndUpdate() this.EndUpdate(true); internal virtual void EndUpdate(bool notify) update-; i
4、f (update 0; protected override void InsertItem(int index, T item) base.InsertItem(index, item); this.OnPropertyChanged(Count); this.OnPropertyChanged(Item); this.OnCollectionChanged(NotifyCollectionChangedAction.Add, item, index); protected override void SetItem(int index, T item) T oldItem = basei
5、ndex; base.SetItem(index, item); this.OnPropertyChanged(Item); this.OnCollectionChanged(NotifyCollectionChangedAction.Replace, oldItem, item, index); protected override void RemoveItem(int index) T item = baseindex; base.RemoveItem(index); this.OnPropertyChanged(Count); this.OnPropertyChanged(Item);
6、 this.OnCollectionChanged(NotifyCollectionChangedAction.Remove, item, index); protected override void ClearItems() base.ClearItems(); this.OnPropertyChanged(Count); this.OnPropertyChanged(Item); this.OnCollectionChanged(NotifyCollectionChangedAction.Reset); protected virtual void MoveItem(int oldInd
7、ex, int newIndex) T item = baseoldIndex; base.RemoveItem(oldIndex); base.InsertItem(newIndex, item); this.OnPropertyChanged(Item); this.OnCollectionChanged(NotifyCollectionChangedAction.Move, item, newIndex, oldIndex); #endregion #region INotifyCollectionChanged Members public event NotifyCollection
8、ChangedEventHandler CollectionChanged; protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args) if (this.CollectionChanged != null & update = 0) this.CollectionChanged(this, args); this.version+; private void OnCollectionChanged(NotifyCollectionChangedAction action) OnCollec
9、tionChanged(new NotifyCollectionChangedEventArgs(action); private void OnCollectionChanged(NotifyCollectionChangedAction action, object item, int index) OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, item, index); private void OnCollectionChanged(NotifyCollectionChangedAction actio
10、n, object oldItem, object item, int index) OnCollectionChanged(new NotifyCollectionChangedEventArgs(action, oldItem, item, index); #endregion #region INotifyPropertyChanged Members public event PropertyChangedEventHandler PropertyChanged; protected virtual void OnPropertyChanged(PropertyChangedEvent
11、Args e) if (this.PropertyChanged != null) this.PropertyChanged(this, e); protected void OnPropertyChanged(string propertyName) this.OnPropertyChanged(new PropertyChangedEventArgs(propertyName); #endregion /*/*校准设置 类/*/using System;using System.Collections.Generic;using System.Linq;using System.Text;
12、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.IO;public partial class Calibr
13、ation settings / Base class for all layers. public abstract class MapLayer : ItemsControl, ILayer / Identifies the BaseZoomLevel dependency property. public static readonly DependencyProperty BaseZoomLevelProperty = DependencyProperty.RegisterAttached( BaseZoomLevel, typeof(double), typeof(MapLayer)
14、, new PropertyMetadata(double.NaN, new PropertyChangedCallback(LocationChangedHandler); / Identifies the HotSpot dependency property. public static readonly DependencyProperty HotSpotProperty = DependencyProperty.RegisterAttached( HotSpot, typeof(HotSpot), typeof(MapLayer), new PropertyMetadata(null
15、, new PropertyChangedCallback(LocationChangedHandler); / Identifies the GeographicalSize dependency property. public static readonly DependencyProperty GeographicalSizeProperty = DependencyProperty.RegisterAttached( GeographicalSize, typeof(Location), typeof(MapLayer), new PropertyMetadata(Location.
16、Empty, new PropertyChangedCallback(GeographicalSizeChangedHandler); / Identifies the Location dependency property. public static readonly DependencyProperty LocationProperty = DependencyProperty.RegisterAttached( Location, typeof(Location), typeof(MapLayer), new PropertyMetadata(Location.Empty, new
17、PropertyChangedCallback(LocationChangedHandler); / Identifies the MaxScale dependency property. public static readonly DependencyProperty MaxScaleProperty = DependencyProperty.RegisterAttached( MaxScale, typeof(double), typeof(MapLayer), new PropertyMetadata(double.NaN, new PropertyChangedCallback(L
18、ocationChangedHandler); / Identifies the MinScale dependency property. public static readonly DependencyProperty MinScaleProperty = DependencyProperty.RegisterAttached( MinScale, typeof(double), typeof(MapLayer), new PropertyMetadata(double.NaN, new PropertyChangedCallback(LocationChangedHandler); /
19、 Identifies the ZoomRange dependency property. public static readonly DependencyProperty ZoomRangeProperty = DependencyProperty.RegisterAttached( ZoomRange, typeof(ZoomRange), typeof(MapLayer), new PropertyMetadata(ZoomRange.Empty, new PropertyChangedCallback(LocationChangedHandler); private WeakRef
20、erence mapControl = null; / Initializes a new instance of the MapLayer class. protected MapLayer() this.Loaded += new RoutedEventHandler(this.BaseLayer_Loaded); / Gets or sets map control this layer belongs to. public RadMap MapControl get if (this.mapControl != null & this.mapControl.IsAlive) retur
21、n this.mapControl.Target as RadMap; else return null; set RadMap oldMap = null; if (this.mapControl != null & this.mapControl.IsAlive) oldMap = this.mapControl.Target as RadMap; this.mapControl = value != null ? new WeakReference(value) : null; this.OnMapChanged(oldMap, value); / Gets value of the a
22、ttachable BaseZoomLevel property. / The BaseZoomLevel affect FrameworkElements (except MapShape based ones.) / It specify zoom level where framework element in the information layer / have ScaleTransform with scale = 1. If this property is set, then / scale transformation will be applied to the fram
23、ework element when / we zoom in/out map control. / Element to get value of the property from. / Value of the BaseZoomLevel property. public static double GetBaseZoomLevel(DependencyObject element) return (double)element.GetValue(BaseZoomLevelProperty); / Gets value of the attachable HotSpot property
24、. / Element to get value of the property from. / Value of the HotSpot property. public static HotSpot GetHotSpot(DependencyObject element) return (HotSpot)element.GetValue(HotSpotProperty); / Gets value of the attachable GeographicalSize property. / Element to get value of the property from. / Value
25、 of the GeographicalSize property. public static Location GetGeographicalSize(DependencyObject element) return (Location)element.GetValue(GeographicalSizeProperty); / Gets value of the attachable Location property. / Element to get value of the property from. / Value of the Location property. public
26、 static Location GetLocation(DependencyObject element) return (Location)element.GetValue(LocationProperty); / Gets value of the attachable MaxScale property. / The MaxScale affect FrameworkElements (except MapShape based ones.) / It specify maximum scale factor which will be applied to the framework element when / it has BaseZoomLevel property set and we zoom in map control. / Element to get value of the property from. / Value of the MaxScale property. pub
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1