예제 #1
0
        public MainForm()
        {
            InitializeComponent();
            mainPanel = panel1;

            TicketsList rf = new TicketsList();

            panel1.Controls.Clear();
            panel1.Controls.Add(rf);
        }
예제 #2
0
 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);
             }
         }
     }
 }
예제 #3
0
        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));
                }
            }
        }
예제 #4
0
        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));
            }
        }