Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
VIZ.Package
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘龙飞
VIZ.Package
Commits
6ee12cfa
Commit
6ee12cfa
authored
Mar 22, 2023
by
wangonghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
时钟控件功能开发
parent
0b0adb28
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
241 additions
and
2 deletions
+241
-2
VIZ.Package.Domain/ApplicationDomainEx.cs
+5
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanel.xaml
+114
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanel.xaml.cs
+31
-0
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanelModel.cs
+0
-0
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModelBase.cs
+7
-0
VIZ.Package.Module/Login/ViewModel/LoginViewModel.cs
+6
-0
VIZ.Package.Module/VIZ.Package.Module.csproj
+8
-0
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
+27
-1
VIZ.Package.Storage/Entity/ControlObject/ClockFieldEntity.cs
+28
-0
VIZ.Package.Storage/Enum/VizControlFieldType.cs
+7
-1
VIZ.Package.Storage/LocalDbContext.cs
+7
-0
VIZ.Package.Storage/VIZ.Package.Storage.csproj
+1
-0
No files found.
VIZ.Package.Domain/ApplicationDomainEx.cs
View file @
6ee12cfa
...
@@ -168,5 +168,10 @@ namespace VIZ.Package.Domain
...
@@ -168,5 +168,10 @@ namespace VIZ.Package.Domain
/// 该值不会入库,仅在内存中保留
/// 该值不会入库,仅在内存中保留
/// </remarks>
/// </remarks>
public
static
List
<
TransitionLogicSceneInfoModel
>
SceneInfoListWithTransitionLogic
{
get
;
private
set
;
}
=
new
List
<
TransitionLogicSceneInfoModel
>();
public
static
List
<
TransitionLogicSceneInfoModel
>
SceneInfoListWithTransitionLogic
{
get
;
private
set
;
}
=
new
List
<
TransitionLogicSceneInfoModel
>();
/// <summary>
/// 时钟控件保存信息
/// </summary>
public
static
ClockFieldEntity
ClockField
{
get
;
set
;
}
}
}
}
}
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanel.xaml
0 → 100644
View file @
6ee12cfa
<UserControl x:Class="VIZ.Package.Module.ClockEditPanel"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="650">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="500"/>
<ColumnDefinition Width="150"/>
</Grid.ColumnDefinitions>
<StackPanel Height="300">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="150"/>
<RowDefinition Height="80"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="50" />
<RowDefinition Height="50"/>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
<ColumnDefinition/>
</Grid.ColumnDefinitions>
<dxe:DateEdit x:Name="TimePickerUP" Mask="T" MaskUseAsDisplayFormat="True" Grid.Row="0" Grid.Column="1" Height="30" ShowEditorButtons="False" Text="{Binding UpTime,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<dxe:DateEdit.StyleSettings>
<dxe:DateEditTimePickerStyleSettings/>
</dxe:DateEdit.StyleSettings>
</dxe:DateEdit>
<TextBlock Text="HH:MM:SS" Grid.Row="0" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="13"/>
<RadioButton Grid.Row="0" Grid.Column="3" HorizontalAlignment="Center" VerticalAlignment="Center" Content="正计时" IsChecked="{Binding RadioUP}" Width="60" FontSize="13" />
<CheckBox Grid.Column="0" Grid.Row="1" Content="停止于" Height="40" IsChecked="{Binding StopIsCheck}" FontSize="13" HorizontalAlignment="Center" VerticalAlignment="Center"/>
<dxe:DateEdit x:Name="TimePickerDown" Mask="T" MaskUseAsDisplayFormat="True" Grid.Row="1" Grid.Column="1" Height="30"
ShowEditorButtons="False" Text="{Binding DownTime,Mode=TwoWay}" Visibility="{Binding IsStopVisibility,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}">
<dxe:DateEdit.StyleSettings>
<dxe:DateEditTimePickerStyleSettings/>
</dxe:DateEdit.StyleSettings>
</dxe:DateEdit>
<TextBlock Text="HH:MM:SS" Grid.Row="1" Grid.Column="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="13" Visibility="{Binding IsStopVisibility,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}"/>
<RadioButton Grid.Row="1" Grid.Column="4" HorizontalAlignment="Center" VerticalAlignment="Center" Content="倒计时" Width="60" IsChecked="{Binding RadioDown}" FontSize="13" />
</Grid>
</StackPanel>
<GroupBox Grid.Row="1" Header="Live Control" Height="80" HorizontalAlignment="Center" FontSize="13">
<Grid >
<Grid.ColumnDefinitions>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="80"/>
<ColumnDefinition Width="90"/>
</Grid.ColumnDefinitions>
<Button Content="START" Height="40" Width="75" Grid.Column="0" Command="{Binding StartCommand}"/>
<Button Content="STOP" Height="40" Width="75" Grid.Column="1" Command="{Binding StopCommand}"/>
<Button Content="CONT" Height="40" Width="75" Grid.Column="2" Command="{Binding ContCommand}"/>
<Button Content="FREEZE" Height="40" Width="70" Grid.Column="3" Command="{Binding FreezeCommand}"/>
<Button Content="UNFREEZE" Height="40" Grid.Column="4" Command="{Binding UnFreezeCommand}"/>
</Grid>
</GroupBox>
</Grid>
</StackPanel>
<GroupBox Header="Action" Grid.Column="1" FontSize="13">
<Grid>
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<RadioButton Content="无" Grid.Row="0" IsChecked="{Binding RadioNone}" />
<RadioButton Content="设置及开始" Grid.Row="1" IsChecked="{Binding RadioSetStart}"/>
<RadioButton Content="设置及停止" Grid.Row="2" IsChecked="{Binding RadioSetStop}"/>
<RadioButton Content="停止" Grid.Row="3" IsChecked="{Binding RadioStop}"/>
<RadioButton Content="继续" Grid.Row="4" IsChecked="{Binding RadioContinue}"/>
<RadioButton Content="冻结" Grid.Row="5" IsChecked="{Binding RadioFreeze}"/>
<RadioButton Content="解冻" Grid.Row="6" IsChecked="{Binding RadioUnFreeze}" />
</Grid>
</GroupBox>
</Grid>
</UserControl>
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanel.xaml.cs
0 → 100644
View file @
6ee12cfa
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Windows
;
using
System.Windows.Controls
;
using
System.Windows.Data
;
using
System.Windows.Documents
;
using
System.Windows.Input
;
using
System.Windows.Media
;
using
System.Windows.Media.Imaging
;
using
System.Windows.Navigation
;
using
System.Windows.Shapes
;
using
VIZ.Framework.Core
;
namespace
VIZ.Package.Module
{
/// <summary>
/// Interaction logic for ClockEditPanel.xaml
/// </summary>
public
partial
class
ClockEditPanel
:
UserControl
{
public
ClockEditPanel
()
{
InitializeComponent
();
//WPF的绑定
WPFHelper
.
BindingViewModel
(
this
,
new
ClockEditPanelModel
());
}
}
}
VIZ.Package.Module/ControlObject/FieldEdit/Edit/Clock/ClockEditPanelModel.cs
0 → 100644
View file @
6ee12cfa
This diff is collapsed.
Click to expand it.
VIZ.Package.Module/ControlObject/FieldEdit/ViewModel/FieldEditViewModelBase.cs
View file @
6ee12cfa
...
@@ -134,6 +134,13 @@ namespace VIZ.Package.Module
...
@@ -134,6 +134,13 @@ namespace VIZ.Package.Module
ViewType
=
typeof
(
CustomVideoEditPanel
),
ViewType
=
typeof
(
CustomVideoEditPanel
),
ViewCreated
=
this
.
OnViewCreated
ViewCreated
=
this
.
OnViewCreated
});
});
//时钟类型
this
.
navigationConfigs
.
Add
(
new
NavigationConfig
{
Key
=
VizControlFieldType
.
clock
.
ToString
(),
ViewType
=
typeof
(
ClockEditPanel
),
ViewCreated
=
this
.
OnViewCreated
})
;
}
}
// =============================================================
// =============================================================
...
...
VIZ.Package.Module/Login/ViewModel/LoginViewModel.cs
View file @
6ee12cfa
...
@@ -298,6 +298,12 @@ namespace VIZ.Package.Module
...
@@ -298,6 +298,12 @@ namespace VIZ.Package.Module
mediaConfig
=
mediaConfig
??
new
MediaConfigEntity
();
mediaConfig
=
mediaConfig
??
new
MediaConfigEntity
();
ApplicationDomainEx
.
MediaConfig
=
mediaConfig
;
ApplicationDomainEx
.
MediaConfig
=
mediaConfig
;
//时钟控件加载读取
ClockFieldEntity
clockFieldEntity
=
ApplicationDomainEx
.
LocalDbContext
.
ClockField
.
FindAll
().
FirstOrDefault
();
clockFieldEntity
=
clockFieldEntity
??
new
ClockFieldEntity
();
ApplicationDomainEx
.
ClockField
=
clockFieldEntity
;
// Step 3. 加载插件信息
// Step 3. 加载插件信息
ApplicationDomainEx
.
PluginInfos
=
this
.
pluginService
.
LoadPluginInfos
();
ApplicationDomainEx
.
PluginInfos
=
this
.
pluginService
.
LoadPluginInfos
();
this
.
UpdatePluginInfos
(
vizConfig
);
this
.
UpdatePluginInfos
(
vizConfig
);
...
...
VIZ.Package.Module/VIZ.Package.Module.csproj
View file @
6ee12cfa
...
@@ -93,6 +93,10 @@
...
@@ -93,6 +93,10 @@
<Reference Include="WindowsFormsIntegration" />
<Reference Include="WindowsFormsIntegration" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Compile Include="ControlObject\FieldEdit\Edit\Clock\ClockEditPanel.xaml.cs">
<DependentUpon>ClockEditPanel.xaml</DependentUpon>
</Compile>
<Compile Include="ControlObject\FieldEdit\Edit\Clock\ClockEditPanelModel.cs" />
<Compile Include="ControlObject\FieldEdit\Edit\RadioEdit\RadioEditPanel.xaml.cs">
<Compile Include="ControlObject\FieldEdit\Edit\RadioEdit\RadioEditPanel.xaml.cs">
<DependentUpon>RadioEditPanel.xaml</DependentUpon>
<DependentUpon>RadioEditPanel.xaml</DependentUpon>
</Compile>
</Compile>
...
@@ -422,6 +426,10 @@
...
@@ -422,6 +426,10 @@
<Folder Include="ProjectManager\Model\" />
<Folder Include="ProjectManager\Model\" />
</ItemGroup>
</ItemGroup>
<ItemGroup>
<ItemGroup>
<Page Include="ControlObject\FieldEdit\Edit\Clock\ClockEditPanel.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="ControlObject\FieldEdit\Edit\RadioEdit\RadioEditPanel.xaml">
<Page Include="ControlObject\FieldEdit\Edit\RadioEdit\RadioEditPanel.xaml">
<Generator>MSBuild:Compile</Generator>
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
<SubType>Designer</SubType>
...
...
VIZ.Package.Service/Viz/VizCommandControlObjectService.cs
View file @
6ee12cfa
...
@@ -322,7 +322,30 @@ namespace VIZ.Package.Service
...
@@ -322,7 +322,30 @@ namespace VIZ.Package.Service
/// <param name="value">值</param>
/// <param name="value">值</param>
public
void
SetControlObjectValue
(
ConnModel
conn
,
string
treeNodePath
,
string
fieldIdentifier
,
string
value
)
public
void
SetControlObjectValue
(
ConnModel
conn
,
string
treeNodePath
,
string
fieldIdentifier
,
string
value
)
{
{
conn
.
EndpointManager
.
Send
(
$"MAIN_SCENE*TREE*
{
treeNodePath
}
*FUNCTION*ControlObject*in SET ON
{
fieldIdentifier
}
SET
{
value
}
"
);
string
str
=
$"MAIN_SCENE*TREE*
{
treeNodePath
}
*FUNCTION*ControlObject*in SET ON
{
fieldIdentifier
}
SET
{
value
}
"
;
conn
.
EndpointManager
.
Send
(
str
);
}
/// <summary>
/// 设置时钟控制对象
/// </summary>
/// <param name="conn"></param>
/// <param name="treeNodePath"></param>
/// <param name="fieldIdentifier"></param>
/// <param name="value"></param>
public
void
SetControlObjectClockValue
(
ConnModel
conn
,
string
treeNodePath
,
string
fieldIdentifier
,
string
value
)
{
string
str
=
$"MAIN_SCENE*TREE*
{
treeNodePath
}
*FUNCTION*ControlObject*in SET ON
{
fieldIdentifier
}
SET
{
value
}
"
;
conn
.
EndpointManager
.
Send
(
str
);
}
public
void
SetControlObjectClockCmd
(
ConnModel
conn
,
string
treeNodePath
,
string
fieldIdentifier
,
string
upValue
,
string
downValue
,
string
cmd
)
{
string
str
=
$"MAIN_SCENE*TREE*
{
treeNodePath
}
*FUNCTION*ControlObject*in SET ON
{
fieldIdentifier
}
SET *TIME SET
{
upValue
}
,*LIMIT SET
{
downValue
}
,*DIRECTION SET
{
cmd
}
"
;
conn
.
EndpointManager
.
Send
(
str
);
}
}
/// <summary>
/// <summary>
...
@@ -548,6 +571,9 @@ namespace VIZ.Package.Service
...
@@ -548,6 +571,9 @@ namespace VIZ.Package.Service
if
(
type
==
"custom_video"
)
if
(
type
==
"custom_video"
)
return
VizControlFieldType
.
custom_video
;
return
VizControlFieldType
.
custom_video
;
if
(
type
==
"clock"
)
return
VizControlFieldType
.
clock
;
return
VizControlFieldType
.
none
;
return
VizControlFieldType
.
none
;
}
}
...
...
VIZ.Package.Storage/Entity/ControlObject/ClockFieldEntity.cs
0 → 100644
View file @
6ee12cfa
using
LiteDB
;
using
System
;
using
System.Collections.Generic
;
using
System.Linq
;
using
System.Text
;
using
System.Threading.Tasks
;
namespace
VIZ.Package.Storage
{
public
class
ClockFieldEntity
{
/// <summary>
/// 编号
/// </summary>
[
BsonId
(
true
)]
public
int
Id
{
get
;
set
;
}
/// <summary>
/// 倒计时
/// </summary>
public
bool
RadioDown
{
get
;
set
;
}
=
true
;
/// <summary>
/// 正计时
/// </summary>
public
bool
RadioUp
{
get
;
set
;
}=
false
;
}
}
VIZ.Package.Storage/Enum/VizControlFieldType.cs
View file @
6ee12cfa
...
@@ -94,6 +94,12 @@ namespace VIZ.Package.Storage
...
@@ -94,6 +94,12 @@ namespace VIZ.Package.Storage
/// 自定义 视频
/// 自定义 视频
/// </summary>
/// </summary>
[
Description
(
"自定义 视频"
)]
[
Description
(
"自定义 视频"
)]
custom_video
custom_video
,
/// <summary>
/// 时钟
/// </summary>
[
Description
(
"时钟"
)]
clock
}
}
}
}
VIZ.Package.Storage/LocalDbContext.cs
View file @
6ee12cfa
...
@@ -39,6 +39,7 @@ namespace VIZ.Package.Storage
...
@@ -39,6 +39,7 @@ namespace VIZ.Package.Storage
this
.
ConnGroup
=
this
.
Database
.
GetCollection
<
ConnGroupEntity
>();
this
.
ConnGroup
=
this
.
Database
.
GetCollection
<
ConnGroupEntity
>();
this
.
Conn
=
this
.
Database
.
GetCollection
<
ConnEntity
>();
this
.
Conn
=
this
.
Database
.
GetCollection
<
ConnEntity
>();
this
.
PluginMappingConfig
=
this
.
Database
.
GetCollection
<
PluginMappingConfigEntity
>();
this
.
PluginMappingConfig
=
this
.
Database
.
GetCollection
<
PluginMappingConfigEntity
>();
this
.
ClockField
=
this
.
Database
.
GetCollection
<
ClockFieldEntity
>();
}
}
/// <summary>
/// <summary>
...
@@ -71,6 +72,12 @@ namespace VIZ.Package.Storage
...
@@ -71,6 +72,12 @@ namespace VIZ.Package.Storage
/// </summary>
/// </summary>
public
ILiteCollection
<
ConnEntity
>
Conn
{
get
;
private
set
;
}
public
ILiteCollection
<
ConnEntity
>
Conn
{
get
;
private
set
;
}
/// <summary>
/// 时钟保存字段
/// </summary>
public
ILiteCollection
<
ClockFieldEntity
>
ClockField
{
get
;
private
set
;
}
/// <summary>
/// <summary>
/// 插件映射
/// 插件映射
/// </summary>
/// </summary>
...
...
VIZ.Package.Storage/VIZ.Package.Storage.csproj
View file @
6ee12cfa
...
@@ -100,6 +100,7 @@
...
@@ -100,6 +100,7 @@
<Compile Include="Entity\Config\PluginMappingConfigEntity.cs" />
<Compile Include="Entity\Config\PluginMappingConfigEntity.cs" />
<Compile Include="Entity\Conn\ConnEntity.cs" />
<Compile Include="Entity\Conn\ConnEntity.cs" />
<Compile Include="Entity\Conn\ConnGroupEntity.cs" />
<Compile Include="Entity\Conn\ConnGroupEntity.cs" />
<Compile Include="Entity\ControlObject\ClockFieldEntity.cs" />
<Compile Include="Entity\ControlObject\ControlFieldEntity.cs" />
<Compile Include="Entity\ControlObject\ControlFieldEntity.cs" />
<Compile Include="Entity\ControlObject\ControlObjectEntity.cs" />
<Compile Include="Entity\ControlObject\ControlObjectEntity.cs" />
<Compile Include="Entity\Page\PageEntityBase.cs" />
<Compile Include="Entity\Page\PageEntityBase.cs" />
...
...
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