Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            NewCustomFieldDialog dialog = new NewCustomFieldDialog(connection);
            if (dialog.ShowDialog() != DialogResult.OK)
                return;

            CustomFieldDefinition definition = dialog.Definition;

            DelegatedAsyncAction action = new DelegatedAsyncAction(connection,
                String.Format(Messages.ADD_CUSTOM_FIELD, definition.Name),
                String.Format(Messages.ADDING_CUSTOM_FIELD, definition.Name),
                String.Format(Messages.ADDED_CUSTOM_FIELD, definition.Name),
                delegate(Session session)
                {
                    CustomFieldsManager.AddCustomField(session, connection, definition);
                });
            action.RunAsync();
        }
Ejemplo n.º 2
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            NewCustomFieldDialog dialog = new NewCustomFieldDialog(connection);

            if (dialog.ShowDialog() != DialogResult.OK)
            {
                return;
            }

            CustomFieldDefinition definition = dialog.Definition;

            DelegatedAsyncAction action = new DelegatedAsyncAction(connection,
                                                                   String.Format(Messages.ADD_CUSTOM_FIELD, definition.Name),
                                                                   String.Format(Messages.ADDING_CUSTOM_FIELD, definition.Name),
                                                                   String.Format(Messages.ADDED_CUSTOM_FIELD, definition.Name),
                                                                   delegate(Session session)
            {
                CustomFieldsManager.AddCustomField(session, connection, definition);
            });

            action.RunAsync();
        }