1、 城市级物业运维管理系统 源代码 61 /****************************************************** //**系统登录 类 //******************************************************/ using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls;
2、 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 System login { /// Interface whic
3、h must be implemented by all
/// classes which produce ranges distribution.
public interface IRangeDistribution
{
/// Creates list of the ranges.
/// Minimal value.
/// Maximal value.
/// Number of the ranges.
///
5、/ 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;
6、 using System.Windows.Media.Imaging; using System.Windows.Navigation; using System.Windows.Shapes; using System.IO; public partial class Cell entry { /// public class RangeBaseAutomationPeer : FrameworkElementAutomationPeer, IRangeValueProvider { ///
7、 Initializes a new instance of the RangeBaseAutomationPeer class. /// public RangeBaseAutomationPeer(RangeBase owner) : base(owner) { } /// public bool IsReadOnly
8、 { get { return !this.IsEnabled(); } } /// public double LargeChange { get { return this.OwnerAsRangeBase().LargeChange; }
9、 } /// public double Maximum { get { return this.OwnerAsRangeBase().Maximum; } } /// public double Minimum { get
10、 { return this.OwnerAsRangeBase().Minimum; } } /// public double SmallChange { get { return this.OwnerAsRangeBase().SmallChange; } }
11、 /// public double Value { get { return this.GetValue(); } } /// /// void IRangeValueProvider.SetValue(double value
12、) { this.SetOwnerValue(value); } /// /// /// [MethodImpl(MethodImplOptions.NoInlining)] internal void RaiseMaximumPropertyChangedEvent(do
13、uble oldValue, double newValue) { this.RaisePropertyChangedEvent(RangeValuePatternIdentifiers.MaximumProperty, oldValue, newValue); } /// /// ///
14、[MethodImpl(MethodImplOptions.NoInlining)] internal void RaiseMinimumPropertyChangedEvent(double oldValue, double newValue) { this.RaisePropertyChangedEvent(RangeValuePatternIdentifiers.MinimumProperty, oldValue, newValue); } ///
15、 /// /// [MethodImpl(MethodImplOptions.NoInlining)] internal void RaiseValuePropertyChangedEvent(double oldValue, double newValue) { this.RaisePropertyChangedEvent(RangeValuePat
16、ternIdentifiers.ValueProperty, oldValue, newValue); } /// /// /// [MethodImpl(MethodImplOptions.NoInlining)] internal void RaiseSmallChangePropertyChangedEvent
17、double oldValue, double newValue) { this.RaisePropertyChangedEvent(RangeValuePatternIdentifiers.SmallChangeProperty, oldValue, newValue); } /// /// ///
18、 [MethodImpl(MethodImplOptions.NoInlining)] internal void RaiseLargeChangePropertyChangedEvent(double oldValue, double newValue) { this.RaisePropertyChangedEvent(RangeValuePatternIdentifiers.LargeChangeProperty, oldValue, newValue); }
19、 /// /// /// [MethodImpl(MethodImplOptions.NoInlining)] internal void RaiseIsReadOnlyPropertyChangedEvent(bool oldValue, bool newValue) { this.RaisePropertyChangedEve
20、nt(RangeValuePatternIdentifiers.IsReadOnlyProperty, oldValue, newValue); } internal virtual void SetOwnerValue(double value) { this.GuarantyEnabled(); RangeBase owner = this.OwnerAsRangeBase(); if ((value < owner.Minimum) || (value
21、> owner.Maximum)) { throw new ArgumentOutOfRangeException("value"); } owner.Value = value; } internal virtual double GetValue() { double result = this.OwnerAsRangeBase().Value; return resul
22、t; } /// internal void GuarantyEnabled() { if (!IsEnabled()) { throw new ElementNotEnabledException(); } } //// implement this method in descendat ////
23、 ///////
////
/////// 24、s>
private RangeBase OwnerAsRangeBase()
{
RangeBase owner = this.Owner as RangeBase;
if (null == owner)
{
throw new InvalidOperationException("The Owner have to be a RangeBase or a Descendant");
}
ret 25、urn owner;
}
}
}
}
/******************************************************
//**楼宇录入 类
//******************************************************/
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Wind 26、ows.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 Building entry
{
27、 /// Represents the common system parameters.
[SuppressMessage("Microsoft.Design", "CA1001:TypesThatOwnDisposableFieldsShouldBeDisposable")]
public class SystemParameters2 : INotifyPropertyChanged
{
private readonly Dictionary 28、
[ThreadStatic]
private static SystemParameters2 threadLocalSingleton;
private Rect captionButtonLocation;
private double captionHeight;
private Color glassColor;
private SolidColorBrush glassColorBrush;
private bool isGlassEnabled;
29、 private bool isHighContrast;
private MessageWindow messageHwnd;
private Size smallIconSize;
private string uoxThemeColor;
private string uoxThemeName;
private CornerRadius windowCornerRadius;
private Thickness windowNonClientFrameThickness;
30、
private Thickness windowResizeBorderThickness;
/// Prevents a default instance of the SystemParameters2 class from being created.
private SystemParameters2()
{
////This window gets used for calculations about standard caption but 31、ton locations
////so it has WS_OVERLAPPEDWINDOW as a style to give it normal caption buttons.
////This window may be shown during calculations of caption bar information, so create it at a location that's likely offscreen.
this.messageHwnd = new MessageWindow(( 32、CS)0, WS.OVERLAPPEDWINDOW | WS.DISABLED, (WS_EX)0, new Rect(-16000, -16000, 100, 100), string.Empty, this._WndProc);
this.messageHwnd.Dispatcher.ShutdownStarted += (sender, e) => Utility.SafeDispose(ref this.messageHwnd);
////Fixup the default values of the DPs.
33、 this._InitializeIsGlassEnabled();
this._InitializeGlassColor();
this._InitializeCaptionHeight();
this._InitializeWindowNonClientFrameThickness();
this._InitializeWindowResizeBorderThickness();
this._InitializeCaptionButtonLocation( 34、);
this._InitializeSmallIconSize();
this._InitializeHighContrast();
this._InitializeThemeInfo();
////WindowCornerRadius isn't exposed by true system parameters, so it requires the theme to be initialized first.
this._InitializeWindowCo 35、rnerRadius();
this.UpdateTable = new Dictionary 36、hContrast,
this._UpdateWindowCornerRadius,
this._UpdateCaptionButtonLocation,
}
},
{ WM.SETTINGCHANGE,
new List<_SystemMetricUpdate>
{
this._ 37、UpdateCaptionHeight,
this._UpdateWindowResizeBorderThickness,
this._UpdateSmallIconSize,
this._UpdateHighContrast,
this._UpdateWindowNonClientFrameThickness,
this._UpdateCaptionButtonLocation,
38、 }
},
{
WM.DWMNCRENDERINGCHANGED, new List<_SystemMetricUpdate> { this._UpdateIsGlassEnabled } },
{
WM.DWMCOMPOSITIONCHANGED, new List<_SystemMetricUpdate>
{
39、 this._UpdateIsGlassEnabled
}
},
{
WM.DWMCOLORIZATIONCOLORCHANGED, new List<_SystemMetricUpdate>
{
this._UpdateGlassColor
}
40、 },
};
}
private delegate void _SystemMetricUpdate(IntPtr param, IntPtr legParam);
/// Identifies the PropertyChanged event handler.
public event PropertyChangedEventHandler PropertyChanged;
/// Identif 41、ies the current instance.
public static SystemParameters2 Current
{
get
{
if (threadLocalSingleton == null)
{
threadLocalSingleton = new SystemParameters2();
}
42、 return threadLocalSingleton;
}
}
/// Identifies the HighContrast property.
public bool HighContrast
{
get
{
return this.isHighContrast;
}
private set
43、 {
if (value != this.isHighContrast)
{
this.isHighContrast = value;
this._NotifyPropertyChanged("HighContrast");
}
}
}
/// Identifies the IsGlassEnabled proper 44、ty.
public bool IsGlassEnabled
{
get
{
////return this.isGlassEnabled;
////It turns out there may be some lag between someone asking this
////and the window getting updated. It's not too expensi 45、ve, just always do the check.
return Telerik.Windows.Controls.RibbonBar.Shell.Standard.NativeMethodsHelper.NativeMethods.DwmIsCompositionEnabled();
}
private set
{
if (value != this.isGlassEnabled)
{
46、 this.isGlassEnabled = value;
this._NotifyPropertyChanged("IsGlassEnabled");
}
}
}
/// Identifies the SmallIconSize property.
public Size SmallIconSize
{
get
47、 {
return new Size(this.smallIconSize.Width, this.smallIconSize.Height);
}
private set
{
if (value != this.smallIconSize)
{
this.smallIconSize = value;
this._NotifyPr 48、opertyChanged("SmallIconSize");
}
}
}
/// Identifies the UxThemeColor property.
[SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "Ux")]
[SuppressMessage("Microsoft.Nami 49、ng", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Ux")]
public string UxThemeColor
{
get
{
return this.uoxThemeColor;
}
private set
{
if (value != this.uoxThemeColor)
50、 {
this.uoxThemeColor = value;
this._NotifyPropertyChanged("UxThemeColor");
}
}
}
/// Identifies the UxThemeName property.
[SuppressMessage("Microsoft.Naming", "CA17






