2空调电流保护软件源代码概述.docx

上传人:b****1 文档编号:3131483 上传时间:2023-05-05 格式:DOCX 页数:180 大小:47.06KB
下载 相关 举报
2空调电流保护软件源代码概述.docx_第1页
第1页 / 共180页
2空调电流保护软件源代码概述.docx_第2页
第2页 / 共180页
2空调电流保护软件源代码概述.docx_第3页
第3页 / 共180页
2空调电流保护软件源代码概述.docx_第4页
第4页 / 共180页
2空调电流保护软件源代码概述.docx_第5页
第5页 / 共180页
2空调电流保护软件源代码概述.docx_第6页
第6页 / 共180页
2空调电流保护软件源代码概述.docx_第7页
第7页 / 共180页
2空调电流保护软件源代码概述.docx_第8页
第8页 / 共180页
2空调电流保护软件源代码概述.docx_第9页
第9页 / 共180页
2空调电流保护软件源代码概述.docx_第10页
第10页 / 共180页
2空调电流保护软件源代码概述.docx_第11页
第11页 / 共180页
2空调电流保护软件源代码概述.docx_第12页
第12页 / 共180页
2空调电流保护软件源代码概述.docx_第13页
第13页 / 共180页
2空调电流保护软件源代码概述.docx_第14页
第14页 / 共180页
2空调电流保护软件源代码概述.docx_第15页
第15页 / 共180页
2空调电流保护软件源代码概述.docx_第16页
第16页 / 共180页
2空调电流保护软件源代码概述.docx_第17页
第17页 / 共180页
2空调电流保护软件源代码概述.docx_第18页
第18页 / 共180页
2空调电流保护软件源代码概述.docx_第19页
第19页 / 共180页
2空调电流保护软件源代码概述.docx_第20页
第20页 / 共180页
亲,该文档总共180页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

2空调电流保护软件源代码概述.docx

《2空调电流保护软件源代码概述.docx》由会员分享,可在线阅读,更多相关《2空调电流保护软件源代码概述.docx(180页珍藏版)》请在冰点文库上搜索。

2空调电流保护软件源代码概述.docx

2空调电流保护软件源代码概述

/******************************************************

//**软件登录类

//******************************************************/

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;

publicpartialclassSoftwarelogin{

///ScaleBreaksExample

publicpartialclassForm1:

ExamplesForm

{

publicForm1()

{

InitializeComponent();

radChart1.Series.Clear();

ChartSeriescs=newChartSeries();

cs.Items.Add(newChartSeriesItem(5));

cs.Items.Add(newChartSeriesItem(50));

cs.Items.Add(newChartSeriesItem(500));

cs.Items.Add(newChartSeriesItem(5000));

radChart1.PlotArea.YAxis.ScaleBreaks.Enabled=true;

radChart1.PlotArea.YAxis.ScaleBreaks.MaxCount=2;

radChart1.Series.Add(cs);

radChart1.Update();

this.EnabledQSFButtons=QSFButtons.None;

}

}

}

}

/******************************************************

//**操作员身份确认类

//******************************************************/

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;

publicpartialclassOperatoridentityconfirmation{

///Staticclasswithmethodstohelpwithvalidation.

internalstaticclassValidationUtil

{

////#ifSILVERLIGHT

////

///////AddsanewValidationResulttothecollectionifanequivalentdoesnotexist.

////

///////ValidationResultstosearchthrough

///////ValidationResulttoadd

////publicstaticvoidAddIfNew(thisICollectioncollection,ValidationResultvalue)

////{

////if(!

collection.ContainsEqualValidationResult(value))

////{

////collection.Add(value);

////}

////}

////#endif

///Performsanactionandcatchesanynon-criticalexceptions.

///Actiontoperform.

publicstaticvoidCatchNonCriticalExceptions(Actionaction)

{

try

{

action();

}

catch(Exceptionexception)

{

if(IsCriticalException(exception))

{

throw;

}

//Catchanynon-criticalexceptions.

}

}

///CreatesanewBindingthatisashallowcopyofthesourceBinding.

///TheBindingtoclone.

///TheclonedBinding.

publicstaticBindingCloneBinding(Bindingsource)

{

Bindingclone=newBinding();

if(source==null)

{

returnclone;

}

clone.BindsDirectlyToSource=source.BindsDirectlyToSource;

clone.Converter=source.Converter;

clone.ConverterCulture=source.ConverterCulture;

clone.ConverterParameter=source.ConverterParameter;

clone.FallbackValue=source.FallbackValue;

clone.Mode=source.Mode;

clone.NotifyOnValidationError=source.NotifyOnValidationError;

clone.Path=source.Path;

clone.StringFormat=source.StringFormat;

clone.TargetNullValue=source.TargetNullValue;

clone.UpdateSourceTrigger=source.UpdateSourceTrigger;

clone.ValidatesOnExceptions=source.ValidatesOnExceptions;

clone.ValidatesOnDataErrors=source.ValidatesOnDataErrors;

#ifSILVERLIGHT

clone.ValidatesOnNotifyDataErrors=source.ValidatesOnNotifyDataErrors;

#endif

//Bindingkeepstrackofwhichofthethreesettersfor

//ElementName,RelativeSource,andSourcehavebeencalled.

//Callinganytwoofthesetters,evenifthevaluepassedinisnull,

//willraiseanexception.Forthatreason,wemustcheckfornull

//forthesepropertiestoensurethatweonlycallthesetterwhenweshould.

if(source.ElementName!

=null)

{

clone.ElementName=source.ElementName;

}

elseif(source.RelativeSource!

=null)

{

clone.RelativeSource=source.RelativeSource;

}

elseif(source.Source!

=null)

{

clone.Source=source.Source;

}

returnclone;

}

////#ifSILVERLIGHT

////

///////DetermineswhetherthecollectioncontainsanequivalentValidationResult

////

///////ValidationResultstosearchthrough

///////ValidationResulttosearchfor

///////

////publicstaticboolContainsEqualValidationResult(thisICollectioncollection,ValidationResulttarget)

////{

////return(collection.FindEqualValidationResult(target)!

=null);

