-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
droplet92
committed
Jan 19, 2021
1 parent
4ea0ab3
commit ef058dc
Showing
6 changed files
with
123 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
using FileAccessControlAgent.Views; | ||
using System.Collections.Generic; | ||
|
||
namespace FileAccessControlAgent.Samples | ||
{ | ||
public static class MenuSamples | ||
{ | ||
public static List<LogInfo> LogListSample | ||
{ | ||
get | ||
{ | ||
List<LogInfo> sampleLogList = new List<LogInfo>(); | ||
sampleLogList.Add(new LogInfo("2021-01-18", "WINWORD.EXE", "파일 접근 거부")); | ||
sampleLogList.Add(new LogInfo("2021-01-19", "WINWORD.EXE", "파일 접근 거부")); | ||
sampleLogList.Add(new LogInfo("2021-01-20", "EXCEL.EXE", "파일 접근 거부")); | ||
return sampleLogList; | ||
} | ||
} | ||
|
||
public static List<string> RecentNotifications | ||
{ | ||
get | ||
{ | ||
List<string> sampleRecentNotifications = new List<string>(); | ||
sampleRecentNotifications.Add("화이트리스트 업데이트 v1.0.1"); | ||
sampleRecentNotifications.Add("화이트리스트 업데이트 v1.0.0"); | ||
return sampleRecentNotifications; | ||
} | ||
} | ||
|
||
public static string WhitelistVersion | ||
{ | ||
get { return "v1.0.1"; } | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,46 @@ | ||
using System.Windows.Controls; | ||
using System; | ||
using System.Windows; | ||
using System.Windows.Controls; | ||
using FileAccessControlAgent.Samples; | ||
|
||
namespace FileAccessControlAgent.Views | ||
{ | ||
public class LogInfo | ||
{ | ||
public string DateTime { get; private set; } | ||
public string ProgramName { get; private set; } | ||
public string Preview { get; private set; } | ||
|
||
public LogInfo(string dateTime, string programName, string preview) | ||
{ | ||
DateTime = dateTime; | ||
ProgramName = programName; | ||
Preview = preview; | ||
} | ||
} | ||
|
||
public partial class FileAccessRejectLogMenuView : UserControl | ||
{ | ||
public FileAccessRejectLogMenuView() | ||
{ | ||
InitializeComponent(); | ||
|
||
var logListView = logList.Content as ListView; | ||
foreach (LogInfo logInfo in MenuSamples.LogListSample) | ||
{ | ||
logListView.Items.Add(logInfo); | ||
} | ||
logListView.SelectionChanged += LogListSelectionChanged; | ||
} | ||
|
||
private void LogListSelectionChanged(object sender, SelectionChangedEventArgs e) | ||
{ | ||
var logInfo = (logList.Content as ListView).SelectedItem as LogInfo; | ||
|
||
(logDetails.Content as TextBlock).Text = | ||
$"DateTime :\t{logInfo.DateTime}" + Environment.NewLine + | ||
$"ProgramName :\t{logInfo.ProgramName}" + Environment.NewLine + | ||
$"Preview :\t{logInfo.Preview}"; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters