Add project files.
This commit is contained in:
35
WinFormDi/MainWindow.cs
Normal file
35
WinFormDi/MainWindow.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using DIDemoLib;
|
||||
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 WinFormDi
|
||||
{
|
||||
public partial class MainWindow : Form
|
||||
{
|
||||
private readonly IMessages _messages;
|
||||
|
||||
public MainWindow(IMessages messages)
|
||||
{
|
||||
InitializeComponent();
|
||||
_messages = messages;
|
||||
}
|
||||
|
||||
private void MainWindow_Load(object sender, EventArgs e)
|
||||
{
|
||||
helloText.Text= _messages.SayHello();
|
||||
}
|
||||
|
||||
private void MainWindow_FormClosing(object sender, FormClosingEventArgs e)
|
||||
{
|
||||
goodbyeText.Text= _messages.SayGoodBye();
|
||||
MessageBox.Show("Closing...", "Warning", MessageBoxButtons.OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user