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
20ed5a57
Commit
20ed5a57
authored
Feb 22, 2023
by
liulongfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录 gh 服务名 与 viz用户名 改为可选
parent
e63ff74b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
61 additions
and
7 deletions
+61
-7
VIZ.Package.Domain/ApplicationConstants.cs
+0
-1
VIZ.Package.Module/Login/View/LoginView.xaml
+8
-4
VIZ.Package.Module/Login/ViewModel/LoginViewModel.cs
+35
-0
VIZ.Package.Storage/Ini/VizConfig.cs
+12
-0
VIZ.Package/config/config.ini
+6
-2
No files found.
VIZ.Package.Domain/ApplicationConstants.cs
View file @
20ed5a57
...
...
@@ -41,6 +41,5 @@ namespace VIZ.Package.Domain
/// Viz 层集合
/// </summary>
public
readonly
static
List
<
VizLayer
>
VIZ_LAYERS
=
new
List
<
VizLayer
>
{
VizLayer
.
FRONT_LAYER
,
VizLayer
.
MAIN_LAYER
,
VizLayer
.
BACK_LAYER
};
}
}
VIZ.Package.Module/Login/View/LoginView.xaml
View file @
20ed5a57
...
...
@@ -70,13 +70,17 @@
<!-- ServerName -->
<TextBlock Text="服务名:" Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
<dxe:TextEdit Grid.Row="3" Grid.Column="1" Height="30"
EditValue="{Binding GH_ServerName,Mode=TwoWay}"></dxe:TextEdit>
<dxe:ComboBoxEdit Grid.Row="3" Grid.Column="1" Height="30" IsTextEditable="False"
ItemsSource="{Binding Path=GH_ServerName_List}"
SelectedItem="{Binding Path=GH_ServerName,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<!-- UserName -->
<TextBlock Text="用户名:" Grid.Row="4" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
<dxe:TextEdit Grid.Row="4" Grid.Column="1" Height="30"
EditValue="{Binding VIZ_UserName,Mode=TwoWay}"></dxe:TextEdit>
<dxe:ComboBoxEdit Grid.Row="4" Grid.Column="1" Height="30" IsTextEditable="False"
ItemsSource="{Binding Path=VIZ_UserName_List}"
SelectedItem="{Binding Path=VIZ_UserName,Mode=TwoWay}">
</dxe:ComboBoxEdit>
<!-- Password -->
<TextBlock Text="密码:" Grid.Row="5" VerticalAlignment="Center" HorizontalAlignment="Right" Margin="0,0,10,0"></TextBlock>
...
...
VIZ.Package.Module/Login/ViewModel/LoginViewModel.cs
View file @
20ed5a57
...
...
@@ -163,6 +163,20 @@ namespace VIZ.Package.Module
#
endregion
#
region
GH_ServerName_List
--
GH
服务名列表
private
List
<
string
>
gh_ServerName_List
;
/// <summary>
/// GH 服务名列表
/// </summary>
public
List
<
string
>
GH_ServerName_List
{
get
{
return
gh_ServerName_List
;
}
set
{
gh_ServerName_List
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
GH_ServerName_List
));
}
}
#
endregion
#
region
VIZ_UserName
--
VIZ
用户名
private
string
viz_userName
;
...
...
@@ -177,6 +191,20 @@ namespace VIZ.Package.Module
#
endregion
#
region
VIZ_UserName_List
--
VIZ
用户名列表
private
List
<
string
>
viz_UserName_List
;
/// <summary>
/// 用户名列表
/// </summary>
public
List
<
string
>
VIZ_UserName_List
{
get
{
return
viz_UserName_List
;
}
set
{
viz_UserName_List
=
value
;
this
.
RaisePropertyChanged
(
nameof
(
VIZ_UserName_List
));
}
}
#
endregion
#
region
VIZ_Password
--
VIZ
密码
private
string
viz_password
;
...
...
@@ -214,6 +242,13 @@ namespace VIZ.Package.Module
this
.
IsLoading
=
true
;
// Step 1. 加载GH服务名列表 & VIZ服务名
this
.
GH_ServerName_List
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
VizConfig
,
string
>(
p
=>
p
.
VIZ_GH_SERVER_NAME
)
?.
Split
(
new
char
[]
{
'|'
},
StringSplitOptions
.
RemoveEmptyEntries
)?.
ToList
();
this
.
VIZ_UserName_List
=
ApplicationDomainEx
.
IniStorage
.
GetValue
<
VizConfig
,
string
>(
p
=>
p
.
VIZ_USER_NAME
)
?.
Split
(
new
char
[]
{
'|'
},
StringSplitOptions
.
RemoveEmptyEntries
)?.
ToList
();
ThreadHelper
.
SafeRun
(
action
:
()
=>
{
// Step 1. 加载Viz配置信息
...
...
VIZ.Package.Storage/Ini/VizConfig.cs
View file @
20ed5a57
...
...
@@ -29,5 +29,17 @@ namespace VIZ.Package.Storage
/// </summary>
[
Ini
(
Section
=
"Viz"
,
DefaultValue
=
"position"
,
Type
=
typeof
(
int
))]
public
string
VIZ_FIELD_EDIT_DUPLET_TRIPLET_HIDDEN_FILTER
{
get
;
set
;
}
/// <summary>
/// Viz GH服务名: VizDbServer , 使用 "|" 分隔
/// </summary>
[
Ini
(
Section
=
"Viz"
,
DefaultValue
=
"VizDbServer"
,
Type
=
typeof
(
string
))]
public
string
VIZ_GH_SERVER_NAME
{
get
;
set
;
}
/// <summary>
/// Viz 用户名: Guest|Admin , 使用 "|" 分隔
/// </summary>
[
Ini
(
Section
=
"Viz"
,
DefaultValue
=
"Guest|Admin"
,
Type
=
typeof
(
string
))]
public
string
VIZ_USER_NAME
{
get
;
set
;
}
}
}
VIZ.Package/config/config.ini
View file @
20ed5a57
...
...
@@ -7,4 +7,8 @@ VIZ_IMAGE_FILTER=图片|*.jpg;*.jpeg;*.bmp;*.png;
; Viz预览重启等待时间(单位:毫秒)
VIZ_PREVIEW_RESTART_WAIT
=
3000
; Viz预览编辑器类型: duplet、triplet 数据隐藏过滤器, 使用 "|" 分隔
VIZ_FIELD_EDIT_DUPLET_TRIPLET_HIDDEN_FILTER
=
position
\ No newline at end of file
VIZ_FIELD_EDIT_DUPLET_TRIPLET_HIDDEN_FILTER
=
position
; Viz GH服务名: VizDbServer , 使用 "|" 分隔
VIZ_GH_SERVER_NAME
=
VizDbServer
; Viz 用户名: Guest|Admin , 使用 "|" 分隔
VIZ_USER_NAME
=
Guest|Admin
\ No newline at end of file
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