Implementation



Overview

The system follows the normal structure of a front-end Windows application built with the WPF framework.
The FISECARE.csproj file contains the configurations for the project, including for the pictures, media and imported scripts.
All remaining files in the root directory are paired, matching in name and varying only in the extension: .xaml and .xaml.cs.
The App files are the main function of the application. They host the MainWindow, which in its turn is the canvas for all pages.

Homepage

The homepage is the initial page of the application. From here, the user can check the time and navigate to the remaining pages. It also has a video wallpaper in the background.



The selection of the wallpaper is done in the HomePage.xaml.cs file. When the page has finished loading (triggering the OnLoaded event), the names of all the wallpaper files are retrieved and one is chosen at random to be displayed on the wallpaper MediaElement in the background of the page.

Services Page

The Services page functions as a second homepage to the system. From here, the users can access the majority of our system pages, as well as read the news feed and the weather forecast.



The news feed and the weather forecast both use RSS feeds as data sources. We used the XmlReader and SyndicationFeed classes to load the information and access it throught its properties (ex.: item.Title and item.Summary). Below, you can see the code to load the news feeds, exemplifying the functionality we describe.

Buttons and Navigation

FISECARE uses buttons throughout the application.



Each button has a Click event handler which navigates the user to different pages of the application. For the navigation process, we used the NavigationService class. When navigating to a new page, we instantiate a new Page object. When navigating back, the NavigationService navigates the user to the previous page which is stored it the back navigation history.

Integrating Web Browsers

Most buttons in FISECARE take the user to a page with an embedded web browser that has a specific URL source.



We used Microsoft Edge Webview2 to embed a web browser onto the page. The URL for each mode is stored in a JSON file. Once the application is launched, the URLs are loaded from the JSON file into a dictionary. After the page with Webview is instantiated, the page accessed the URL in the dictionary using the mode name and loaded the URL onto the web browser.

Sending Email

The sending email feature is used in the Carer and Family pages. The program reads the list of email addresses of the receivers from a text file and adds it to the combo box on the Family page. The user is expected to select the recipient’s email from the combo box and fill in the message box by clicking on the microphone button and speaking. Once this is done, the user can click send to send the email.



The sending email process is in the EmailSender.cs file. The EmailSender class gets the username and password of the sender along with the SMTP host name and port from a JSON file. After that, it initialises the SmtpClient object and uses the username and password provided to authenticate the sender. The SmtpClient object, then, sends the email to the destination. Finally, the message is then displayed that the email has been successfully sent or failed to send.

ASK-Kita Integration

The Ask-KITA executable file is included in the project directory. To run Ask-KITA, FISECARE starts a new process on ASK-Kita.