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
4a26be49
Commit
4a26be49
authored
Nov 08, 2024
by
潘栩锋
🚴
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
复制 v8 的 GraphStyle.xaml, PropertyBinding.cs
parent
5aed4f07
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
358 additions
and
92 deletions
+358
-92
Converters.xaml
...ntrolLibrary/FLY.ControlLibrary/Converter/Converters.xaml
+28
-0
FLY.ControlLibrary.csproj
...ntrolLibrary/FLY.ControlLibrary/FLY.ControlLibrary.csproj
+4
-0
FLYAD7_OBJ_INTERFACE.cs
Project.FLY.FlyADBase/FlyADBase/FLYAD7_OBJ_INTERFACE.cs
+73
-31
FlyAD7.cs
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
+68
-27
PropertyBinding.cs
Project.FLY.Misc/MISC/PropertyBinding.cs
+154
-21
App.xaml
Project.FLY.Thick.Base/FLY.Thick.Base.UI/App.xaml
+6
-1
PgErrorAllTable.xaml
...Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorAllTable.xaml
+2
-5
GraphStyle.xaml
...t.FLY.Thick.Base/FLY.Thick.Base.UI/Themes/GraphStyle.xaml
+23
-7
No files found.
Project.FLY.ControlLibrary/FLY.ControlLibrary/Converter/Converters.xaml
0 → 100644
View file @
4a26be49
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:conv="clr-namespace:FLY.ControlLibrary.Converter"
>
<conv:PercentConverter x:Key="percentconv" />
<conv:VisibilityConverter x:Key="visbilityconv" />
<conv:TimeSpan2MinConverter x:Key="timespanconv"/>
<conv:TimeSpan2MinConverter x:Key="ts2minconv"/>
<conv:TimeSpan2msConverter x:Key="ts2msconv"/>
<conv:TimeSpan2SecConverter x:Key="ts2secconv"/>
<conv:TimeSpan2MinSecConverter x:Key="ts2minsecconv" />
<conv:Equals2VisibleConverter_Collapsed x:Key="e2visconv_collapsed" />
<conv:Equals2VisibleConverter x:Key="e2visconv" />
<conv:Equals2HiddenConverter x:Key="e2hiddenconv" />
<conv:Equals2CollapsedConverter x:Key="e2collapsedconv" />
<conv:Equals2BoolConverter x:Key="e2bconv"/>
<conv:BoolReverseConverter x:Key="brconv"/>
<conv:RatioConverter x:Key="ratioconv" />
<conv:RatioConverter_TimeSpan x:Key="ratioconv_ts" />
<conv:Item2IndexConverter x:Key="i2iConv"/>
<conv:Item2NoConverter x:Key="i2noConv"/>
</ResourceDictionary>
\ No newline at end of file
Project.FLY.ControlLibrary/FLY.ControlLibrary/FLY.ControlLibrary.csproj
View file @
4a26be49
...
...
@@ -145,6 +145,10 @@
<AppDesigner
Include=
"Properties\"
/>
</ItemGroup>
<ItemGroup>
<Page
Include=
"Converter\Converters.xaml"
>
<SubType>
Designer
</SubType>
<Generator>
MSBuild:Compile
</Generator>
</Page>
<Page
Include=
"Converter\Dictionary_MyConv.xaml"
>
<Generator>
MSBuild:Compile
</Generator>
<SubType>
Designer
</SubType>
...
...
Project.FLY.FlyADBase/FlyADBase/FLYAD7_OBJ_INTERFACE.cs
View file @
4a26be49
...
...
@@ -163,29 +163,26 @@ namespace FLYAD7_OBJ_INTERFACE
}
public
class
Pack_DriveState
:
IPack
{
//当前运行指令(1B)+当前运行状态(1B)+运行模式(1B)
+ systick(4B) + 命令序列码(4B)
//当前运行指令(1B)+当前运行状态(1B)+运行模式(1B)
public
DRIVE_MAN_ORDER
order
;
public
DRIVE_MAN_STATUS
status
;
public
byte
mode
;
public
int
systick
;
public
Int32
marker
;
#
region
IPack
成员
public
byte
[]
ToBytes
()
public
virtual
byte
[]
ToBytes
()
{
List
<
byte
>
buf
=
new
List
<
byte
>();
buf
.
Add
((
byte
)
order
);
buf
.
Add
((
byte
)
status
);
buf
.
Add
((
byte
)
mode
);
buf
.
AddRange
(
BitConverter
.
GetBytes
(
systick
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
marker
));
return
buf
.
ToArray
();
}
public
bool
TryParse
(
byte
[]
value
)
public
virtual
bool
TryParse
(
byte
[]
value
)
{
if
(
value
.
Count
()
<
(
1
+
1
+
1
+
4
+
4
))
if
(
value
.
Count
()
<
(
1
+
1
+
1
))
return
false
;
int
idx
=
0
;
order
=
(
DRIVE_MAN_ORDER
)
value
[
idx
];
...
...
@@ -194,6 +191,36 @@ namespace FLYAD7_OBJ_INTERFACE
idx
++;
mode
=
value
[
idx
];
idx
++;
return
true
;
}
#
endregion
}
public
class
Pack_DriveState_2
:
Pack_DriveState
{
//当前运行指令(1B)+当前运行状态(1B)+运行模式(1B)+ systick(4B) + 命令序列码(4B)
public
int
systick
;
public
Int32
marker
;
#
region
IPack
成员
public
override
byte
[]
ToBytes
()
{
List
<
byte
>
buf
=
new
List
<
byte
>();
buf
.
AddRange
(
base
.
ToBytes
());
buf
.
AddRange
(
BitConverter
.
GetBytes
(
systick
));
buf
.
AddRange
(
BitConverter
.
GetBytes
(
marker
));
return
buf
.
ToArray
();
}
public
override
bool
TryParse
(
byte
[]
value
)
{
if
(!
base
.
TryParse
(
value
))
return
false
;
int
idx
=
3
;
if
(
value
.
Count
()
<
(
1
+
1
+
1
+
4
+
4
))
return
false
;
systick
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
marker
=
BitConverter
.
ToInt32
(
value
,
idx
);
...
...
@@ -201,6 +228,21 @@ namespace FLYAD7_OBJ_INTERFACE
return
true
;
}
public
virtual
bool
TryParse_version
(
byte
[]
value
,
out
int
version
)
{
version
=
1
;
if
(!
base
.
TryParse
(
value
))
return
false
;
int
idx
=
3
;
if
(
value
.
Count
()
<
(
1
+
1
+
1
+
4
+
4
))
return
true
;
version
=
2
;
systick
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
marker
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
return
true
;
}
#
endregion
}
public
class
Pack_SyncStatus
:
IPack
...
...
@@ -221,7 +263,7 @@ namespace FLYAD7_OBJ_INTERFACE
if
(
value
.
Count
()
<
(
1
))
return
false
;
int
idx
=
0
;
status
=
(
SYNC_STATUS
)
value
[
idx
];
idx
++;
return
true
;
...
...
@@ -592,7 +634,7 @@ namespace FLYAD7_OBJ_INTERFACE
{
buf
.
Add
((
byte
)
'I'
);
}
else
else
{
buf
.
Add
((
byte
)
'N'
);
}
...
...
@@ -601,7 +643,7 @@ namespace FLYAD7_OBJ_INTERFACE
}
public
override
bool
TryParse
(
byte
[]
value
)
{
if
(
value
.
Count
()
<
(
2
+
4
+
1
))
if
(
value
.
Count
()
<
(
2
+
4
+
1
))
return
false
;
int
idx
=
0
;
idx
+=
2
;
...
...
@@ -1278,7 +1320,7 @@ namespace FLYAD7_OBJ_INTERFACE
#
endregion
#
region
Pack
public
class
Pack_PushPos1
public
class
Pack_PushPos1
{
public
int
pos1
;
public
int
speed1
;
...
...
@@ -1470,7 +1512,7 @@ namespace FLYAD7_OBJ_INTERFACE
/// </summary>
/// <param name="value"></param>
/// <returns></returns>
public
virtual
bool
TryParse
(
byte
[]
value
,
out
int
cnt
)
public
virtual
bool
TryParse
(
byte
[]
value
,
out
int
cnt
)
{
cnt
=
2
;
int
idx
=
0
;
...
...
@@ -1492,7 +1534,7 @@ namespace FLYAD7_OBJ_INTERFACE
}
return
true
;
}
}
}
public
class
Pack_PushStatus
...
...
@@ -1510,7 +1552,7 @@ namespace FLYAD7_OBJ_INTERFACE
List
<
byte
>
buf
=
new
List
<
byte
>();
buf
.
Add
((
byte
)
order
);
buf
.
Add
((
byte
)
status
);
return
buf
.
ToArray
();
}
/// <summary>
...
...
@@ -1530,7 +1572,7 @@ namespace FLYAD7_OBJ_INTERFACE
#
endregion
}
public
class
Pack_PushGrid
public
class
Pack_PushGrid
{
public
Misc
.
DIRECTION
direction
;
...
...
@@ -1568,7 +1610,7 @@ namespace FLYAD7_OBJ_INTERFACE
public
virtual
bool
TryParse
(
byte
[]
value
,
out
int
cnt
)
{
cnt
=
5
;
if
(
value
.
Length
<
cnt
)
return
false
;
int
idx
=
0
;
...
...
@@ -1636,7 +1678,7 @@ namespace FLYAD7_OBJ_INTERFACE
public
bool
TryParse_version
(
byte
[]
value
,
out
int
version
)
{
version
=
1
;
if
(!
base
.
TryParse
(
value
))
if
(!
base
.
TryParse
(
value
))
return
false
;
int
idx
=
8
;
int
cnt
=
8
+
4
;
...
...
@@ -1645,7 +1687,7 @@ namespace FLYAD7_OBJ_INTERFACE
version
=
2
;
systick
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
return
true
;
return
true
;
}
#
endregion
}
...
...
@@ -1690,7 +1732,7 @@ namespace FLYAD7_OBJ_INTERFACE
idx
+=
4
;
return
true
;
}
public
bool
TryParse_version
(
byte
[]
value
,
out
int
version
)
public
bool
TryParse_version
(
byte
[]
value
,
out
int
version
)
{
version
=
1
;
if
(!
base
.
TryParse
(
value
))
...
...
@@ -1710,7 +1752,7 @@ namespace FLYAD7_OBJ_INTERFACE
idx
+=
4
;
systick
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
return
true
;
return
true
;
}
#
endregion
}
...
...
@@ -1798,7 +1840,7 @@ namespace FLYAD7_OBJ_INTERFACE
/// <returns></returns>
public
override
bool
TryParse
(
byte
[]
value
,
out
int
cnt
)
{
if
(!
base
.
TryParse
(
value
,
out
cnt
))
if
(!
base
.
TryParse
(
value
,
out
cnt
))
return
false
;
int
idx
=
cnt
;
...
...
@@ -1864,7 +1906,7 @@ namespace FLYAD7_OBJ_INTERFACE
int
cnt
=
2
+
1
+
4
+
4
;
if
(
value
.
Length
<
cnt
)
return
false
;
mode
=
value
[
idx
];
idx
++;
systick
=
BitConverter
.
ToInt32
(
value
,
idx
);
...
...
@@ -1906,7 +1948,7 @@ namespace FLYAD7_OBJ_INTERFACE
public
byte
[]
ToBytes
()
{
List
<
byte
>
buf
=
new
List
<
byte
>();
buf
.
AddRange
(
base
.
ToBytes
());
...
...
@@ -1917,7 +1959,7 @@ namespace FLYAD7_OBJ_INTERFACE
return
buf
.
ToArray
();
}
public
override
bool
TryParse
(
byte
[]
value
)
public
override
bool
TryParse
(
byte
[]
value
)
{
int
cnt
;
return
TryParse
(
value
,
out
cnt
);
...
...
@@ -1925,23 +1967,23 @@ namespace FLYAD7_OBJ_INTERFACE
}
public
override
bool
TryParse
(
byte
[]
value
,
out
int
cnt
)
{
if
(!
base
.
TryParse
(
value
,
out
cnt
))
if
(!
base
.
TryParse
(
value
,
out
cnt
))
return
false
;
int
idx
=
cnt
;
cnt
+=
(
4
+
4
);
cnt
+=
(
4
+
4
);
if
(
value
.
Length
<
cnt
)
return
false
;
marker
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
idx
+=
4
;
systick
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
return
true
;
}
public
virtual
bool
TryParse_version
(
byte
[]
value
,
out
int
version
)
public
virtual
bool
TryParse_version
(
byte
[]
value
,
out
int
version
)
{
version
=
1
;
...
...
@@ -1954,7 +1996,7 @@ namespace FLYAD7_OBJ_INTERFACE
if
(
value
.
Length
<
cnt
)
return
true
;
version
=
2
;
marker
=
BitConverter
.
ToInt32
(
value
,
idx
);
...
...
@@ -1962,7 +2004,7 @@ namespace FLYAD7_OBJ_INTERFACE
systick
=
BitConverter
.
ToInt32
(
value
,
idx
);
idx
+=
4
;
return
true
;
return
true
;
}
#
endregion
...
...
Project.FLY.FlyADBase/FlyADBase/FlyAD7.cs
View file @
4a26be49
...
...
@@ -348,14 +348,17 @@ namespace FlyADBase
/// 用于检测当 为IsRunning时,脉冲是否停了很久。
/// </summary>
int
last_position
=
int
.
MinValue
;
/// <summary>
/// 脉冲不变化次数
/// </summary>
int
position_no_changed_cnt
=
0
;
TimeSpan
NoTGridTimeOut
=
TimeSpan
.
FromSeconds
(
60
);
Stopwatch
stopwatch_noTGrid
=
new
Stopwatch
();
IsReadyContext
isReadyContext
=
new
IsReadyContext
();
SysTickContext
sysTickContext
=
new
SysTickContext
();
...
...
@@ -366,7 +369,8 @@ namespace FlyADBase
string
jsonDbPath
;
DateTime
lastTimeGridTime
;
static
FlyAD7
()
{
static
FlyAD7
()
{
propertyName_save
=
FlyAD7JsonDb
.
GetMemberNames
();
}
/// <summary>
...
...
@@ -380,7 +384,7 @@ namespace FlyADBase
void
constructor
()
{
Now
=
DateTime
.
Now
;
sysTickContext
.
BeReseted
+=
()
=>
BeResetTime
=
DateTime
.
Now
;
//
sysTickContext.BeReseted += () => BeResetTime = DateTime.Now;
this
.
PropertyChanged
+=
new
PropertyChangedEventHandler
(
FlyAD7_PropertyChanged
);
...
...
@@ -456,17 +460,33 @@ namespace FlyADBase
()
=>
{
if
(!
IsConnected
)
{
position_no_changed_cnt
=
0
;
return
;
}
if
(
DriveStatus
!=
DRIVE_MAN_STATUS
.
RUNNING
)
{
position_no_changed_cnt
=
0
;
return
;
}
if
(
Position
!=
last_position
)
{
last_position
=
Position
;
position_no_changed_cnt
=
0
;
return
;
}
if
(
driveman_wait
.
CheckMark
(
TimeSpan
.
FromSeconds
(
3
)))
//每3秒检查一次
position_no_changed_cnt
++;
if
(
position_no_changed_cnt
>=
10
)
{
//连续10秒,脉冲一样
//异常
DriveStatus
=
DRIVE_MAN_STATUS
.
STOP_MANUAL
;
position_no_changed_cnt
=
0
;
return
;
}
if
(
driveman_wait
.
CheckMark
(
TimeSpan
.
FromSeconds
(
2
)))
//每2秒检查一次
{
driveman_wait
.
Mark
();
CurrObjSys
.
GetValueEx
(
...
...
@@ -593,7 +613,8 @@ namespace FlyADBase
ID
,
FLYAD7_OBJ_INTERFACE
.
SYS_DATA_INTERFACE
.
GET_ZERO_POS
);
}
else
{
else
{
//参数不保存在设备中, 保存在电脑。
//参数写入到设备。
NotifyPropertyChanged
(
nameof
(
MotorType
));
...
...
@@ -658,7 +679,7 @@ namespace FlyADBase
ID
,
FLYAD7_OBJ_INTERFACE
.
FLYIO_OBJ_INTERFACE
.
GET_IO
);
NotifyPropertyChanged
(
nameof
(
Pos1LCShift
));
//写入到AD盒
NotifyPropertyChanged
(
nameof
(
Pos2LCShift
));
//写入到AD盒
...
...
@@ -682,11 +703,12 @@ namespace FlyADBase
if
(
IsConnected
)
{
ConnectCnt
++;
BeResetTime
=
DateTime
.
Now
;
AfterConnected
();
}
else
{
isReadyContext
.
Reset
();
DriveOrder
=
DRIVE_MAN_ORDER
.
IDLE
;
DriveStatus
=
DRIVE_MAN_STATUS
.
STOP
;
}
...
...
@@ -777,14 +799,24 @@ namespace FlyADBase
break
;
case
FLYAD7_OBJ_INTERFACE
.
DRIVE_MAN_INTERFACE
.
GET_STATE
:
{
FLYAD7_OBJ_INTERFACE
.
DRIVE_MAN_INTERFACE
.
Pack_DriveState
p
=
new
FLYAD7_OBJ_INTERFACE
.
DRIVE_MAN_INTERFACE
.
Pack_DriveState
();
if
(!
p
.
TryParse
(
infodata
))
int
version
;
FLYAD7_OBJ_INTERFACE
.
DRIVE_MAN_INTERFACE
.
Pack_DriveState_2
pack
=
new
FLYAD7_OBJ_INTERFACE
.
DRIVE_MAN_INTERFACE
.
Pack_DriveState_2
();
if
(!
pack
.
TryParse_version
(
infodata
,
out
version
))
break
;
DriveOrder
=
p
.
order
;
DriveStatus
=
p
.
status
;
Marker
=
p
.
marker
;
advGetState
();
if
(
version
==
1
)
{
DriveOrder
=
pack
.
order
;
DriveStatus
=
pack
.
status
;
}
else
if
(
version
==
2
)
{
DriveOrder
=
pack
.
order
;
DriveStatus
=
pack
.
status
;
Marker
=
pack
.
marker
;
advGetState
();
}
isReadyContext
.
isReadyGetState
=
true
;
}
...
...
@@ -898,7 +930,7 @@ namespace FlyADBase
Position
=
pack
.
pos1
;
DateTime
dt
=
sysTickContext
.
ToDateTime
(
pack
.
systick
);
Now
=
dt
;
PositionChangedEvent
?.
Invoke
(
this
,
new
PositionChangedEventArgs
()
{
Time
=
dt
,
Position
=
Position
});
}
calSpeed
.
SetPos1
(
Now
,
Position
);
...
...
@@ -923,7 +955,7 @@ namespace FlyADBase
Position2
=
pack
.
pos2
;
DateTime
dt
=
sysTickContext
.
ToDateTime
(
pack
.
systick
);
Now
=
dt
;
Position2ChangedEvent
?.
Invoke
(
this
,
new
PositionChangedEventArgs
()
{
Time
=
dt
,
Position
=
Position
});
}
calSpeed
.
SetPos2
(
Now
,
Position2
);
...
...
@@ -1148,7 +1180,7 @@ namespace FlyADBase
}
break
;
}
_end_push_info
:
_end_push_info
:
bShieldSetValueEx
=
false
;
}
...
...
@@ -1173,7 +1205,7 @@ namespace FlyADBase
ID
,
FLYAD7_OBJ_INTERFACE
.
DRIVE_MAN_INTERFACE
.
CALL_PXX
,
new
FLYAD7_OBJ_INTERFACE
.
DRIVE_MAN_INTERFACE
.
Pack_CallRunto
()
{
to
=
TargetPos
}.
ToBytes
());
}
break
;
case
DRIVE_MAN_ORDER
.
ORIGIN
:
...
...
@@ -1246,9 +1278,9 @@ namespace FlyADBase
bool
ret
=
FlyAD7JsonDb
.
Load
(
jsonDbPath
,
this
);
bShieldSetValueEx
=
false
;
this
.
PropertyChanged
+=
FlyAD7_PropertyChanged2
;
return
ret
;
}
...
...
@@ -1444,7 +1476,7 @@ namespace FlyADBase
/// <param name="velocity"></param>
public
void
SetVelocity
(
UInt32
velocity
)
{
SetPosParam
(
velocity
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
);
SetPosParam
(
velocity
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
,
UInt32
.
MaxValue
);
}
/// <summary>
...
...
@@ -1467,7 +1499,7 @@ namespace FlyADBase
FLYAD7_OBJ_INTERFACE
.
SYS_DATA_INTERFACE
.
GET_SYSINFO
);
}
/// <summary>
/// 初始化系统信息区
/// </summary>
...
...
@@ -1779,12 +1811,12 @@ namespace FlyADBase
//备份参数
public
bool
IsDevParamValid
=
false
;
public
MOTORTYPE
MotorType
=
MOTORTYPE
.
SERVO
;
public
MOTORTYPE
MotorType
=
MOTORTYPE
.
SERVO
;
public
UInt16
PosOfGrid
=
10
;
public
UInt16
Ratio01
=
4
;
public
UInt16
Ratio02
=
1
;
public
Int16
PosOffset
=
0
;
public
UInt32
JogVelocity
=
1000
;
public
UInt32
JogVelocity
=
1000
;
/// <summary>
/// 硬件版本
...
...
@@ -1795,8 +1827,9 @@ namespace FlyADBase
public
int
HardwareVersion
=
2
;
public
static
string
[]
GetMemberNames
()
{
var
type
=
typeof
(
FlyAD7JsonDb
);
public
static
string
[]
GetMemberNames
()
{
var
type
=
typeof
(
FlyAD7JsonDb
);
return
type
.
GetMembers
().
Select
(
mi
=>
mi
.
Name
).
ToArray
();
}
...
...
@@ -1830,6 +1863,10 @@ namespace FlyADBase
if
(
dt_1st
==
DateTime
.
MinValue
)
{
dt_1st
=
DateTime
.
Now
;
//毫秒级别取整
long
tick
=
dt_1st
.
Ticks
%
TimeSpan
.
TicksPerMillisecond
;
dt_1st
-=
TimeSpan
.
FromTicks
(
tick
);
systick_1st
=
systick
;
return
dt_1st
;
}
...
...
@@ -1841,6 +1878,10 @@ namespace FlyADBase
//被复位了
BeReseted
?.
Invoke
();
dt_1st
=
DateTime
.
Now
;
//毫秒级别取整
long
tick
=
dt_1st
.
Ticks
%
TimeSpan
.
TicksPerMillisecond
;
dt_1st
-=
TimeSpan
.
FromTicks
(
tick
);
systick_1st
=
systick
;
return
dt_1st
;
}
...
...
Project.FLY.Misc/MISC/PropertyBinding.cs
View file @
4a26be49
This diff is collapsed.
Click to expand it.
Project.FLY.Thick.Base/FLY.Thick.Base.UI/App.xaml
View file @
4a26be49
...
...
@@ -5,11 +5,16 @@
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<!--MahApps Style-->
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Light.Blue.xaml" />
<!--项目Style-->
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Styles.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style TargetType="GroupBox" />
<Style TargetType="GroupBox"/>
<Style TargetType="Expander"/>
</ResourceDictionary>
</Application.Resources>
</Application>
Project.FLY.Thick.Base/FLY.Thick.Base.UI/PgError/PgErrorAllTable.xaml
View file @
4a26be49
...
...
@@ -12,10 +12,9 @@
<Page.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Themes/Dictionary_MyStyle.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.Thick.Base.UI;component/Converter/Dictionary_MyConv.xaml"/>
<ResourceDictionary Source="pack://application:,,,/FLY.ControlLibrary;component/Converter/Converters.xaml"/>
</ResourceDictionary.MergedDictionaries>
<local:PgErrorAllTableVmUt x:Key="viewModel"/>
<local:PgErrorAllTableVmUt x:Key="viewModel"
/>
</ResourceDictionary>
</Page.Resources>
<Grid d:DataContext="{StaticResource viewModel}">
...
...
@@ -93,7 +92,6 @@
<Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Icon.Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsNewest}" Value="True">
<Setter Property="Foreground" Value="Gray"/>
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
...
...
@@ -108,7 +106,6 @@
<Style TargetType="Button" BasedOn="{StaticResource Styles.Button.Icon.Rectangle}">
<Style.Triggers>
<DataTrigger Binding="{Binding IsNewest}" Value="True">
<Setter Property="Foreground" Value="Gray"/>
<Setter Property="IsEnabled" Value="False"/>
</DataTrigger>
</Style.Triggers>
...
...
Project.FLY.Thick.Base/FLY.Thick.Base.UI/Themes/GraphStyle.xaml
View file @
4a26be49
...
...
@@ -2,25 +2,32 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf">
<!--颜色-->
<SolidColorBrush x:Key="TextBrush" Color="#4C4949" />
<SolidColorBrush x:Key="GrayBrush1" Color="#FF727272"/>
<SolidColorBrush x:Key="GrayBrush2" Color="#FF858484" />
<!--在图表中描述字符串的透明背景-->
<SolidColorBrush x:Key="TextTransparentBackgroundBrush" Color="#99FFFFFF"/>
<SolidColorBrush x:Key="SemiTransparentGreyBrush2" Color="#99FFFFFF"/>
<SolidColorBrush x:Key="SemiTransparentGreyBrush" Color="#99F0F0F0"/>
<SolidColorBrush x:Key="SemiTransparentActiveBrush" Color="#50008BE5"/>
<SolidColorBrush x:Key="WhiteBrush" Color="White"/>
<!--尺寸-->
<sys:Double x:Key="FontSize.Title">1
6
</sys:Double>
<sys:Double x:Key="FontSize.Value">
20
</sys:Double>
<sys:Double x:Key="FontSize.Title">1
5
</sys:Double>
<sys:Double x:Key="FontSize.Value">
15
</sys:Double>
<sys:Double x:Key="FontSize.Unit">15</sys:Double>
<Thickness x:Key="TextMargin">5,0</Thickness>
<Thickness x:Key="TextMargin">2.5 0</Thickness>
<sys:Double x:Key="GraphInfoRowMaxHeight">19</sys:Double>
<sys:Double x:Key="GraphInfo2RowMaxHeight">38</sys:Double>
<!--字体-->
<Style x:Key="TitleStyle" TargetType="TextBlock">
<Setter Property="Padding" Value="5,2"/>
<Setter Property="Width" Value="50"/>
<Setter Property="Foreground" Value="{StaticResource GrayBrush1}"/>
<Setter Property="FontSize" Value="{StaticResource FontSize.Title}"/>
...
...
@@ -29,7 +36,7 @@
<Style x:Key="ValueStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource TextBrush}"/>
<Setter Property="FontSize" Value="{StaticResource FontSize.Value}"/>
<Setter Property="Padding" Value="
{StaticResource TextMargin}
"/>
<Setter Property="Padding" Value="
5,2
"/>
</Style>
<Style x:Key="UnitStyle" TargetType="TextBlock">
<Setter Property="Foreground" Value="{StaticResource GrayBrush2}"/>
...
...
@@ -38,6 +45,7 @@
</Style>
<!--Axis.Section-->
<!--图表中选择器-->
<Style x:Key="Styles.Axis.Section.Selected" TargetType="lvc:AxisSection" >
<Setter Property="StrokeThickness" Value="1"/>
<Setter Property="DataLabel" Value="False"/>
...
...
@@ -47,8 +55,16 @@
<Setter Property="Stroke" Value="#FFCA000C"/>
<Setter Property="Fill" Value="#59CA000C"/>
<!--<Setter Property="Stroke" Value="#FFFDC8C8"/>-->
<!--<Setter Property="Fill" Value="#59F7D8D8"/>-->
</Style>
<!--图表中放大用选择器-->
<Style x:Key="Styles.Axis.Section.Selected.ZoomIn" TargetType="lvc:AxisSection" >
<Setter Property="StrokeThickness" Value="1"/>
<Setter Property="DataLabel" Value="True"/>
<Setter Property="DisableAnimations" Value="True"/>
<Setter Property="DataLabelForeground" Value="White"/>
<Setter Property="Opacity" Value="0.5"/>
<Setter Property="Stroke" Value="{StaticResource MahApps.Brushes.Accent}"/>
</Style>
<!--扫描图,纵向趋势图Y轴 标签-->
...
...
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