41 lines
1.0 KiB
C#
41 lines
1.0 KiB
C#
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 qtc_net_client_2.Forms
|
|
{
|
|
public partial class ConnectionClosed : Form
|
|
{
|
|
public string? Reason { get; set; } = string.Empty;
|
|
public ConnectionClosed(string? reason = "")
|
|
{
|
|
Reason = reason;
|
|
InitializeComponent();
|
|
}
|
|
|
|
private void frmConnectionClosed_Load(object sender, EventArgs e)
|
|
{
|
|
if (string.IsNullOrEmpty(Reason)) lblReason.Visible = false;
|
|
else lblReason.Text = $"Reason: {Reason}";
|
|
}
|
|
|
|
private void btnReconnect_Click(object sender, EventArgs e)
|
|
{
|
|
DialogResult = DialogResult.OK;
|
|
Close();
|
|
}
|
|
|
|
private void btnQuit_Click(object sender, EventArgs e)
|
|
{
|
|
DialogResult = DialogResult.Cancel;
|
|
Close();
|
|
}
|
|
}
|
|
}
|