////}

////

///////SearchesaValidationResultforthespecifiedtargetmembername.Ifthetargetisnull

///////orempty,thismethodwillreturntrueiftherearenomembernamesatall.

////

///////ValidationResulttosearch.

///////Membernametosearchfor.

///////Trueiffound.

////publicstaticboolContainsMemberName(thisValidationResultvalidationResult,stringtarget)

////{

////intmemberNameCount=0;

////foreach(stringmemberNameinvalidationResult.MemberNames)

////{

////if(string.Equals(target,memberName))

////{

////returntrue;

////}

////memberNameCount++;

////}

////return(memberNameCount==0&&string.IsNullOrEmpty(target));

////}

////

///////FindsanequivalentValidationResultifoneexists.

////

///////ValidationResultstosearchthrough.

///////ValidationResulttofind.

///////EqualValidationResultiffound,nullotherwise.

////publicstaticValidationResultFindEqualValidationResult(thisICollectioncollection,ValidationResulttarget)

////{

////foreach(ValidationResultoldValidationResultincollection)

////{

////if(oldValidationResult.ErrorMessage==target.ErrorMessage)

////{

////boolmovedOld=true;

////boolmovedTarget=true;

////IEnumeratoroldEnumerator=oldValidationResult.MemberNames.GetEnumerator();

////IEnumeratortargetEnumerator=target.MemberNames.GetEnumerator();

////while(movedOld&&movedTarget)

////{

////movedOld=oldEnumerator.MoveNext();

////movedTarget=targetEnumerator.MoveNext();

////if(!

movedOld&&!

movedTarget)

////{

////returnoldValidationResult;

////}

////if(movedOld!

=movedTarget||oldEnumerator.Current!

=targetEnumerator.Current)

////{

////break;

////}

////}

////}

////}

////returnnull;

////}

////#endif

///SearchesthroughallBindingsonthespecifiedelementandreturnsalistofBindingInfoobjects

///foreachBindingthatmatchesthespecifiedcriteria.

///FrameworkElementtosearch.

///OnlyreturnBindingswithacontextelementequaltothisobject.

///Iftrue,onlyreturnsTwoWayBindings.

///Iftrue,ignoreselementsnottypicallyusedforinput.

///Iftrue,onlyreturnsTwoWayBindings.

///TheBindingsearchwillskipalloftheseTypes.

///ListofBindingInfoforeveryBindingfound.

publicstaticListGetBindingInfo(thisFrameworkElementelement,objectdataItem,booltwoWayOnly,booluseBlockList,boolsearchChildren,paramsType[]excludedTypes)

{

ListbindingData=newList();

if(!

searchChildren)

{

if(excludedTypes!

=null)

{

foreach(TypeexcludedTypeinexcludedTypes)

{

if(excludedType!

=null&&excludedType.IsInstanceOfType(element))

{

returnbindingData;

}

}

}

returnelement.GetBindingInfoOfSingleElement(element.DataContext?

?

dataItem,dataItem,twoWayOnly,useBlockList);

}

Stackchildren=newStack();

StackdataContexts=newStack();

children.Push(element);

dataContexts.Push(element.DataContext?

?

dataItem);

while(children.Count!

=0)

{

boolsearchChild=true;

DependencyObjectchild=children.Pop();

objectinheritedDataContext=dataContexts.Pop();

objectdataContext=inheritedDataContext;

//SkipthisparticularchildelementifitisoneoftheexcludedTypes

if(excludedTypes!

=null)

{

foreach(TypeexcludedTypeinexcludedTypes)

{

if(excludedType!

=null&&excludedType.IsInstanceOfType(child))

{

searchChild=false;

break;

}

}

}

//Addthebindingsofthechildelementandpushitschildrenontothestackofremainingelementstosearch

if(searchChild)

{

FrameworkElementchildElement=childasFrameworkElement;

if(childElement!

=null)

{

dataContext=childElement.DataContext?

?

inheritedDataContext;

bindingData.AddRange(childElement.GetBindingInfoOfSingleElement(inheritedDataContext,dataItem,twoWayOnly,useBlockList));

}

intchildrenCount=VisualTreeHelper.GetChildrenCount(child);

for(intchildIndex=0;childIndex

{

children.Push(VisualTreeHelper.GetChild(child,childIndex));

dataContexts.Push(dataContext);

}

}

}

returnbindingData;

}

///Getsalistofthespecifie

展开阅读全文
相关搜索
资源标签

当前位置:首页 > 医药卫生 > 基础医学

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2