Browse Source

修改bug

user_lt 1 năm trước cách đây
mục cha
commit
c38c47434b

+ 14 - 14
BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/BaseConfigViewModel.cs

@@ -76,22 +76,22 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
         /// <param name="obj"></param>
         private void Query(object obj)
         {
-            if((!string.IsNullOrEmpty(StartTime))&&(!string.IsNullOrEmpty(EndTime)))
-            {
-                if (Convert.ToDateTime(StartTime) > Convert.ToDateTime( EndTime))
+         
+            
+                if (StartTime > EndTime)
                 {
                     MessageBox.Show("起始时间大于结束时间,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
                     return;
                 }
-                if (Convert.ToDateTime(StartTime).AddDays(2) < Convert.ToDateTime(EndTime))
-                {
-                    MessageBox.Show("起始时间和结束时间间隔不能大于2天,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
-                    return;
-                }
-            }
+                //if (Convert.ToDateTime(StartTime).AddDays(2) < Convert.ToDateTime(EndTime))
+                //{
+                //    MessageBox.Show("起始时间和结束时间间隔不能大于2天,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
+                //    return;
+                //}
+            
            
             conditionConfig = (from a in allConfigList
-                                      where (EndTime == string.Empty ? true : (a.CreateTime < Convert.ToDateTime(EndTime)) && (Convert.ToDateTime(StartTime) < a.CreateTime))
+                                      where (EndTime == DateTime.MinValue ? true : (a.CreateTime < Convert.ToDateTime(EndTime)) && (Convert.ToDateTime(StartTime) < a.CreateTime))
                                        && (string.IsNullOrEmpty(ScheduleName) ? true : (a.SchemeName == ScheduleName))
                                         && (string.IsNullOrEmpty(TestName) ? true : (a.ItemName == TestName))
                                          && (string.IsNullOrEmpty(DeviceName) ? true : (a.DeviceName == DeviceName))
@@ -376,14 +376,14 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
             set { selectTest = value; RaisePropertyChanged(); }
         }
 
-        private string startTime=string.Empty;
-        public string StartTime
+        private DateTime startTime = DateTime.Now;
+        public DateTime StartTime
         {
             get { return startTime; }
             set { startTime = value; RaisePropertyChanged(); }
         }
-        private string endTime=string.Empty;
-        public string EndTime
+        private DateTime endTime =DateTime.Now;
+        public DateTime EndTime
         {
             get { return endTime; }
             set { endTime = value; RaisePropertyChanged(); }

+ 1 - 0
BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/CopySchViewModel.cs

@@ -83,6 +83,7 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
                     schDtlDto.update_time = DateTime.Now;
                     schDtlDto.update_by = Appsession.UserName;
                     bool isAddSucc = _basicPlcTestSchemeDtlService.Add(schDtlDto);
+                    _logger.LogInformation($"复制方案成功。方案名{ScheduleName}");
 
                 }
             }

+ 5 - 1
BlankApp1/BlankApp1/ViewModels/BasicConfigViewModel/PLCConfigViewModel.cs

@@ -1,5 +1,6 @@
 using AutoMapper;
 using BizService;
+using Microsoft.Extensions.Logging;
 using MiniExcelLibs;
 using Model.Dto;
 using Model.Entities;
@@ -23,13 +24,15 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
         private readonly IBasicPlcItemConfigService _iBasPlcItemConfigService;
         private readonly IMapper _mapper;
         private readonly IDialogService _dialog;
+        private readonly ILogger _logger;
         private List<BasPlcItemConfigDto> allPLCConfigList = new List<BasPlcItemConfigDto>();//所有方案
         private List<BasPlcItemConfigDto> conditionConfig = new List<BasPlcItemConfigDto>();//符合条件的方案
-        public PLCConfigViewModel(IBasicPlcItemConfigService iBasPlcItemConfigService, IMapper mapper,IDialogService dialog)
+        public PLCConfigViewModel(IBasicPlcItemConfigService iBasPlcItemConfigService, IMapper mapper,IDialogService dialog, ILogger logger)
         {
             _iBasPlcItemConfigService = iBasPlcItemConfigService;
             _mapper = mapper;
             _dialog = dialog;
+            _logger = logger;
             QueryCommand = new DelegateCommand<object>(Query);
             AddCommand= new DelegateCommand<object>(Add);
             ExportCommand = new DelegateCommand<string>(Export);
@@ -127,6 +130,7 @@ namespace PLCTool.ViewModels.BasicConfigViewModel
                         {
                             //重新读取PLC
                             GetPLCConfig();
+                            _logger.LogInformation($"添加PLC变量成功。变量名{PLCItem},地址{PLCAddr}");
                             MessageBox.Show("添加PLC变量成功", "确认", MessageBoxButton.OK, MessageBoxImage.Information);
                         }
                     }

+ 4 - 2
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/AutoTestViewModel.cs

@@ -431,6 +431,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         /// <param name="obj"></param>
         private  void Start()
         {
+          
             CancellationToken cancellationToken = tokensource.Token;
             StartEnalbe = false;
             Task.Run(async() =>  //模拟耗时任务
@@ -439,6 +440,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                 var basicSchDtls = _basicPlcTestSchemeDtlService.FindAllBySchId(schId)?.OrderBy(x => x.scheme_dtl_id);
                 foreach (var item in basicSchDtls)
                 {
+                   
                     if (cancellationToken.IsCancellationRequested)
                     {
                         return;
@@ -463,9 +465,9 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
                             GetDetailInfo(id);
                         }));
                     }
-
+                    _logger.LogInformation($"开始自动测试。方案名{ScheduleName},测试项{TestName}");
                     await ExecTest();
-                   
+                    _logger.LogInformation($"自动测试完成。方案名{ScheduleName},测试项{TestName}");
                     //最后一项必须要测试
                     if (globalSchDetailId == basicSchDtls.Max(x => x.scheme_dtl_id))
                     {

+ 10 - 2
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/ManualTestViewModel.cs

@@ -472,7 +472,8 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         /// <param name="obj"></param>
         private async  void Start(object obj)
         {
-            
+            StartEnalbe = false;
+            _logger.LogInformation($"开始手动测试。方案名{ScheduleName},测试项{TestName}");
             //开始时间
             startTime = DateTime.Now;
             //增加测试记录主表
@@ -498,7 +499,8 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             {
                 return;
             }
-
+            _logger.LogInformation($"手动测试完成。方案名{ScheduleName},测试项{TestName}");
+            StartEnalbe = true;
         }
         /// <summary>
         /// 更新测试结果
@@ -1259,6 +1261,12 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             get { return proVisibility; }
             set { proVisibility = value; RaisePropertyChanged(); }
         }
+        private bool startEnalbe = true;
+        public bool StartEnalbe
+        {
+            get { return startEnalbe; }
+            set { startEnalbe = value; RaisePropertyChanged(); }
+        }
         #endregion
 
     }

+ 9 - 16
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/QueryViewModel.cs

@@ -97,22 +97,14 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
 
         private void Query(object obj)
         {
-            if ((!string.IsNullOrEmpty(StartTime)) && (!string.IsNullOrEmpty(EndTime)))
+            if (StartTime > EndTime)
             {
-                if (Convert.ToDateTime(StartTime) > Convert.ToDateTime(EndTime))
-                {
-                    MessageBox.Show("起始时间大于结束时间,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
-                    return;
-                }
-                if (Convert.ToDateTime(StartTime).AddDays(2) < Convert.ToDateTime(EndTime))
-                {
-                    MessageBox.Show("起始时间和结束时间间隔不能大于2天,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
-                    return;
-                }
+                MessageBox.Show("起始时间大于结束时间,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
+                return;
             }
 
             conditionConfig = (from a in allConfigList
-                               where (EndTime == string.Empty ? true : (a.CreateTime < Convert.ToDateTime(EndTime)) && (Convert.ToDateTime(StartTime) < a.CreateTime))
+                               where (EndTime == DateTime.MinValue ? true : (a.CreateTime < Convert.ToDateTime(EndTime)) && (Convert.ToDateTime(StartTime) < a.CreateTime))
                                 && (string.IsNullOrEmpty(ScheduleName) ? true : (a.SchemeName == ScheduleName))
                                  && (string.IsNullOrEmpty(TestName) ? true : (a.ItemName == TestName))
                                   && (string.IsNullOrEmpty(DeviceName) ? true : (a.DeviceName == DeviceName))
@@ -351,19 +343,20 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             set { selectTest = value; RaisePropertyChanged(); }
         }
 
-        private string startTime = string.Empty;
-        public string StartTime
+        private DateTime startTime = DateTime.Now;
+        public DateTime StartTime
         {
             get { return startTime; }
             set { startTime = value; RaisePropertyChanged(); }
         }
-        private string endTime = string.Empty;
-        public string EndTime
+        private DateTime endTime = DateTime.Now;
+        public DateTime EndTime
         {
             get { return endTime; }
             set { endTime = value; RaisePropertyChanged(); }
         }
 
+
         /// <summary>
         /// 总条数
         /// </summary>

+ 12 - 16
BlankApp1/BlankApp1/ViewModels/BusinessManageViewModel/TestOperViewModel.cs

@@ -123,22 +123,17 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
         /// <param name="obj"></param>
         private void Query(object obj)
         {
-            if ((!string.IsNullOrEmpty(StartTime)) && (!string.IsNullOrEmpty(EndTime)))
+
+            if (StartTime > EndTime)
             {
-                if (Convert.ToDateTime(StartTime) > Convert.ToDateTime(EndTime))
-                {
-                    MessageBox.Show("起始时间大于结束时间,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
-                    return;
-                }
-                if (Convert.ToDateTime(StartTime).AddDays(2) < Convert.ToDateTime(EndTime))
-                {
-                    MessageBox.Show("起始时间和结束时间间隔不能大于2天,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
-                    return;
-                }
+                MessageBox.Show("起始时间大于结束时间,请重新输入", "确认", MessageBoxButton.OK, MessageBoxImage.Warning);
+                return;
             }
 
+
+
             conditionConfig = (from a in allConfigList
-                               where (EndTime == string.Empty ? true : (a.CreateTime < Convert.ToDateTime(EndTime)) && (Convert.ToDateTime(StartTime) < a.CreateTime))
+                               where (EndTime == DateTime.MinValue ? true : (a.CreateTime < Convert.ToDateTime(EndTime)) && (Convert.ToDateTime(StartTime) < a.CreateTime))
                                 && (string.IsNullOrEmpty(ScheduleName) ? true : (a.SchemeName == ScheduleName))
                                  && (string.IsNullOrEmpty(TestName) ? true : (a.ItemName == TestName))
                                   && (string.IsNullOrEmpty(DeviceName) ? true : (a.DeviceName == DeviceName))
@@ -195,6 +190,7 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             {
 
                 _basicPlcTestSchemeDtlService.Delete(id);
+
                 //更新表格,重新获取
                 GetContent();
             }
@@ -389,14 +385,14 @@ namespace PLCTool.ViewModels.BusinessManageViewModel
             set { selectTest = value; RaisePropertyChanged(); }
         }
 
-        private string startTime = string.Empty;
-        public string StartTime
+        private DateTime startTime = DateTime.Now;
+        public DateTime StartTime
         {
             get { return startTime; }
             set { startTime = value; RaisePropertyChanged(); }
         }
-        private string endTime = string.Empty;
-        public string EndTime
+        private DateTime endTime = DateTime.Now;
+        public DateTime EndTime
         {
             get { return endTime; }
             set { endTime = value; RaisePropertyChanged(); }

+ 5 - 4
BlankApp1/BlankApp1/ViewModels/MainWindowViewModel.cs

@@ -80,10 +80,11 @@ namespace BlankApp1.ViewModels
         /// </summary>
         public void Configure()
         {
-           
-                //默认进入简报页面
-                _regionManager.Regions["MenuRegion"].RequestNavigate("TreeMenuView");
-                _regionManager.Regions["ContentRegion"].RequestNavigate("StatisticsView");
+
+            //默认进入简报页面
+            _regionManager.Regions["ContentRegion"].RequestNavigate("LogView");
+            _regionManager.Regions["MenuRegion"].RequestNavigate("TreeMenuView");
+            _regionManager.Regions["ContentRegion"].RequestNavigate("StatisticsView");
          
         
            

+ 8 - 2
BlankApp1/BlankApp1/ViewModels/MonitorManageViewModel/PLCWriteViewModel.cs

@@ -1,5 +1,6 @@
 using AutoMapper;
 using BizService;
+using Microsoft.Extensions.Logging;
 using Model.Dto;
 using Model.Entities;
 using PLCTool.Common;
@@ -18,14 +19,15 @@ namespace PLCTool.ViewModels.MonitorManageViewModel
     public  class PLCWriteViewModel:BindableBase
     {
         private readonly IBasicPlcItemConfigService _iBasPlcItemConfigService;
-
+        private readonly ILogger _logger;
         private readonly IMapper _mapper;
         private List<BasPlcItemConfigDto> plcConfigs = new List<BasPlcItemConfigDto>();
-        public PLCWriteViewModel(IBasicPlcItemConfigService iBasPlcItemConfigService, IMapper mapper)
+        public PLCWriteViewModel(IBasicPlcItemConfigService iBasPlcItemConfigService, IMapper mapper,ILogger logger)
         {
 
             _iBasPlcItemConfigService = iBasPlcItemConfigService;
             _mapper = mapper;
+            _logger= logger;
             WriteCommand = new DelegateCommand<object>(WriteToPlc);
             GetPLCConfig();
         }
@@ -59,6 +61,7 @@ namespace PLCTool.ViewModels.MonitorManageViewModel
                         bool isResult = PLCCom.GetInstance().WritePlcObject(plcAddr, VarType.Bit, plcValue);
                         if(isResult)
                         {
+                            _logger.LogInformation($"向PLC写入值。plc地址{plcAddr},数据值{plcValue}");
                             MessageBox.Show("写入成功!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
                         }
                         break;
@@ -66,6 +69,7 @@ namespace PLCTool.ViewModels.MonitorManageViewModel
                         bool isResult2 = PLCCom.GetInstance().WritePlcObject(plcAddr, VarType.Word, plcValue);
                         if (isResult2)
                         {
+                            _logger.LogInformation($"向PLC写入值。plc地址{plcAddr},数据值{plcValue}");
                             MessageBox.Show("写入成功!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
                         }
                         break;
@@ -73,6 +77,7 @@ namespace PLCTool.ViewModels.MonitorManageViewModel
                         bool isResult3 = PLCCom.GetInstance().WritePlcObject(plcAddr, VarType.DWord, plcValue);
                         if (isResult3)
                         {
+                            _logger.LogInformation($"向PLC写入值。plc地址{plcAddr},数据值{plcValue}");
                             MessageBox.Show("写入成功!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
                         }
                         break;
@@ -81,6 +86,7 @@ namespace PLCTool.ViewModels.MonitorManageViewModel
                         bool isResult4 = PLCCom.GetInstance().WritePlcObject(plcAddr, VarType.Real, plcValue);
                         if (isResult4)
                         {
+                            _logger.LogInformation($"向PLC写入值。plc地址{plcAddr},数据值{plcValue}");
                             MessageBox.Show("写入成功!", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
                         }
                         break;

+ 4 - 4
BlankApp1/BlankApp1/Views/BasicConfigView/BaseConfigView.xaml

@@ -45,11 +45,11 @@
             <StackPanel Grid.Column="0" Orientation="Horizontal">
                 <StackPanel Orientation="Horizontal">
                     <TextBlock Text="创建时间:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
-                    <myContr:MyDateTimePicker  ></myContr:MyDateTimePicker>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding StartTime}"/>
                 </StackPanel>
                 <StackPanel Orientation="Horizontal">
                     <TextBlock Text="至:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
-                    <myContr:MyDateTimePicker ></myContr:MyDateTimePicker>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding EndTime}"/>
                 </StackPanel>
             </StackPanel>
             <StackPanel Grid.Column="1" Orientation="Horizontal">
@@ -77,14 +77,14 @@
                             <DataTemplate>
                                 <StackPanel Orientation="Horizontal">
                                     <Button  Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
-                                        Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchemeId}" Cursor="Hand" Margin="0,0,20,0" >
+                                        Command="{Binding DataContext.EditCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchemeId}" Cursor="Hand" Margin="0,0,10,0" >
 
                                         <StackPanel Orientation="Horizontal">
                                             <TextBlock  Text="编辑" VerticalAlignment="Center" Foreground="Blue"/>
                                         </StackPanel>
                                     </Button>
                                     <Button  Width="auto" Background="Transparent" HorizontalContentAlignment ="Left" Foreground="Black" Height="25" BorderThickness="0"
-                                        Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchemeId}" Cursor="Hand" Margin="0,0,20,0">
+                                        Command="{Binding DataContext.DeleteCommand, RelativeSource={RelativeSource Mode=FindAncestor,AncestorType=DataGrid}}" CommandParameter="{Binding SchemeId}" Cursor="Hand" Margin="0,0,10,0">
 
                                         <StackPanel Orientation="Horizontal">
                                             <TextBlock  Text="删除" VerticalAlignment="Center" Foreground="Blue"/>

+ 1 - 1
BlankApp1/BlankApp1/Views/BusinessManageView/ManualTestView.xaml

@@ -271,7 +271,7 @@
             </hc:StepBar>
         </Grid>
         <UniformGrid  Grid.Row="5" Columns="4">
-            <Button  Content="开始检测" Width="80"    Command="{Binding StartCommand}" Style="{StaticResource NormalButtonStyle}" />
+            <Button  Content="开始检测" Width="80" IsEnabled="{Binding StartEnalbe}" Height="30" FontSize="12"   Command="{Binding StartCommand}" Style="{DynamicResource WD.PrimaryButton}" />
             <Button  Content="上一步" Width="80"    Command="{Binding PreviousCommand}" Style="{StaticResource NormalButtonStyle}" />
             <Button  Content="下一步" Width="80"    Command="{Binding NextCommand}" Style="{StaticResource NormalButtonStyle}" />
             <Button  Content="完成" Width="80"    Command="{Binding DoneCommand}" Style="{StaticResource NormalButtonStyle}" />

+ 3 - 3
BlankApp1/BlankApp1/Views/BusinessManageView/QueryView.xaml

@@ -51,11 +51,11 @@
             <StackPanel Grid.Column="0" Orientation="Horizontal">
                 <StackPanel Orientation="Horizontal">
                     <TextBlock Text="创建时间:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
-                    <myContr:MyDateTimePicker  ></myContr:MyDateTimePicker>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding StartTime}"/>
                 </StackPanel>
                 <StackPanel Orientation="Horizontal">
                     <TextBlock Text="至:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
-                    <myContr:MyDateTimePicker ></myContr:MyDateTimePicker>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding EndTime}"/>
                 </StackPanel>
             </StackPanel>
             <StackPanel Grid.Column="1" Orientation="Horizontal">
@@ -74,7 +74,7 @@
                 <DataGridTextColumn Header="设备名称" Binding="{Binding DeviceName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                 <DataGridTextColumn Header="测试项类型" Binding="{Binding ItemType}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                 <DataGridTextColumn Header="测试项名称" Binding="{Binding ItemName}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
-                <DataGridTextColumn Header="测试时间" Binding="{Binding StartTestTime,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
+                <DataGridTextColumn Header="测试时间" Binding="{Binding StartTestTime,StringFormat={}{0:yyyy-MM-dd HH:mm:ss}}" Width="150" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                 <DataGridTextColumn Header="测试结果" Binding="{Binding TestResult}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                 <DataGridTextColumn Header="状态" Binding="{Binding TestStatus}" CellStyle="{StaticResource MyDataGridCellStyle}"/>
                 <DataGridTextColumn Header="创建者" Binding="{Binding CreateBy}" CellStyle="{StaticResource MyDataGridCellStyle}"/>

+ 2 - 2
BlankApp1/BlankApp1/Views/BusinessManageView/TestOperView.xaml

@@ -51,11 +51,11 @@
             <StackPanel Grid.Column="0" Orientation="Horizontal">
                 <StackPanel Orientation="Horizontal">
                     <TextBlock Text="创建时间:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
-                    <myContr:MyDateTimePicker  ></myContr:MyDateTimePicker>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding StartTime}"/>
                 </StackPanel>
                 <StackPanel Orientation="Horizontal">
                     <TextBlock Text="至:"  Style="{StaticResource NormalTextBlockStyle}" Margin="10,0,5,0"/>
-                    <myContr:MyDateTimePicker ></myContr:MyDateTimePicker>
+                    <hc:DateTimePicker ShowClearButton="True" Style="{StaticResource DateTimePickerExtend}" Height="25" Width="160" SelectedDateTime="{Binding EndTime}"/>
                 </StackPanel>
             </StackPanel>
             <StackPanel Grid.Column="1" Orientation="Horizontal">

+ 1 - 1
BlankApp1/BlankApp1/Views/MainWindow.xaml

@@ -149,7 +149,7 @@
                         </EllipseGeometry>
                     </Path.Data>
                 </Path>
-
+                <TextBlock Text="V1.0" Style="{StaticResource txtHeadStyle}" Width="60" Margin="30,0,12,0"/>
             </StackPanel>
           
         </Border>