public MainForm() { InitializeComponent(); mainPanel = panel1; TicketsList rf = new TicketsList(); panel1.Controls.Clear(); panel1.Controls.Add(rf); }
private void BtnCreateTicket_Click(object sender, EventArgs e) { using (var TF = new TicketForm()) { if (TF.ShowDialog() == DialogResult.OK) { TicketsList.Insert(0, TF.Ticket); if (btnShowAll.Checked || btnShowOpened.Checked) { InsertTicketPanelAt0(TF.Ticket); } } } }
private async void LogInDialogShow() { using (var LIF = new LogInForm()) { if (LIF.ShowDialog() == DialogResult.OK) { MyAccount = LIF.MyAccount; EnableFormData(); await ReadTickets(MyAccount.Id); ShowTickets(TicketsList.FindAll(t => t.ClosedAt == null)); } } }
private void ViewTickets_Click(object sender, EventArgs e) { btnShowAll.Checked = btnShowOpened.Checked = btnShowClosed.Checked = false; ToolStripButton btnClicked = (ToolStripButton)sender; btnClicked.Checked = true; if (btnShowAll.Checked) { ShowTickets(TicketsList); } else if (btnShowOpened.Checked) { ShowTickets(TicketsList.FindAll(t => t.ClosedAt == null)); } else if (btnShowClosed.Checked) { ShowTickets(TicketsList.FindAll(t => t.ClosedAt != null)); } }