Commit e110e38f by wangonghui

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

parent 5bfde9f6
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
</Grid> </Grid>
<dx:DXTabControl Grid.Row="1"> <dx:DXTabControl Grid.Row="1">
<dx:DXTabItem Header="媒资库"> <dx:DXTabItem Header="媒资库" Visibility="{Binding IShowMedia,Mode=TwoWay}">
<!-- 媒体资源面板 --> <!-- 媒体资源面板 -->
<local:MediaResourcePanel x:Name="mhResourcePanel"> <local:MediaResourcePanel x:Name="mhResourcePanel">
<local:MediaResourcePanel.FolderContextMenu> <local:MediaResourcePanel.FolderContextMenu>
......
...@@ -4,6 +4,7 @@ using System.Dynamic; ...@@ -4,6 +4,7 @@ using System.Dynamic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Storage; using VIZ.Package.Storage;
...@@ -24,6 +25,9 @@ namespace VIZ.Package.Module ...@@ -24,6 +25,9 @@ namespace VIZ.Package.Module
// 初始化命令 // 初始化命令
this.InitCommand(); this.InitCommand();
//处理是否隐藏媒体资源库页签
IsHideMedieTab();
} }
/// <summary> /// <summary>
...@@ -66,6 +70,41 @@ namespace VIZ.Package.Module ...@@ -66,6 +70,41 @@ namespace VIZ.Package.Module
#endregion #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 // Command
// ===================================================================== // =====================================================================
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</local:GHResourcePanel.FileContextMenu> </local:GHResourcePanel.FileContextMenu>
</local:GHResourcePanel> </local:GHResourcePanel>
</dx:DXTabItem> </dx:DXTabItem>
<dx:DXTabItem Header="媒资库"> <dx:DXTabItem Header="媒资库" Visibility="{Binding IShowMedia,Mode=TwoWay}">
<!-- 媒体资源面板 --> <!-- 媒体资源面板 -->
<local:MediaResourcePanel x:Name="mhResourcePanel"> <local:MediaResourcePanel x:Name="mhResourcePanel">
<local:MediaResourcePanel.FolderContextMenu> <local:MediaResourcePanel.FolderContextMenu>
......
...@@ -4,6 +4,7 @@ using System.Dynamic; ...@@ -4,6 +4,7 @@ using System.Dynamic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows;
using VIZ.Framework.Core; using VIZ.Framework.Core;
using VIZ.Package.Domain; using VIZ.Package.Domain;
using VIZ.Package.Storage; using VIZ.Package.Storage;
...@@ -25,6 +26,9 @@ namespace VIZ.Package.Module ...@@ -25,6 +26,9 @@ namespace VIZ.Package.Module
// 初始化命令 // 初始化命令
this.InitCommand(); this.InitCommand();
//处理是否隐藏媒体资源库页签
IsHideMedieTab();
} }
/// <summary> /// <summary>
...@@ -67,6 +71,41 @@ namespace VIZ.Package.Module ...@@ -67,6 +71,41 @@ namespace VIZ.Package.Module
#endregion #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 // Command
// ===================================================================== // =====================================================================
......
...@@ -3,6 +3,9 @@ using System.Collections.Generic; ...@@ -3,6 +3,9 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows;
using VIZ.Package.Domain;
using VIZ.Package.Storage;
namespace VIZ.Package.Module namespace VIZ.Package.Module
{ {
...@@ -51,6 +54,40 @@ namespace VIZ.Package.Module ...@@ -51,6 +54,40 @@ namespace VIZ.Package.Module
set { mhResourceEditPartModel = value; this.RaisePropertyChanged(nameof(MHResourceEditPartModel)); } 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 #endregion
} }
} }
...@@ -17,5 +17,11 @@ namespace VIZ.Package.Storage ...@@ -17,5 +17,11 @@ namespace VIZ.Package.Storage
/// </summary> /// </summary>
[Ini(Section = "Log", DefaultValue = "1000", Type = typeof(int))] [Ini(Section = "Log", DefaultValue = "1000", Type = typeof(int))]
public string LOG_ONE_FILE_MAX_RECORD { get; set; } 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 ...@@ -16,4 +16,7 @@ VIZ_GH_SERVER_NAME=VizDbServer
VIZ_USER_NAME=Guest|Admin VIZ_USER_NAME=Guest|Admin
[Log] [Log]
; 单文件最多记录条数 ; 单文件最多记录条数
LOG_ONE_FILE_MAX_RECORD=1000 LOG_ONE_FILE_MAX_RECORD=1000
\ No newline at end of file ;是否显示媒体资源库页签
[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