1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Xamarin.Forms;
- using InABox.Clients;
- using System.Threading;
- using Xamarin.Essentials;
- using Comal.Classes;
- using InABox.Core;
- namespace ConnectionTest
- {
- public partial class MainPage : ContentPage
- {
- List<string> urls = new List<string>
- {
- "remote.com-al.com.au:8000",
- //"remote2.com-al.com.au:8000",
- //"remote.prsdigital.com.au:8005",
- //"remote2.prsdigital.com.au:8005",
- //"remote.com-al.com.au:8020",
- };
- public MainPage()
- {
- InitializeComponent();
- CoreUtils.RegisterClasses();
- ComalUtils.RegisterClasses();
- foreach (var url in urls)
- {
- var test = new ConnectionTestUnit(url);
- test.OnRemoveURL += Test_OnRemoveURL;
- stacklayout.Children.Add(test);
- }
- }
- private void Test_OnRemoveURL(View view)
- {
- stacklayout.Children.Remove(view);
- }
- private void AddButton_Clicked(object sender, EventArgs e)
- {
- if (!string.IsNullOrWhiteSpace(urlEnt.Text))
- {
- var test = new ConnectionTestUnit(urlEnt.Text);
- test.OnRemoveURL += Test_OnRemoveURL;
- stacklayout.Children.Add(test);
- urlEnt.Text = "";
- }
- }
- }
- }
|