Comments & layout
This commit is contained in:
parent
f1e03db563
commit
df163e6727
6 changed files with 113 additions and 157 deletions
|
|
@ -56,6 +56,7 @@
|
|||
|
||||
</ProgressBar>
|
||||
<TextBlock x:Name="tUserSeconds" Text="10" TextAlignment="Center" HorizontalAlignment="Stretch" />
|
||||
<Button Content="OK" Name="bUserRead" Click="BUserRead_Click"/>
|
||||
</StackPanel>
|
||||
</TabItem>
|
||||
<TabItem Name="tbTask">
|
||||
|
|
@ -181,7 +182,8 @@
|
|||
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding FNGain_ANGainValue,StringFormat={}Gain: {0:0.00} }" />
|
||||
<TextBlock Grid.Row="2" Grid.Column="2" Text="{Binding MinWorkerDosisMargin,StringFormat={}Margin: {0:0.00} }" />
|
||||
</Grid>
|
||||
<Image Grid.Row="3" Grid.RowSpan="2" Grid.Column="0" Height="150" >
|
||||
<StackPanel Grid.Row="3" Grid.Column="0" Grid.RowSpan="1" VerticalAlignment="Center" >
|
||||
<Image Height="120" VerticalAlignment="Center" >
|
||||
<Image.Style>
|
||||
<Style TargetType="{x:Type Image}">
|
||||
<Style.Triggers>
|
||||
|
|
@ -195,7 +197,11 @@
|
|||
</Style>
|
||||
</Image.Style>
|
||||
</Image>
|
||||
<StackPanel Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" >
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="4" Grid.Column="0" HorizontalAlignment="Left" VerticalAlignment="Center" >
|
||||
<telerik:RadButton Name="TaskCancel" Content="Cancel" Click="TaskCancel_Click" Width="300" Height="50" CornerRadius="10" TextBlock.FontSize="25" Margin="20,0,0,0" />
|
||||
</StackPanel>
|
||||
<StackPanel Grid.Row="4" Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Center" >
|
||||
<telerik:RadButton Name="TaskOK" Content="OK" Click="TaskOK_Click" Width="300" Height="50" CornerRadius="10" TextBlock.FontSize="25" />
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
|
|
@ -221,17 +227,18 @@
|
|||
<TabItem Name="tbNotAllowed">
|
||||
<Grid>
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="100" />
|
||||
<RowDefinition Height="300" />
|
||||
<RowDefinition Height="*" />
|
||||
<RowDefinition Height="100" />
|
||||
</Grid.RowDefinitions>
|
||||
|
||||
<TextBlock Grid.Row="0" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" FontSize="25" FontFamily="Comic Sans MS">
|
||||
<TextBlock Grid.Row="1" VerticalAlignment="Center" HorizontalAlignment="Center" TextAlignment="Center" FontSize="25" FontFamily="Comic Sans MS">
|
||||
<Run Text="No Access" />
|
||||
<Run Name="tReasonNoAccess" Text="" />
|
||||
<LineBreak/>
|
||||
|
||||
</TextBlock>
|
||||
<Button Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Background="LawnGreen" Padding="10,10,10,10" Content="OK" Name="bNoAccessDone" Click="bClose_Click">
|
||||
<Button Grid.Row="2" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="24" Background="LawnGreen" Padding="10,10,10,10" Content="OK" Name="bNoAccessDone" Click="bClose_Click">
|
||||
|
||||
</Button>
|
||||
</Grid>
|
||||
|
|
|
|||
|
|
@ -248,6 +248,19 @@ namespace eDosStation
|
|||
getTaskListViewSource.View.MoveCurrentToFirst();
|
||||
}
|
||||
|
||||
public string getCommentUnknown()
|
||||
{
|
||||
StringBuilder res = new StringBuilder();
|
||||
DataSet1.CommentOnEventRow r = dtCOE.FindByID_CommnentOnEvent(3);
|
||||
res.AppendLine(r.Comment_NL).Replace("\\n", "\n");
|
||||
res.AppendLine("---");
|
||||
res.AppendLine(r.Comment_FR).Replace("\\n", "\n");
|
||||
res.AppendLine("---");
|
||||
res.AppendLine(r.Comment_EN).Replace("\\n", "\n");
|
||||
res.AppendLine("---");
|
||||
return res.ToString();
|
||||
}
|
||||
|
||||
public string getCommentOnEvent(string prefix, int id)
|
||||
{
|
||||
string res=string.Empty;
|
||||
|
|
@ -270,38 +283,48 @@ namespace eDosStation
|
|||
UserSeconds = 10;
|
||||
//UserScreen
|
||||
string ReasonNoAccess = string.Empty;
|
||||
tbUser.IsSelected = true;
|
||||
if (_User == null || _User.VisitIDLocked == true || _User.AccessAllow == false)
|
||||
{
|
||||
//tbNotAllowed.IsSelected = true;
|
||||
if (_User.VisitIDLocked == true || _User.AccessAllow == false)
|
||||
ReasonNoAccess = _User.ReasonNoAccess;
|
||||
else ReasonNoAccess = getCommentOnEvent(string.Empty, 3);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(_User.UserComment))
|
||||
if (_User.PersID == 0)
|
||||
{
|
||||
UserComment.Text = _User.UserComment;
|
||||
boxComment.Visibility = Visibility.Visible;
|
||||
tReasonNoAccess.Text = getCommentUnknown();
|
||||
tbNotAllowed.IsSelected = true;
|
||||
doCancel = true;
|
||||
}
|
||||
else
|
||||
boxComment.Visibility = Visibility.Hidden;
|
||||
{
|
||||
tbUser.IsSelected = true;
|
||||
if (_User == null || _User.VisitIDLocked == true || _User.AccessAllow == false)
|
||||
{
|
||||
//tbNotAllowed.IsSelected = true;
|
||||
if (_User.VisitIDLocked == true || _User.AccessAllow == false)
|
||||
ReasonNoAccess = _User.ReasonNoAccess;
|
||||
else ReasonNoAccess = getCommentOnEvent(string.Empty, 3);
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(ReasonNoAccess)) UserAccess.Text = ReasonNoAccess;
|
||||
else UserAccess.Text = "Welcome to eDOS";
|
||||
Username.Text = string.Concat(_User.FirstName, " ", _User.LastName);
|
||||
pUserSeconds.Maximum = UserSeconds; pUserSeconds.Value = UserSeconds;
|
||||
tReasonNoAccess.Text = ReasonNoAccess;
|
||||
dispatcherTimer = new DispatcherTimer(DispatcherPriority.Normal);
|
||||
dispatcherTimer.Interval = TimeSpan.FromSeconds(1);
|
||||
dispatcherTimer.Tick += SwitchToTask;
|
||||
dispatcherTimer.Start();
|
||||
if (!string.IsNullOrEmpty(_User.UserComment))
|
||||
{
|
||||
UserComment.Text = _User.UserComment;
|
||||
boxComment.Visibility = Visibility.Visible;
|
||||
}
|
||||
else
|
||||
boxComment.Visibility = Visibility.Hidden;
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(ReasonNoAccess)) UserAccess.Text = ReasonNoAccess;
|
||||
else UserAccess.Text = "Welcome to eDOS";
|
||||
Username.Text = string.Concat(_User.FirstName, " ", _User.LastName);
|
||||
pUserSeconds.Maximum = UserSeconds; pUserSeconds.Value = UserSeconds;
|
||||
tReasonNoAccess.Text = ReasonNoAccess;
|
||||
dispatcherTimer = new DispatcherTimer(DispatcherPriority.Normal);
|
||||
dispatcherTimer.Interval = TimeSpan.FromSeconds(1);
|
||||
dispatcherTimer.Tick += SwitchToTask;
|
||||
dispatcherTimer.Start();
|
||||
}
|
||||
return doCancel;
|
||||
}
|
||||
|
||||
private void SwitchToTask(object sender, EventArgs e)
|
||||
{
|
||||
if (--UserSeconds > 0)
|
||||
if (--UserSeconds > 0 && (_User.AccessAllow!=true || !string.IsNullOrEmpty(_User.UserComment) || !string.IsNullOrEmpty(_User.ReasonNoAccess)))
|
||||
{
|
||||
tUserSeconds.Text = UserSeconds.ToString();
|
||||
pUserSeconds.Value = UserSeconds;
|
||||
|
|
@ -310,12 +333,15 @@ namespace eDosStation
|
|||
{
|
||||
dispatcherTimer.Stop();
|
||||
dispatcherTimer.Tick -= SwitchToTask;
|
||||
AskTask();
|
||||
if (_User.AccessAllow == true)
|
||||
AskTask();
|
||||
else Close();
|
||||
}
|
||||
}
|
||||
|
||||
void AskTask()
|
||||
{
|
||||
Naam.Text = _User.FirstName + " " + _User.LastName;
|
||||
eDosStation.DataSet1 dataSet1 = ((eDosStation.DataSet1)(this.FindResource("dataSet1")));
|
||||
using (var dataSet1GetTaskInfoTableAdapter = new eDosStation.DataSet1TableAdapters.GetTaskInfoTableAdapter())
|
||||
{
|
||||
|
|
@ -490,6 +516,20 @@ namespace eDosStation
|
|||
}
|
||||
}
|
||||
|
||||
private void BUserRead_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
dispatcherTimer.Stop();
|
||||
dispatcherTimer.Tick -= SwitchToTask;
|
||||
if (_User.AccessAllow == true)
|
||||
AskTask();
|
||||
else Close();
|
||||
}
|
||||
|
||||
private void TaskCancel_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
t = null;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ namespace eDosStation
|
|||
TestCSN = "0428790A0B4E80";
|
||||
insComments = new StringBuilder();
|
||||
tbComments = new TextBlock();
|
||||
tbComments.FontSize = 15;
|
||||
tbComments.FontSize = 20;
|
||||
tbComments.HorizontalAlignment = System.Windows.HorizontalAlignment.Stretch;
|
||||
tbComments.TextAlignment = System.Windows.TextAlignment.Center;
|
||||
|
||||
|
|
@ -92,14 +92,11 @@ namespace eDosStation
|
|||
if (curins.CompareTo(thisins) !=0)
|
||||
{
|
||||
if (curins != string.Empty) tbComments.Inlines.Add(new LineBreak());
|
||||
tbComments.Inlines.Add(new Bold(new Run($"Installation {thisins}:\n") { FontSize=20 }));
|
||||
tbComments.Inlines.Add(new Bold(new Run($"Installation {thisins}:\n") { FontSize=25 }));
|
||||
insComments.AppendLine($"Installation {thisins}");
|
||||
curins = thisins;
|
||||
}
|
||||
tbComments.Inlines.Add( new Run(thiscomment) );
|
||||
|
||||
|
||||
|
||||
}
|
||||
rs.Close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,9 +52,23 @@ namespace eDosStation
|
|||
AccessAllow = Values[rs.GetOrdinal("AccessAllow")] as bool?;
|
||||
Margin = Values[rs.GetOrdinal("AccessAllow")] as double?;
|
||||
VisitIDLocked = Values[rs.GetOrdinal("VisitIDLocked")] as bool?;
|
||||
ReasonNoAccess = Values[rs.GetOrdinal("ReasonNoAccess")].ToString();
|
||||
ReasonNoAccess = Values[rs.GetOrdinal("ReasonNoAccess")].ToString().Replace("\\n","\n");
|
||||
UserComment = Values[rs.GetOrdinal("Comment")].ToString();
|
||||
AllOk = (AccessAllow == true & VisitIDLocked == true);
|
||||
} else
|
||||
{
|
||||
// Not found
|
||||
PersID = 0;
|
||||
LastName = "Not Found";
|
||||
FirstName = "Not Found";
|
||||
conCode = "A1";
|
||||
Language = "N";
|
||||
AccessAllow = false;
|
||||
Margin = 0;
|
||||
VisitIDLocked = false;
|
||||
ReasonNoAccess = "Not found";
|
||||
UserComment = "";
|
||||
AllOk = (AccessAllow == true & VisitIDLocked == true);
|
||||
}
|
||||
rs.Close();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,21 +14,22 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Unc</InstallFrom>
|
||||
<UpdateEnabled>true</UpdateEnabled>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<MapFileExtensions>false</MapFileExtensions>
|
||||
<OpenBrowserOnPublish>false</OpenBrowserOnPublish>
|
||||
<ApplicationRevision>5</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<UseApplicationTrust>true</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<ApplicationVersion>1.0.0.5</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>false</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
|
|
@ -61,7 +62,7 @@
|
|||
<GenerateManifests>false</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>false</SignManifests>
|
||||
<SignManifests>true</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
|
|
@ -237,18 +238,6 @@
|
|||
<Name>OkReadBadge</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="Images\EPD-MK2.png" />
|
||||
<Resource Include="Images\EPD-N2.png" />
|
||||
|
|
@ -262,5 +251,17 @@
|
|||
</Content>
|
||||
<Resource Include="mk2-epd-bg.ico" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
</Project>
|
||||
103
eDos_Report.htm
103
eDos_Report.htm
|
|
@ -1,103 +0,0 @@
|
|||
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<title>Telerik UI for WPF Upgrade Wizard Log</title>
|
||||
<style type="text/css">
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
font: normal 12px Arial, sans-serif;
|
||||
line-height: 1.5;
|
||||
}
|
||||
#header {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 20px;
|
||||
height: 60px;
|
||||
min-width: 600px;
|
||||
background: url('file:///c:/users/admlvand/appdata/local/microsoft/visualstudio/15.0_ee91699e/extensions/zojf0cap.dhl/Resources/T4Templates/UpgradeLog/Logo.png') no-repeat right 30px top 30px;
|
||||
background-color: #0e0e0e;
|
||||
color: #909090;
|
||||
font: normal 10px Arial, sans-serif;
|
||||
}
|
||||
#header span {
|
||||
display: block;
|
||||
color: #fff;
|
||||
font: normal 22px Arial, sans-serif;
|
||||
}
|
||||
#legend {
|
||||
display: block;
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #0e0e0e;
|
||||
font: normal 12px Arial, sans-serif;
|
||||
}
|
||||
#legend span {
|
||||
display: block;
|
||||
float: left;
|
||||
height: 18px;
|
||||
margin: 0;
|
||||
padding: 2px 10px 0 10px;
|
||||
background-color: #8e8e8e;
|
||||
font: normal 12px Arial, sans-serif;
|
||||
}
|
||||
table#logTable {
|
||||
border: 1px solid #999;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table#logTable th, table#logTable td {
|
||||
border: 1px solid #999;
|
||||
padding: 5px 10px;
|
||||
text-align: left;
|
||||
}
|
||||
table#logTable th {
|
||||
border: 0;
|
||||
padding: 5px 10px;
|
||||
background-color: #8e8e8e;
|
||||
height: 20px;
|
||||
font: bold 14px Arial, sans-serif;
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div>
|
||||
<table id="logTable" cellpadding="0px" cellspacing="0px">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="5" style="padding: 0;">
|
||||
<div id="header">
|
||||
Telerik UI for WPF <span>Upgrade Wizard Log</span>
|
||||
</div>
|
||||
<div id="legend">
|
||||
<span style="background-color: #0e0e0e; color: #fff;">Processed: 0</span>
|
||||
<span style="background-color: green; color: #fff;">Succeeded: 0</span>
|
||||
<span style="background-color: blue; color: #fff;">Info: 0</span>
|
||||
<span style="background-color: gold; color: #fff;">Warnings: 0</span>
|
||||
<span style="background-color: red; color: #fff;">Failed: 0</span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>Project</th>
|
||||
<th>Title</th>
|
||||
<th>Details</th>
|
||||
<th>Result</th>
|
||||
</tr>
|
||||
<tr>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Loading…
Add table
Reference in a new issue