rate 表示

parent 6fe49e08
......@@ -9,9 +9,8 @@
<Grid>
<TextBox x:Name="listBox" Margin="0,95,75,0.5" TextWrapping="Wrap" Text="" IsReadOnly="True"/>
<TextBox x:Name="RUNUBox" Margin="0,35,607,251.5" TextWrapping="Wrap" Text="" IsReadOnly="True"/>
<TextBox x:Name="textBox" Margin="332,35,394,251.5" TextWrapping="Wrap" Text="" IsReadOnly="True"/>
<TextBox x:Name="pass" HorizontalAlignment="Left" Height="36" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Margin="621,35,0,0"/>
<Button Content="Button1" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Margin="767,51,0,0" />
<TextBox x:Name="textBox" Margin="589,35,137,251.5" TextWrapping="Wrap" Text="" IsReadOnly="True"/>
<TextBox x:Name="RUrate" Margin="385,35,387,251.5" TextWrapping="Wrap" Text="" IsReadOnly="True"/>
</Grid>
</Window>
......@@ -29,6 +29,7 @@ namespace iBeaconScanner
public static short RSSI = -50;//探索範囲 大きいほど狭い
static int RUcnt, NUcnt;
double rate;
Stopwatch sw = new Stopwatch();
......@@ -154,7 +155,10 @@ namespace iBeaconScanner
this.RUNUBox.Text = "RU:" + RUcnt + "人, NU:" + NUcnt + "人" + "\r\n";
if (RUcnt >= A_thresh && 1.0 * RUcnt / (RUcnt + NUcnt) >= B_thresh)//安全かどうかの判定
rate = (1.0 * RUcnt / (RUcnt + NUcnt));
RUrate.Text = " RUrate=" + rate.ToString("F2");
if (RUcnt >= A_thresh && rate >= B_thresh)//安全かどうかの判定
{
this.textBox.Text = "You are ACCEPTED!!";
Debug.WriteLine($"You are ACCEPTED!!");
......
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9C402D27C8DAE609477A515BE5E3E11AED27EC8B"
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "82CA724FCEE02F7AA65BAF30FD893EB0C35722F7"
//------------------------------------------------------------------------------
// <auto-generated>
// このコードはツールによって生成されました。
......@@ -67,7 +67,7 @@ namespace iBeaconScanner {
#line 13 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox pass;
internal System.Windows.Controls.TextBox RUrate;
#line default
#line hidden
......@@ -112,7 +112,7 @@ namespace iBeaconScanner {
this.textBox = ((System.Windows.Controls.TextBox)(target));
return;
case 4:
this.pass = ((System.Windows.Controls.TextBox)(target));
this.RUrate = ((System.Windows.Controls.TextBox)(target));
return;
}
this._contentLoaded = true;
......
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "9C402D27C8DAE609477A515BE5E3E11AED27EC8B"
#pragma checksum "..\..\MainWindow.xaml" "{ff1816ec-aa5e-4d10-87f7-6f4963833460}" "82CA724FCEE02F7AA65BAF30FD893EB0C35722F7"
//------------------------------------------------------------------------------
// <auto-generated>
// このコードはツールによって生成されました。
......@@ -67,7 +67,7 @@ namespace iBeaconScanner {
#line 13 "..\..\MainWindow.xaml"
[System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
internal System.Windows.Controls.TextBox pass;
internal System.Windows.Controls.TextBox RUrate;
#line default
#line hidden
......@@ -112,7 +112,7 @@ namespace iBeaconScanner {
this.textBox = ((System.Windows.Controls.TextBox)(target));
return;
case 4:
this.pass = ((System.Windows.Controls.TextBox)(target));
this.RUrate = ((System.Windows.Controls.TextBox)(target));
return;
}
this._contentLoaded = true;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment