You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.2 KiB

@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;
}
}