You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
98 lines
2.9 KiB
98 lines
2.9 KiB
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 AppointmentsUi
|
|
{
|
|
public partial class MainForm : Form
|
|
{
|
|
public MainForm()
|
|
{
|
|
InitializeComponent();
|
|
|
|
EmbedForm<Views.EmptyPage>();
|
|
}
|
|
|
|
internal T EmbedForm<T>() where T : Form, new()
|
|
{
|
|
T embedded = new T() { TopLevel = false, TopMost = true, FormBorderStyle = FormBorderStyle.None, Dock = DockStyle.Fill, AutoSize = false, Parent = this };
|
|
embeddingContainer.Controls.Clear();
|
|
embeddingContainer.Controls.Add(embedded);
|
|
embedded.Show();
|
|
|
|
return embedded;
|
|
}
|
|
|
|
private void toolstripAboutButton_Click(object sender, EventArgs e)
|
|
{
|
|
MessageBox.Show("vewry guud program mehd by finno");
|
|
}
|
|
|
|
private void tooltipAppointsmentsButton_ButtonClick(object sender, EventArgs e)
|
|
{
|
|
MessageBox.Show("appointments button click");
|
|
}
|
|
|
|
private void toolstripAppointsmentsAddNewButton_Click(object sender, EventArgs e)
|
|
{
|
|
MessageBox.Show("appointments add button click");
|
|
}
|
|
|
|
private void toolstripContactsButton_ButtonClick(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.ContactsList>();
|
|
}
|
|
|
|
private void toolstripContactsAddNewButton_Click(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.ContactsList>().addContact();
|
|
}
|
|
|
|
private void toolstripCompaniesButton_ButtonClick(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.CompanyList>();
|
|
}
|
|
|
|
private void toolstripCompaniesAddNewButton_Click(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.CompanyList>().addCompany();
|
|
}
|
|
|
|
private void toolStripSplitButton1_ButtonClick(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.PhoneTypesList>();
|
|
}
|
|
|
|
private void toolStripMenuItem1_Click(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.PhoneTypesList>().addPhoneType();
|
|
}
|
|
|
|
private void toolstripSalutationsButton_ButtonClick(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.SalutationsList>();
|
|
}
|
|
|
|
private void toolstripSalutationsAddNewButton_Click(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.SalutationsList>().addSalutation();
|
|
}
|
|
|
|
private void toolstripPostalsButton_ButtonClick(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.PostalsList>();
|
|
}
|
|
|
|
private void toolstripPostalsAddNewButton_Click(object sender, EventArgs e)
|
|
{
|
|
EmbedForm<Views.PostalsList>().addPostal();
|
|
}
|
|
}
|
|
}
|