Commit e110e38f by wangonghui

添加配置文件是否隐藏媒体资源库页签

parent 5bfde9f6
......@@ -35,7 +35,7 @@
</Grid>
<dx:DXTabControl Grid.Row="1">
<dx:DXTabItem Header="媒资库">
<dx:DXTabItem Header="媒资库" Visibility="{Binding IShowMedia,Mode=TwoWay}">
<!-- 媒体资源面板 -->
<local:MediaResourcePanel x:Name="mhResourcePanel">
<local:MediaResourcePanel.FolderContextMenu>
......
......@@ -4,6 +4,7 @@ using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Storage;
......@@ -24,6 +25,9 @@ namespace VIZ.Package.Module
// 初始化命令
this.InitCommand();
//处理是否隐藏媒体资源库页签
IsHideMedieTab();
}
/// <summary>
......@@ -66,6 +70,41 @@ namespace VIZ.Package.Module
#endregion
#region IShowMedia ---是否显示媒体资源库页签
private Visibility iShowMedia = Visibility.Visible;
/// <summary>
/// 是否隐藏媒体资源库页签
/// </summary>
public Visibility IShowMedia
{
get { return iShowMedia; }
set
{
iShowMedia = value;
this.RaisePropertyChanged(nameof(IShowMedia));
}
}
private void IsHideMedieTab()
{
bool flag = ApplicationDomainEx.IniStorage.GetValue<LogConfig, bool>(p => p.ISSHOWMEDIATAB);
if (flag)
{
IShowMedia = Visibility.Visible;
}
else
{
IShowMedia = Visibility.Hidden;
}
}
#endregion
// =====================================================================
// Command
// =====================================================================
......
......@@ -50,7 +50,7 @@
</local:GHResourcePanel.FileContextMenu>
</local:GHResourcePanel>
</dx:DXTabItem>
<dx:DXTabItem Header="媒资库">
<dx:DXTabItem Header="媒资库" Visibility="{Binding IShowMedia,Mode=TwoWay}">
<!-- 媒体资源面板 -->
<local:MediaResourcePanel x:Name="mhResourcePanel">
<local:MediaResourcePanel.FolderContextMenu>
......
......@@ -4,6 +4,7 @@ using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core;
using VIZ.Package.Domain;
using VIZ.Package.Storage;
......@@ -25,6 +26,9 @@ namespace VIZ.Package.Module
// 初始化命令
this.InitCommand();
//处理是否隐藏媒体资源库页签
IsHideMedieTab();
}
/// <summary>
......@@ -67,6 +71,41 @@ namespace VIZ.Package.Module
#endregion
#region IShowMedia ---是否显示媒体资源库页签
private Visibility iShowMedia=Visibility.Visible;
/// <summary>
/// 是否隐藏媒体资源库页签
/// </summary>
public Visibility IShowMedia
{
get { return iShowMedia; }
set
{
iShowMedia = value;
this.RaisePropertyChanged(nameof(IShowMedia));
}
}
private void IsHideMedieTab()
{
bool flag= ApplicationDomainEx.IniStorage.GetValue<LogConfig, bool>(p => p.ISSHOWMEDIATAB);
if(flag)
{
IShowMedia = Visibility.Visible;
}
else
{
IShowMedia = Visibility.Hidden;
}
}
#endregion
// =====================================================================
// Command
// =====================================================================
......
......@@ -3,6 +3,9 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using VIZ.Package.Domain;
using VIZ.Package.Storage;
namespace VIZ.Package.Module
{
......@@ -51,6 +54,40 @@ namespace VIZ.Package.Module
set { mhResourceEditPartModel = value; this.RaisePropertyChanged(nameof(MHResourceEditPartModel)); }
}
#region IShowMedia ---是否显示媒体资源库页签
private Visibility iShowMedia = Visibility.Visible;
/// <summary>
/// 是否隐藏媒体资源库页签
/// </summary>
public Visibility IShowMedia
{
get { return iShowMedia; }
set
{
iShowMedia = value;
this.RaisePropertyChanged(nameof(IShowMedia));
}
}
public void IsHideMedieTab()
{
bool flag = ApplicationDomainEx.IniStorage.GetValue<LogConfig, bool>(p => p.ISSHOWMEDIATAB);
if (flag)
{
IShowMedia = Visibility.Visible;
}
else
{
IShowMedia = Visibility.Hidden;
}
}
#endregion
#endregion
}
}
......@@ -17,5 +17,11 @@ namespace VIZ.Package.Storage
/// </summary>
[Ini(Section = "Log", DefaultValue = "1000", Type = typeof(int))]
public string LOG_ONE_FILE_MAX_RECORD { get; set; }
/// <summary>
/// 是否显示
/// </summary>
[Ini(Section = "MEDIA", DefaultValue = "true", Type = typeof(bool))]
public string ISSHOWMEDIATAB { get; set; }
}
}
......@@ -16,4 +16,7 @@ VIZ_GH_SERVER_NAME=VizDbServer
VIZ_USER_NAME=Guest|Admin
[Log]
; 单文件最多记录条数
LOG_ONE_FILE_MAX_RECORD=1000
\ No newline at end of file
LOG_ONE_FILE_MAX_RECORD=1000
;是否显示媒体资源库页签
[MEDIA]
ISSHOWMEDIATAB=false
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment