底部工具栏
底部工具栏Border Grid.Row1BorderBrushWhiteBorderThickness0 0.5 0 0DockPanelLastChildFillTrueStackPanelMargin10 0 0 0HorizontalAlignmentCenterVerticalAlignmentCenterTextBlockRunText耗时:/RunText{Binding ModuleParam.ElapsedTime}/RunTextms//TextBlockTextBlockRunText状态:/RunText{Binding ModuleParam.Status,Converter{StaticResource StatusConverter}}//TextBlock/StackPanelStackPanelOrientationHorizontalHorizontalAlignmentRightButtonx:NamebtnExecuteContent执行HorizontalAlignmentRightMargin10 0Command{Binding ExecuteCommand}/Buttonx:NamebtnCancelContent取消HorizontalAlignmentRightMargin10 0ClickbtnCancel_Click/Buttonx:NamebtnConfirmContent确认HorizontalAlignmentRightMargin10 0Command{Binding ConfirmCommand}Background#FFFF2000BorderBrush#FFFF2000//StackPanel/DockPanel/Border/// summary/// 取消按钮/// /summary/// param namesender/param/// param namee/paramprivatevoidbtnCancel_Click(objectsender,RoutedEventArgse){this.Close();}确认按钮关闭窗口[NonSerialized]privateCommandBase_ConfirmCommand;publicCommandBaseConfirmCommand{get{if(_ConfirmCommandnull){_ConfirmCommandnewCommandBase((obj){varviewthis.ModuleViewasShowImageView;if(view!null){view.Close();}});}return_ConfirmCommand;}}执行[NonSerialized]privateCommandBase_ExecuteCommand;publicCommandBaseExecuteCommand{get{if(_ExecuteCommandnull){_ExecuteCommandnewCommandBase((obj){ExeModule();});}return_ExecuteCommand;}}publicoverrideboolExeModule(){Stopwatch.Restart();try{if(nImageIndexnull||ImageParam.Count0){ChangeModuleRunStatus(eRunStatus.NG);returnfalse;}boolbImagefalse;intnIndexConvert.ToInt32(GetLinkValue(nImageIndex));for(inti0;iImageParam.Count;i){if(nIndexImageParam[i].IndexImageParam[i].InputImage.Text!){GetDispImage(ImageParam[i].InputImage.Text,true);bImagetrue;}}if(DispImagenull||!DispImage.IsInitialized()||bImagefalse){ChangeModuleRunStatus(eRunStatus.NG);returnfalse;}ShowHRoi();ChangeModuleRunStatus(eRunStatus.OK);returntrue;}catch(Exceptionex){ChangeModuleRunStatus(eRunStatus.NG);Logger.GetExceptionMsg(ex);returnfalse;}}