예제 #1
0
        private void FileMenuNewClient_Click(object sender, RoutedEventArgs e)
        {
            CreateEditClientWindow createEditClientWindow = new CreateEditClientWindow();

            if (createEditClientWindow.ShowDialog().GetValueOrDefault())
            {
                Clients.Add(createEditClientWindow.Client);
                UpdateGUI();
            }
        }
예제 #2
0
        private void ClientMenuItem_Click(object sender, RoutedEventArgs e)
        {
            if (sender is MenuItem menuItem)
            {
                foreach (var Client in Clients)
                {
                    if (menuItem.Header.ToString() == Client.ToString())
                    {
                        var createEditClientWindow = new CreateEditClientWindow(Client);

                        if (createEditClientWindow.ShowDialog().GetValueOrDefault())
                        {
                            UpdateGUI();
                        }

                        return;
                    }
                }
            }
        }