Update 07082021
This commit is contained in:
43
BlazorApp/Pages/ShowConfig.razor
Normal file
43
BlazorApp/Pages/ShowConfig.razor
Normal file
@@ -0,0 +1,43 @@
|
||||
@page "/showconfig"
|
||||
@using BlazorApp.Helper
|
||||
@using System.IO;
|
||||
|
||||
<h3>ShowConfig</h3>
|
||||
|
||||
<button @onclick="ShowConfiguration">Config</button>
|
||||
<br />
|
||||
<label>Autologin: @alogin</label><br />
|
||||
<label>Connectionstring: @connstring</label><br />
|
||||
<label>Directory: @mydir</label><br />
|
||||
<br />
|
||||
<input placeholder="Enter your text" @bind-value="@pathi" />
|
||||
<button @onclick="@UpdateFilelist">Refresh</button>
|
||||
<br />
|
||||
<label>Files: @filelist</label>
|
||||
|
||||
<hr />
|
||||
|
||||
@code {
|
||||
public string alogin { get; set; } = "";
|
||||
public string connstring { get; set; } = "";
|
||||
public string mydir { get; set; } = "";
|
||||
public string filelist { get; set; } = "";
|
||||
public string pathi { get; set; } = "";
|
||||
private void ShowConfiguration()
|
||||
{
|
||||
Helper.ParameterHelper ph = new Helper.ParameterHelper();
|
||||
alogin = ph.GetParameter("autologin");
|
||||
connstring = ph.GetConnString("BlazorAppContextConnection");
|
||||
mydir = AppContext.BaseDirectory;
|
||||
|
||||
|
||||
}
|
||||
private void UpdateFilelist()
|
||||
{
|
||||
filelist = "";
|
||||
string [] fileEntries = Directory.GetFiles(pathi);
|
||||
foreach (string fileName in fileEntries)
|
||||
filelist = filelist + ", " + fileName;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user