Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
T
Thick-Common
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
潘栩锋
Thick-Common
Commits
7b1d8f8b
Commit
7b1d8f8b
authored
Oct 24, 2019
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.修复 AD盒 设置授权码界面
2.修复 显示 IO信息 界面
parent
ed3cf0e5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
53 deletions
+72
-53
PgErrorTable.xaml.cs
...Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorTable.xaml.cs
+1
-1
WdFlyADAccess.xaml
...Y.Thick.Base/FLY.Thick.Base.UI/PgError/WdFlyADAccess.xaml
+6
-6
WdFlyADAccess.xaml.cs
...hick.Base/FLY.Thick.Base.UI/PgError/WdFlyADAccess.xaml.cs
+65
-46
No files found.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorTable.xaml.cs
View file @
7b1d8f8b
...
...
@@ -75,7 +75,7 @@ namespace ThickTcpUiInWindow
private
void
button_iotip_click
(
object
sender
,
RoutedEventArgs
e
)
{
Window
w
;
if
(
wdIoTipType
=
=
null
&&
wdIoTipType
.
IsAssignableFrom
(
typeof
(
Window
)))
if
(
wdIoTipType
!
=
null
&&
wdIoTipType
.
IsAssignableFrom
(
typeof
(
Window
)))
{
w
=
Activator
.
CreateInstance
(
wdIoTipType
)
as
Window
;
}
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/WdFlyADAccess.xaml
View file @
7b1d8f8b
...
...
@@ -6,7 +6,7 @@
xmlns:local="clr-namespace:ThickTcpUiInWindow"
Title="Window_graphfix" mc:Ignorable="d" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
SizeToContent="WidthAndHeight">
SizeToContent="WidthAndHeight"
d:DataContext="{d:DesignInstance local:WdFlyADAccessVm}"
>
<Window.Resources>
<ResourceDictionary>
<local:BytesConverter x:Key="bytesconv"/>
...
...
@@ -20,22 +20,22 @@
<Grid TextBlock.FontSize="24" TextBlock.FontStyle="Normal" >
<StackPanel Orientation="Vertical" Margin="5,20">
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource
ResourceKey=
TextBlockStyle_FieldHeader}" Text="{DynamicResource strSequenceCode}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeader}" Text="{DynamicResource strSequenceCode}" />
<StackPanel Orientation="Horizontal">
<TextBlock Style="{StaticResource
ResourceKey=TextBlockStyle_FieldContent}" Text="{Binding Code, Converter={StaticResource ResourceKey=
bytesconv}}" Tag="Full" MinWidth="400" />
<TextBlock Style="{StaticResource
TextBlockStyle_FieldContent}" Text="{Binding Code, Converter={StaticResource
bytesconv}}" Tag="Full" MinWidth="400" />
</StackPanel>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="5">
<TextBlock Style="{StaticResource
ResourceKey=
TextBlockStyle_FieldHeaderEditable}" Text="{DynamicResource strAuthorizationCode}" />
<TextBlock Style="{StaticResource TextBlockStyle_FieldHeaderEditable}" Text="{DynamicResource strAuthorizationCode}" />
<StackPanel Orientation="Horizontal">
<TextBox Style="{StaticResource
ResourceKey=TextBoxStyle_FieldContent}" Text="{Binding Access, Converter={StaticResource ResourceKey=
bytesconv}}" Tag="Full"/>
<TextBox Style="{StaticResource
TextBoxStyle_FieldContent}" Text="{Binding Access, Converter={StaticResource
bytesconv}}" Tag="Full"/>
</StackPanel>
</StackPanel>
<Button Style="{StaticResource ButtonStyle2}" Content="{DynamicResource strApply}" Margin="5" Width="auto" C
lick="button_apply_Click
" />
<Button Style="{StaticResource ButtonStyle2}" Content="{DynamicResource strApply}" Margin="5" Width="auto" C
ommand="{Binding ApplyCmd}
" />
</StackPanel>
</Grid>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/WdFlyADAccess.xaml.cs
View file @
7b1d8f8b
...
...
@@ -19,16 +19,48 @@ using FLY.Thick.Base.Common;
using
FLY.Thick.Base.Client
;
using
FLY.Thick.Base.IService
;
using
FObjBase
;
using
GalaSoft.MvvmLight.Command
;
namespace
ThickTcpUiInWindow
{
/// <summary>
/// W
indow_
FlyADAccess.xaml 的交互逻辑
/// W
d
FlyADAccess.xaml 的交互逻辑
/// </summary>
public
partial
class
WdFlyADAccess
:
FLY
.
ControlLibrary
.
WindowBigClose
,
INotifyPropertyChanged
public
partial
class
WdFlyADAccess
:
FLY
.
ControlLibrary
.
WindowBigClose
{
WdFlyADAccessVm
viewModel
;
/// <summary>
///
/// </summary>
public
WdFlyADAccess
()
{
InitializeComponent
();
viewModel
=
new
WdFlyADAccessVm
();
this
.
DataContext
=
viewModel
;
}
/// <summary>
///
/// </summary>
/// <param name="flyADService"></param>
public
void
Init
(
FlyADServiceClient
flyADService
)
{
viewModel
.
Init
(
flyADService
);
}
}
/// <summary>
/// WdFlyADAccess 的 ViewModel
/// </summary>
public
class
WdFlyADAccessVm
:
INotifyPropertyChanged
{
FlyADServiceClient
mFlyADService
=
null
;
public
event
PropertyChangedEventHandler
PropertyChanged
;
/// <summary>
/// 使用码
/// </summary>
...
...
@@ -41,30 +73,47 @@ namespace ThickTcpUiInWindow
[
PropertyChanged
.
DoNotCheckEquality
]
public
byte
[]
Code
{
get
;
set
;
}
=
new
byte
[
7
];
public
RelayCommand
ApplyCmd
{
get
;
private
set
;
}
public
WdFlyADAccessVm
()
{
ApplyCmd
=
new
RelayCommand
(
Apply
);
}
/// <summary>
///
/// </summary>
public
WdFlyADAccess
()
/// <param name="flyADService"></param>
public
void
Init
(
FlyADServiceClient
flyADService
)
{
InitializeComponent
();
}
mFlyADService
=
flyADService
;
mFlyADService
.
GetAccessInfo
(
new
AsyncCBHandler
(
delegate
(
object
AsyncState
,
object
retData
)
{
AccessInfo
a
=
(
AccessInfo
)
retData
;
Access
=
a
.
access
;
Code
=
a
.
code
;
}),
null
);
}
private
void
button_apply_Click
(
object
sender
,
RoutedEventArgs
e
)
void
Apply
(
)
{
if
((
Access
==
null
)
||
(
Access
.
Length
!=
8
))
{
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"错误"
,
"长度不对,需要 8位 byte!!"
,
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"错误"
,
"长度不对,需要 8位 byte!!"
,
TimeSpan
.
FromSeconds
(
2
));
return
;
}
if
(
mFlyADService
==
null
)
return
;
mFlyADService
.
SetAccess
(
Access
,
new
AsyncCBHandler
(
delegate
(
object
AsyncState
,
object
retData
)
delegate
(
object
AsyncState
,
object
retData
)
{
AccessInfo
a
=
(
AccessInfo
)
retData
;
Access
=
a
.
access
;
...
...
@@ -75,55 +124,25 @@ namespace ThickTcpUiInWindow
{
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"成功"
,
"设置成功!!"
,
TimeSpan
.
FromSeconds
(
2
));
}
break
;
}
break
;
case
AREA_ERR
.
DUP_ACCESS
:
{
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"错误"
,
"授权码重复!!"
,
TimeSpan
.
FromSeconds
(
2
));
}
break
;
}
break
;
case
AREA_ERR
.
ERR_ACCESS
:
{
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"错误"
,
"授权码不正确!!"
,
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"错误"
,
"授权码不正确!!"
,
TimeSpan
.
FromSeconds
(
2
));
}
break
;
}
break
;
}
}),
null
);
FLY
.
ControlLibrary
.
Window_Tip
.
Show
(
"通知"
,
"请等待。。。。。。"
,
TimeSpan
.
FromSeconds
(
2
));
}
/// <summary>
///
/// </summary>
/// <param name="flyADService"></param>
public
void
Init
(
FlyADServiceClient
flyADService
)
{
mFlyADService
=
flyADService
;
}
private
void
Window_Loaded
(
object
sender
,
RoutedEventArgs
e
)
{
this
.
DataContext
=
this
;
mFlyADService
.
GetAccessInfo
(
new
AsyncCBHandler
(
delegate
(
object
AsyncState
,
object
retData
)
{
AccessInfo
a
=
(
AccessInfo
)
retData
;
Access
=
a
.
access
;
Code
=
a
.
code
;
}),
null
);
}
#
region
INotifyPropertyChanged
成员
/// <summary>
///
/// </summary>
public
event
PropertyChangedEventHandler
PropertyChanged
;
#
endregion
}
/// <summary>
///
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment