-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainForm.cs
63 lines (53 loc) · 1.67 KB
/
mainForm.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
using OpenQA.Selenium.Support.UI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Review_Catcher
{
public partial class mainForm : Form
{
public mainForm()
{
InitializeComponent();
}
private void checkUrl_Click(object sender, EventArgs e)
{
checkUrl.Enabled = false;
Controller.navigateToUrl(url.Text);
hotelName.Text = Hotel.getHotelName();
hotelLocation.Text = Hotel.getHotelLocation();
//totalReview.Text = Hotel.getTotalReview();
totalExcellentReview.Text = Hotel.getTotalExcellentReview();
//totalEnglishReview.Text = Hotel.getTotalEnglishReview();
totalEstimateReview.Text = Hotel.getEstimateReview();
checkUrl.Enabled = true;
enableProceedButton();
}
private void mainForm_FormClosed(object sender, FormClosedEventArgs e)
{
Controller.closeBrowser();
Application.Exit();
}
private void open_Click(object sender, EventArgs e)
{
Excel.openReviewFile();
fileName.Text = Excel.getFileName();
enableProceedButton();
}
private void proceed_Click(object sender, EventArgs e)
{
Excel.writeFileTest();
MessageBox.Show("Done!");
}
private void enableProceedButton()
{
proceed.Enabled = Controller.checkReadinessToProceed();
}
}
}