Inheritance: Queue.UI.WinForms.DependencyForm
コード例 #1
0
ファイル: ClientsForm.cs プロジェクト: breslavsky/queue
        private void addButton_Click(object sender, EventArgs e)
        {
            using (var f = new EditClientForm())
            {
                DataGridViewRow row = null;

                f.Saved += (s, eventArgs) =>
                {
                    if (row == null)
                    {
                        row = clientsGridView.Rows[clientsGridView.Rows.Add()];
                        row.Selected = true;
                    }
                    ClientsGridViewRenderRow(row, f.Client);
                    f.Close();
                };

                f.ShowDialog();
            }
        }
コード例 #2
0
 private void clientEditLink_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
 {
     using (var f = new EditClientForm(clientRequest.Client.Id))
     {
         if (f.ShowDialog() == DialogResult.OK)
         {
             clientTextBlock.Text = f.Client.ToString();
         }
     }
 }
コード例 #3
0
ファイル: ClientsForm.cs プロジェクト: breslavsky/queue
        private void clientsGridView_CellMouseDoubleClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                var row = clientsGridView.Rows[e.RowIndex];
                Client client = row.Tag as Client;

                using (var f = new EditClientForm(client.Id))
                {
                    f.Saved += (s, eventArgs) =>
                    {
                        ClientsGridViewRenderRow(row, f.Client);
                        f.Close();
                    };

                    f.ShowDialog();
                }
            }
        }