Exemple #1
0
 public Form1()
 {
     InitializeComponent();
     domainLeft = ConnectionUtils.GetInstance().UserDetailsFromGeoApi();
     InitLeftValues(domainLeft);
     ofd = new OpenFileDialog();
     ofd.Filter = "CSV files (*.csv) | *.csv;";
 }
Exemple #2
0
 private void bCheckR_Click(object sender, EventArgs e)
 {
     domainRight = ConnectionUtils.GetInstance().HostDetailsFromGeoApi(tbIPR.Text);
     InitRightValues(domainRight);
 }
Exemple #3
0
 private void bCheckL_Click(object sender, EventArgs e)
 {
     domainLeft = ConnectionUtils.GetInstance().HostDetailsFromGeoApi(tbIPL.Text);
     InitLeftValues(domainLeft);
 }
Exemple #4
0
        private void InitRightValues(GeoApiResponse geoApiResponse)
        {
            if (geoApiResponse != null)
            {
                tbStatusR.Text = geoApiResponse.status;
                tbCountryR.Text = geoApiResponse.country;
                tbRegionNameR.Text = geoApiResponse.regionName;
                tbCityR.Text = geoApiResponse.regionName;
                tbZipCodeR.Text = geoApiResponse.zip;
                textBox7.Text = "" + geoApiResponse.lat;
                tbLonR.Text = "" + geoApiResponse.lon;
                tbTimezoneR.Text = geoApiResponse.timezone;
                tbIspNameR.Text = geoApiResponse.isp;
                tbOrganizationNameR.Text = geoApiResponse.org;
                tbAsNumberR.Text = geoApiResponse.@as;

                FillDistanceBetweenDomains();
                FillRTTAndHopCountRight(domainRight);
            }
        }
Exemple #5
0
        private void InitLeftValues(GeoApiResponse geoApiResponse)
        {
            if (geoApiResponse != null)
            {
                tbStatusL.Text = geoApiResponse.status;
                tbCountryL.Text = geoApiResponse.country;
                tbRegionNameL.Text = geoApiResponse.regionName;
                tbCityL.Text = geoApiResponse.regionName;
                tbZipCodeL.Text = geoApiResponse.zip;
                tbLatL.Text = "" + geoApiResponse.lat;
                tbLonL.Text = "" + geoApiResponse.lon;
                tbTimezoneL.Text = geoApiResponse.timezone;
                tbIspNameL.Text = geoApiResponse.isp;
                tbOrganizationNameL.Text = geoApiResponse.org;
                tbAsNumberL.Text = geoApiResponse.@as;

                FillDistanceBetweenDomains();
                FillRTTAndHopCountLeft(domainLeft);
            }
        }
Exemple #6
0
 private void FillRTTAndHopCountRight(GeoApiResponse geoApiResponse)
 {
     if (geoApiResponse.status.Equals(SUCCESS))
     {
         tbRTTR.Text = ConnectionUtils.GetInstance().PingHost(IPAddress.Parse(geoApiResponse.query)).RoundtripTime + "";
         tbDistanceIPR.Text = ConnectionUtils.GetInstance().PerformPathping(IPAddress.Parse(geoApiResponse.query)).Length + "";
     }
 }