Skip to content

Commit 7e1a4e6

Browse files
author
a.hosseini
committed
add Minimum Count Of Valid Ip and Count Of Repeat Test For Each Ip property to ipOption Model and and ipOption Page
1 parent 79ea2cd commit 7e1a4e6

File tree

6 files changed

+41
-5
lines changed

6 files changed

+41
-5
lines changed

fast cf ip scanner/Model/IpOptionModel.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,11 @@ namespace fast_cf_ip_scanner.Model
88
{
99
public class IpOptionModel
1010
{
11-
public IpOptionModel()
12-
{
13-
}
14-
1511
public List<string> Ports { get; set; } = Constants.HttpPorts.Concat(Constants.HttpsPorts).ToList();
1612

1713
public string MaxPingOfIP { get; set; } = "1000";
1814

15+
public int MinimumCountOfValidIp { get; set; } = 5;
16+
public int CountOfRepeatTestForEachIp { get; set; } = 3;
1917
}
2018
}

fast cf ip scanner/ViewModels/ScanPageViewModel.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11

2+
using AndroidX.Navigation.Fragment;
23
using CommunityToolkit.Mvvm.Input;
34
using fast_cf_ip_scanner.Views;
45
using Microsoft.Maui.ApplicationModel.DataTransfer;
6+
using Microsoft.Maui.Controls;
57

68
namespace fast_cf_ip_scanner.ViewModels
79
{
@@ -92,7 +94,7 @@ int ConvertMaxPingOfIPToInt(string maxPing)
9294
[RelayCommand]
9395
async Task ShowOptionsForSearchIp()
9496
{
95-
await App.Current.MainPage.DisplayActionSheet($"What to Do With","c","a","a");
97+
9698
}
9799

98100

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
4+
x:Class="fast_cf_ip_scanner.Views.IpOptions"
5+
Title="IpOptions">
6+
<StackLayout Padding="20">
7+
<Label Text="Ports:"/>
8+
<Picker x:Name="PortsPicker" ItemsSource="{Binding Ports}"/>
9+
10+
<Label Text="Max Ping of IP:"/>
11+
<Entry x:Name="MaxPingEntry" Text="{Binding MaxPingOfIP}"/>
12+
13+
<Label Text="Minimum Count of Valid IP:"/>
14+
<Entry x:Name="MinCountEntry" Text="{Binding MinimumCountOfValidIp}"/>
15+
16+
<Label Text="Count of Repeat Test for Each IP:"/>
17+
<Entry x:Name="RepeatCountEntry" Text="{Binding CountOfRepeatTestForEachIp}"/>
18+
</StackLayout>
19+
</ContentPage>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
namespace fast_cf_ip_scanner.Views;
2+
3+
public partial class IpOptions : ContentPage
4+
{
5+
public IpOptions(IpOptionModel ipOptions)
6+
{
7+
InitializeComponent();
8+
BindingContext = ipOptions;
9+
}
10+
}

fast cf ip scanner/Views/ScanPage.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ public ScanPage(ScanPageViewModel viewModel)
66
{
77
InitializeComponent();
88
BindingContext = viewModel;
9+
910
}
1011
}

fast cf ip scanner/fast cf ip scanner.csproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@
5858
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.0" />
5959
</ItemGroup>
6060
<ItemGroup>
61+
<Compile Update="Views\IpOptions.xaml.cs">
62+
<DependentUpon>IpOptions.xaml</DependentUpon>
63+
</Compile>
6164
<Compile Update="Views\SettingPage.xaml.cs">
6265
<DependentUpon>SettingPage.xaml</DependentUpon>
6366
</Compile>
@@ -66,6 +69,9 @@
6669
</Compile>
6770
</ItemGroup>
6871
<ItemGroup>
72+
<MauiXaml Update="Views\IpOptions.xaml">
73+
<Generator>MSBuild:Compile</Generator>
74+
</MauiXaml>
6975
<MauiXaml Update="Views\SettingPage.xaml">
7076
<Generator>MSBuild:Compile</Generator>
7177
</MauiXaml>

0 commit comments

Comments
 (0)