Exemplo n.º 1
0
        //---------------------------------------------------------------------
        protected void Base_Load()
        {
            clientForm = Owner as ClientForm;

            cbGender.AutoCompleteSource = AutoCompleteSource.ListItems;
            cbGender.AutoCompleteMode   = AutoCompleteMode.SuggestAppend;
            cbGender.Items.AddRange
            (
                (clientForm.Owner as Form1).Genders
                .Select(g => g.Name)
                .ToArray()
            );

            cbGender.DrawMode        = DrawMode.OwnerDrawFixed;
            cbGender.DrawItem       += cbGender_DrawItem;
            cbGender.DropDownClosed += cbGender_DropDownClosed;
        }
        private void ShowClient_OnClick(object sender, RoutedEventArgs e)
        {
            ClientForm window = new ClientForm();

            window.ShowDialog();
        }