Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
W
weishida_DBbrower
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
潘栩锋
weishida_DBbrower
Commits
709fb067
Commit
709fb067
authored
Jul 27, 2020
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化 查找界面 机台号,工序号,可以输入 “空”
parent
f3f027e6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
3 deletions
+35
-3
PgSelect.xaml
WSDDBBrower/WSDDBBrower/PgSelect.xaml
+3
-3
PgSelect.xaml.cs
WSDDBBrower/WSDDBBrower/PgSelect.xaml.cs
+32
-0
No files found.
WSDDBBrower/WSDDBBrower/PgSelect.xaml
View file @
709fb067
...
...
@@ -11,7 +11,7 @@
d:DesignHeight="450" d:DesignWidth="800"
Title="PageSelect">
<Page.Resources>
<local:IntNullValueConverter x:Key="intNullConv"/>
</Page.Resources>
<Grid>
<Grid.RowDefinitions>
...
...
@@ -45,11 +45,11 @@
<StackPanel Orientation="Horizontal">
<StackPanel Orientation="Vertical" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TitleStyle}" Text="机台号"/>
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding MachineNo}"/>
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding MachineNo
, Converter={StaticResource intNullConv}
}"/>
</StackPanel>
<StackPanel Orientation="Vertical" Margin="{StaticResource ControlMargin}">
<TextBlock Style="{StaticResource TitleStyle}" Text="工序号"/>
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding StepNo}"/>
<TextBox Style="{StaticResource ValueStyle}" Text="{Binding StepNo
, Converter={StaticResource intNullConv}
}"/>
</StackPanel>
<controls:ToggleSwitch Header="只查找超出标准工艺"
Margin="{StaticResource ControlMargin}"
...
...
WSDDBBrower/WSDDBBrower/PgSelect.xaml.cs
View file @
709fb067
...
...
@@ -293,5 +293,37 @@ namespace WSDDBBrowser
}
}
public
class
IntNullValueConverter
:
IValueConverter
{
public
object
Convert
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
if
(
value
==
null
)
return
""
;
else
if
(
value
is
int
)
{
return
value
.
ToString
();
}
else
return
null
;
}
public
object
ConvertBack
(
object
value
,
Type
targetType
,
object
parameter
,
CultureInfo
culture
)
{
if
(
value
is
string
)
{
if
(
string
.
IsNullOrEmpty
((
string
)
value
))
{
return
null
;
}
else
if
(
int
.
TryParse
((
string
)
value
,
out
int
v
))
{
return
v
;
}
else
{
return
null
;
}
}
return
null
;
}
}
}
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