Test.EIImageViewer
parent
855f4980d5
commit
4133953b93
|
@ -15,9 +15,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public string Keyboardkey { get; set; }
|
public string Keyboardkey { get; set; }
|
||||||
public int ShortcutKeyEnum { get; set; }
|
public int ShortcutKeyEnum { get; set; }
|
||||||
public int ImageToolType { get; set; }
|
public int ImageToolType { get; set; }
|
||||||
public DateTime CreateTime { get; set; }
|
public bool AltKey { get; set; }
|
||||||
public Guid CreateUserId { get; set; }
|
|
||||||
}
|
public bool CtrlKey { get; set; }
|
||||||
|
|
||||||
|
public bool ShiftKey { get; set; }
|
||||||
|
|
||||||
|
public bool MetaKey { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class SetDefaultShortcutKey
|
public class SetDefaultShortcutKey
|
||||||
|
@ -31,6 +36,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
{
|
{
|
||||||
public string Keyboardkey { get; set; }
|
public string Keyboardkey { get; set; }
|
||||||
public int ShortcutKeyEnum { get; set; }
|
public int ShortcutKeyEnum { get; set; }
|
||||||
|
|
||||||
|
public bool AltKey { get; set; }
|
||||||
|
|
||||||
|
public bool CtrlKey { get; set; }
|
||||||
|
|
||||||
|
public bool ShiftKey { get; set; }
|
||||||
|
|
||||||
|
public bool MetaKey { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,18 +34,36 @@ namespace IRaCIS.Core.Application.Service
|
||||||
/// <param name="inQuery"></param>
|
/// <param name="inQuery"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<DefaultShortcutKeyView>> GetDefaultShortcutKeyList(DefaultShortcutKeyQuery inQuery)
|
public async Task<List<DefaultShortcutKeyView>> GetDefaultShortcutKeyList(DefaultShortcutKeyQuery inQuery)
|
||||||
{
|
{
|
||||||
var defaultShortcutKey = await _defaultShortcutKeyRepository.Where(x => x.ImageToolType == inQuery.ImageToolType).ToListAsync();
|
var defaultShortcutKey = await _defaultShortcutKeyRepository.Where(x => x.ImageToolType == inQuery.ImageToolType).ToListAsync();
|
||||||
var shortcutKeydic = await _dictionaryRepository.Where(x => x.Parent.Code == "ShortcutKey").ToListAsync();
|
var shortcutKeydic = await _dictionaryRepository.Where(x => x.Parent.Code == "ShortcutKey").ToListAsync();
|
||||||
var result = shortcutKeydic.OrderBy(x=>x.ShowOrder).Select(x => new DefaultShortcutKeyView()
|
|
||||||
{
|
|
||||||
|
|
||||||
Id = x.Id,
|
|
||||||
ImageToolType = inQuery.ImageToolType,
|
List<DefaultShortcutKeyView> result = new List<DefaultShortcutKeyView>();
|
||||||
ShortcutKeyEnum = int.Parse(x.Code),
|
|
||||||
Keyboardkey = defaultShortcutKey.Where(y => y.ShortcutKeyEnum == int.Parse(x.Code)).Select(y => y.Keyboardkey).FirstOrDefault() ?? string.Empty,
|
shortcutKeydic.OrderBy(x => x.ShowOrder).ForEach(x =>
|
||||||
}).ToList();
|
{
|
||||||
|
var key= defaultShortcutKey.Where(y => y.ShortcutKeyEnum == int.Parse(x.Code)).FirstOrDefault();
|
||||||
|
|
||||||
|
var isnull = key == null;
|
||||||
|
|
||||||
|
result.Add(new DefaultShortcutKeyView()
|
||||||
|
{
|
||||||
|
Id = x.Id,
|
||||||
|
ImageToolType = inQuery.ImageToolType,
|
||||||
|
ShortcutKeyEnum = int.Parse(x.Code),
|
||||||
|
Keyboardkey = isnull ? string.Empty : key.Keyboardkey,
|
||||||
|
AltKey = isnull ? false : key.AltKey,
|
||||||
|
CtrlKey = isnull ? false : key.CtrlKey,
|
||||||
|
MetaKey = isnull ? false : key.MetaKey,
|
||||||
|
ShiftKey = isnull ? false : key.ShiftKey
|
||||||
|
}) ;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -58,17 +76,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<DefaultShortcutKeyView>> GetDoctorShortcutKey(DefaultShortcutKeyQuery inQuery)
|
public async Task<List<DefaultShortcutKeyView>> GetDoctorShortcutKey(DefaultShortcutKeyQuery inQuery)
|
||||||
{
|
{
|
||||||
var defaultShortcutKey = await _defaultShortcutKeyRepository.Where(x => x.ImageToolType == inQuery.ImageToolType).ToListAsync();
|
return await this.GetDefaultShortcutKeyList(inQuery);
|
||||||
var shortcutKeydic = await _dictionaryRepository.Where(x => x.Parent.Code == "ShortcutKey").ToListAsync();
|
|
||||||
var result = shortcutKeydic.OrderBy(x => x.ShowOrder).Select(x => new DefaultShortcutKeyView()
|
|
||||||
{
|
|
||||||
|
|
||||||
Id = x.Id,
|
|
||||||
ImageToolType = inQuery.ImageToolType,
|
|
||||||
ShortcutKeyEnum = int.Parse(x.Code),
|
|
||||||
Keyboardkey = defaultShortcutKey.Where(y => y.ShortcutKeyEnum == int.Parse(x.Code)).Select(y => y.Keyboardkey).FirstOrDefault() ?? string.Empty,
|
|
||||||
}).ToList();
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,16 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// CreateUserId
|
/// CreateUserId
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid CreateUserId { get; set; }
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
||||||
}
|
public bool AltKey { get; set; }
|
||||||
|
|
||||||
|
public bool CtrlKey { get; set; }
|
||||||
|
|
||||||
|
public bool ShiftKey { get; set; }
|
||||||
|
|
||||||
|
public bool MetaKey { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue