Exemple #1
0
        /// <summary>
        /// Initialize TabElements
        /// </summary>
        protected override void InitializeTabElements()
        {
            //set sort on View bindingSource
            vTagsBindingSource.Sort = "name";

            //set Readonly OnSetEditingMode for Controls
            DisableReadonlyCheckOnSetEditingModeControlCollection.Add(typeof(DataGridView));

            //set Main BindingSource
            BindingSourceMain = vTagsBindingSource;
            GetDataSourceMain = GetDataSource_main;

            //set Main TabControl
            TabControlMain = tabControl_main;

            //set Main Panels
            PanelFiltersMain = null;
            PanelListMain    = panel_list;
            PanelsExtraMain  = null;

            //set tabTags
            tabElement_tabTags = new TabElement()
            {
                TabPageElement = tabPage_tabTags,
                ElementItem    = new TabElement.TabElementItem()
                {
                    PanelData    = panel_tabTags_data,
                    PanelActions = panel_tabTags_actions,
                    PanelUpdates = panel_tabTags_updates,

                    ParentBindingSourceList = vTagsBindingSource,
                    GetParentDataSourceList = GetDataSource_main,

                    BindingSourceEdit = tagsBindingSource,
                    GetDataSourceEdit = GetDataSourceEdit_tabTags,
                    AfterSaveAction   = AfterSaveAction_tabTags,

                    AddButton    = button_tabTags_new,
                    UpdateButton = button_tabTags_edit,
                    RemoveButton = button_tabTags_delete,
                    SaveButton   = button_tabTags_save,
                    CancelButton = button_tabTags_cancel,

                    Add    = Add_tabTags,
                    Update = Update_tabTags,
                    Remove = Remove_tabTags
                }
            };

            //set Elements
            TabElements.Add(tabElement_tabTags);
        }
        /// <summary>
        /// Initialize TabElements
        /// </summary>
        protected override void InitializeTabElements()
        {
            //set Readonly OnSetEditingMode for Controls
            DisableReadonlyCheckOnSetEditingModeControlCollection.Add(typeof(DataGridView));
            DisableReadonlyCheckOnSetEditingModeControlCollection.Add(typeof(AdvancedDataGridView));

            //set Main BindingSource
            BindingSourceMain = vPatientsAttachmentsTypesBindingSource;
            GetDataSourceMain = GetDataSource_main;

            //set Main TabControl
            TabControlMain = tabControl_main;

            //set Main Panels
            PanelFiltersMain = panel_filters;
            PanelListMain    = panel_list;
            PanelsExtraMain  = null;

            //set tabPatientsAttachmentsTypes
            tabElement_tabPatientsAttachmentsTypes = new TabElement()
            {
                TabPageElement = tabPage_tabPatientsAttachmentsTypes,
                ElementItem    = new TabElement.TabElementItem()
                {
                    PanelData    = panel_tabPatientsAttachmentsTypes_data,
                    PanelActions = panel_tabPatientsAttachmentsTypes_actions,
                    PanelUpdates = panel_tabPatientsAttachmentsTypes_updates,

                    ParentBindingSourceList = vPatientsAttachmentsTypesBindingSource,
                    GetParentDataSourceList = GetDataSource_main,

                    BindingSourceEdit = patientsattachmentstypesBindingSource,
                    GetDataSourceEdit = GetDataSourceEdit_tabPatientsAttachmentsTypes,
                    AfterSaveAction   = AfterSaveAction_tabPatientsAttachmentsTypes,

                    AddButton = button_tabPatientsAttachmentsTypes_new,
                    IsAddButtonDefaultClickEventAttached = false,
                    UpdateButton = button_tabPatientsAttachmentsTypes_edit,
                    RemoveButton = button_tabPatientsAttachmentsTypes_delete,
                    SaveButton   = button_tabPatientsAttachmentsTypes_save,
                    CancelButton = button_tabPatientsAttachmentsTypes_cancel,

                    Add    = Add_tabPatientsAttachmentsTypes,
                    Update = Update_tabPatientsAttachmentsTypes,
                    Remove = Remove_tabPatientsAttachmentsTypes
                }
            };

            //set Elements
            TabElements.Add(tabElement_tabPatientsAttachmentsTypes);
        }
Exemple #3
0
        /// <summary>
        /// Initialize TabElements
        /// </summary>
        protected override void InitializeTabElements()
        {
            //set sort on View bindingSource
            vBlogsBindingSource.Sort          = "title";
            vPostsBindingSource.Sort          = "title";
            vCommentsBindingSource.Sort       = "text";
            vCommentsUsefulBindingSource.Sort = "points";

            //set Readonly OnSetEditingMode for Controls
            DisableReadonlyCheckOnSetEditingModeControlCollection.Add(typeof(DataGridView));

            //set Main BindingSource
            BindingSourceMain = vBlogsBindingSource;
            GetDataSourceMain = GetDataSource_main;

#if MULTISELECT
            //set Main list multiselect
            IsBindingSourceMainMultiselect = true;
#endif

            //set Main TabControl
            TabControlMain = tabControl_main;

            //set Main Panels
            PanelFiltersMain = panel_filters;
            PanelListMain    = panel_list;
            PanelsExtraMain  = null;

            //commentsuseful Element
            tabElement_tabPostslist_tabCommentslist_tabCommentsuseful.TabPageElement  = tabPage_tabPostslist_tabCommentslist_tabCommentsuseful;
            tabElement_tabPostslist_tabCommentslist_tabCommentsuseful.ElementListItem = new TabElement.TabElementListItem()
            {
                PanelFilters = null,
                PanelList    = panel_tabPostslist_tabCommentslist_tabCommentsuseful_list,

                PanelData    = panel_tabPostslist_tabCommentslist_tabCommentsuseful_data,
                PanelActions = panel_tabPostslist_tabCommentslist_tabCommentsuseful_actions,
                PanelUpdates = panel_tabPostslist_tabCommentslist_tabCommentsuseful_updates,

                BindingSourceList      = vCommentsUsefulBindingSource,
                GetDataSourceList      = GetDataSourceList_tabPostslist_tabCommentsuseful,
                GetDataSourceEmptyList = GetDataSourceEmptyList_tabPostslist_tabCommentsuseful,

#if MULTISELECT
                CountSelectedItems             = CountSelectedItems_tabPostslist_tabCommentslist_tabCommentsuseful,
                GetSelectedItems               = GetSelectedItems_tabPostslist_tabCommentslist_tabCommentsuseful,
                IsBindingSourceListMultiselect = true,
#endif

                BindingSourceEdit = commentsusefulBindingSource,
                GetDataSourceEdit = GetDataSourceEdit_tabPostslist_tabCommentslist_tabCommentsuseful,
                AfterSaveAction   = AfterSaveAction_tabPostslist_tabCommentslist_tabCommentsuseful,

                AddButton = button_tabPostslist_tabCommentslist_tabCommentsuseful_new,
                IsAddButtonDefaultClickEventAttached = false,
                UpdateButton = button_tabPostslist_tabCommentslist_tabCommentsuseful_edit,
                RemoveButton = button_tabPostslist_tabCommentslist_tabCommentsuseful_delete,
                SaveButton   = button_tabPostslist_tabCommentslist_tabCommentsuseful_save,
                CancelButton = button_tabPostslist_tabCommentslist_tabCommentsuseful_cancel,

                Add    = Add_tabPostslist_tabCommentslist_tabCommentsuseful,
                Update = Update_tabPostslist_tabCommentslist_tabCommentsuseful,
                Remove = Remove_tabPostslist_tabCommentslist_tabCommentsuseful
            };
            tabElement_tabPostslist_tabCommentslist_tabCommentsuseful.ElementListItem.BindingSourceListChanged += tabPostslist_tabCommentslist_BindingSourceListChanged;
            tabElement_tabPostslist_tabCommentslist_tabCommentsuseful.ElementListItem.BindingSourceEditChanged += tabPostslist_tabCommentslist_BindingSourceEditChanged;

            //comments Element
            tabElement_tabPostslist_tabCommentslist_tabComments.TabPageElement = tabPage_tabPostslist_tabCommentslist_tabComments;
            tabElement_tabPostslist_tabCommentslist_tabComments.ElementItem    = new TabElement.TabElementItem()
            {
                PanelData    = panel_tabPostslist_tabCommentslist_tabComments_data,
                PanelActions = panel_tabPostslist_tabCommentslist_tabComments_actions,
                PanelUpdates = panel_tabPostslist_tabCommentslist_tabComments_updates,

                ParentBindingSourceList = vCommentsBindingSource,
                GetParentDataSourceList = GetDataSourceList_tabPostslist_tabComments,

                BindingSourceEdit = commentsBindingSource,
                GetDataSourceEdit = GetDataSourceEdit_tabPostslist_tabCommentslist_tabComments,
                AfterSaveAction   = AfterSaveAction_tabPostslist_tabCommentslist_tabComments,

                AddButton = button_tabPostslist_tabCommentslist_tabComments_new,
                IsAddButtonDefaultClickEventAttached = false,
                UpdateButton = button_tabPostslist_tabCommentslist_tabComments_edit,
                RemoveButton = button_tabPostslist_tabCommentslist_tabComments_delete,
                SaveButton   = button_tabPostslist_tabCommentslist_tabComments_save,
                CancelButton = button_tabPostslist_tabCommentslist_tabComments_cancel,

                Add    = Add_tabPostslist_tabCommentslist_tabComments,
                Update = Update_tabPostslist_tabCommentslist_tabComments,
                Remove = Remove_tabPostslist_tabCommentslist_tabComments
            };

            //commentslist Element
            tabElement_tabPostslist_tabCommentslist.TabPageElement  = tabPage_tabPostslist_tabCommentslist;
            tabElement_tabPostslist_tabCommentslist.ElementListTabs = new TabElement.TabElementListTabs()
            {
                PanelFilters = null,
                PanelList    = panel_tabPostslist_tabCommentslist_list,
                PanelData    = panel_tabPostslist_tabCommentslist_data,

                BindingSourceList      = vCommentsBindingSource,
                GetDataSourceList      = GetDataSourceList_tabPostslist_tabComments,
                GetDataSourceEmptyList = GetDataSourceEmptyList_tabPostslist_tabComments,

#if MULTISELECT
                CountParentSelectedItems = CountParentSelectedItems_tabPostslist_tabComments,
#endif

                TabControlElement = tabControl_tabPostslist_tabCommentslist,
                TabElements       = new List <TabElement>()
                {
                    tabElement_tabPostslist_tabCommentslist_tabComments,
                    tabElement_tabPostslist_tabCommentslist_tabCommentsuseful
                }
            };

            //posts Element
            tabElement_tabPostslist_tabPosts.TabPageElement = tabPage_tabPostslist_tabPosts;
            tabElement_tabPostslist_tabPosts.ElementItem    = new TabElement.TabElementItem()
            {
                PanelData    = panel_tabPostslist_tabPosts_data,
                PanelActions = panel_tabPostslist_tabPosts_actions,
                PanelUpdates = panel_tabPostslist_tabPosts_updates,

                ParentBindingSourceList = vPostsBindingSource,
                GetParentDataSourceList = GetParentDataSourceList_tabPosts,

#if MULTISELECT
                CountParentSelectedItems = CountParentSelectedItems_tabPostslist_tabPosts,
                GetParentSelectedItems   = GetSelectedItems_tabPostslist_tabPosts,
#endif

                BindingSourceEdit = postsBindingSource,
                GetDataSourceEdit = GetDataSourceEdit_tabPostslist_tabPosts,
                AfterSaveAction   = AfterSaveAction_tabPostslist_tabPosts,

                AddButton = button_tabPostslist_tabPosts_new,
                IsAddButtonDefaultClickEventAttached = false,
                UpdateButton = button_tabPostslist_tabPosts_edit,
                RemoveButton = button_tabPostslist_tabPosts_delete,
                SaveButton   = button_tabPostslist_tabPosts_save,
                CancelButton = button_tabPostslist_tabPosts_cancel,

                Add    = Add_tabPostslist_tabPosts,
                Update = Update_tabPostslist_tabPosts,
                Remove = Remove_tabPostslist_tabPosts
            };

            //blogs Element
            tabElement_tabBlogs.TabPageElement = tabPage_tabBlogs;
            tabElement_tabBlogs.ElementItem    = new TabElement.TabElementItem()
            {
                PanelData    = panel_tabBlogs_data,
                PanelActions = panel_tabBlogs_actions,
                PanelUpdates = panel_tabBlogs_updates,

                ParentBindingSourceList = vBlogsBindingSource,
                GetParentDataSourceList = GetDataSource_main,

#if MULTISELECT
                CountParentSelectedItems = CountParentSelectedItems_tabBlogs,
                GetParentSelectedItems   = GetSelectedItems_tabBlogs,
#endif

                BindingSourceEdit = blogsBindingSource,
                GetDataSourceEdit = GetDataSourceEdit_tabBlogs,
                AfterSaveAction   = AfterSaveAction_tabBlogs,

                AddButton = button_tabBlogs_new,
                IsAddButtonDefaultClickEventAttached = false,
                UpdateButton = button_tabBlogs_edit,
                RemoveButton = button_tabBlogs_delete,
                SaveButton   = button_tabBlogs_save,
                CancelButton = button_tabBlogs_cancel,

                Add    = Add_tabBlogs,
                Update = Update_tabBlogs,
                Remove = Remove_tabBlogs
            };

            //postslist Element
            tabElement_tabPostslist.TabPageElement  = tabPage_tabPostslist;
            tabElement_tabPostslist.ElementListTabs = new TabElement.TabElementListTabs()
            {
                PanelFilters = null,
                PanelList    = panel_tabPostslist_list,
                PanelData    = panel_tabPostslist_data,

                BindingSourceList      = vPostsBindingSource,
                GetDataSourceList      = GetParentDataSourceList_tabPosts,
                GetDataSourceEmptyList = GetParentDataSourceEmptyList_tabPosts,

#if MULTISELECT
                CountParentSelectedItems       = CountParentSelectedItems_tabPostslist,
                IsBindingSourceListMultiselect = true,
#endif

                TabControlElement = tabControl_tabPostslist,
                TabElements       = new List <TabElement>()
                {
                    tabElement_tabPostslist_tabPosts,
                    tabElement_tabPostslist_tabCommentslist
                }
            };

            TabElements.Add(tabElement_tabBlogs);
            TabElements.Add(tabElement_tabPostslist);
        }
Exemple #4
0
        /// <summary>
        /// Initialize TabElements
        /// </summary>
        protected override void InitializeTabElements()
        {
            //set sort on View bindingSource
            vPostsBindingSource.Sort = "title";

            //set Readonly OnSetEditingMode for Controls
            DisableReadonlyCheckOnSetEditingModeControlCollection.Add(typeof(DataGridView));

            //set Main BindingSource
            BindingSourceMain = vPostsBindingSource;
            GetDataSourceMain = GetDataSource_main;

            //set Main TabControl
            TabControlMain = tabControl_main;

            //set Main Panels
            PanelFiltersMain = panel_filters;
            PanelListMain    = panel_list;
            PanelsExtraMain  = new Panel[] { panel_add1 };

            //poststotagsadditionals
            tabElement_tabPostsextra_tabPoststotags = new TabElement()
            {
                TabPageElement  = tabPage_tabPostsextra_tabPoststotags,
                ElementListItem = new TabElement.TabElementListItem()
                {
                    PanelData    = null,
                    PanelActions = panel_tabPostsextra_tabPoststotags_actions,
                    PanelUpdates = null,

                    BindingSourceList = vPostsToTagsBindingSource,
                    GetDataSourceList = GetDataSourceList_tabPostsextra_tabPoststotags,

                    BindingSourceEdit = poststotagsBindingSource,
                    GetDataSourceEdit = GetDataSourceEdit_tabPostsextra_tabPoststotags,
                    AfterSaveAction   = AfterSaveAction_tabPostsextra_tabPoststotags,

                    AddButton = button_tabPostsextra_tabPoststotags_add,
                    IsAddButtonDefaultClickEventAttached = false,
                    RemoveButton = button_tabPostsextra_tabPoststotags_remove,

                    Add    = Add_tabPostsextra_tabPoststotags,
                    Remove = Remove_tabPostsextra_tabPoststotags,
                }
            };

            //postsadditionals
            tabElement_tabPostsextra_tabPostsadditionals = new TabElement()
            {
                TabPageElement = tabPage_tabPostsextra_tabPostsadditionals,
                ElementItem    = new TabElement.TabElementItem()
                {
                    PanelData    = panel_tabPostsextra_tabPostsadditionals_data,
                    PanelActions = panel_tabPostsextra_tabPostsadditionals_actions,
                    PanelUpdates = panel_tabPostsextra_tabPostsadditionals_updates,

                    ParentBindingSourceList = vPostsBindingSource,
                    GetParentDataSourceList = GetDataSource_main,

                    BindingSourceEdit = postsadditionalsBindingSource,
                    GetDataSourceEdit = GetDataSourceEdit_tabPostsextra_tabPostsadditionals,
                    AfterSaveAction   = AfterSaveAction_tabPostsextra_tabPostsadditionals,

                    UpdateButton = button_tabPostsextra_tabPostsadditionals_edit,
                    SaveButton   = button_tabPostsextra_tabPostsadditionals_save,
                    CancelButton = button_tabPostsextra_tabPostsadditionals_cancel,

                    Update = Update_tabPostsextra_tabPostsadditionals,
                }
            };

            //posts Element
            tabElement_tabPosts = new TabElement()
            {
                TabPageElement = tabPage_tabPosts,
                ElementItem    = new TabElement.TabElementItem()
                {
                    PanelData    = panel_tabPosts_data,
                    PanelActions = panel_tabPosts_actions,
                    PanelUpdates = panel_tabPosts_updates,

                    ParentBindingSourceList = vPostsBindingSource,
                    GetParentDataSourceList = GetDataSource_main,

                    BindingSourceEdit = postsBindingSource,
                    GetDataSourceEdit = GetDataSourceEdit_tabPosts,
                    AfterSaveAction   = AfterSaveAction_tabPosts,

                    AddButton    = button_tabPosts_new,
                    UpdateButton = button_tabPosts_edit,
                    RemoveButton = button_tabPosts_delete,
                    SaveButton   = button_tabPosts_save,
                    IsSaveButtonDefaultClickEventAttached = false,
                    CancelButton = button_tabPosts_cancel,

                    Add    = Add_tabPosts,
                    Update = Update_tabPosts,
                    Remove = Remove_tabPosts
                }
            };

            //postsextra Element
            tabElement_tabPostsextra.TabPageElement = tabPage_tabPostsextra;
            tabElement_tabPostsextra.ElementTabs    = new TabElement.TabElementTabs()
            {
                PanelData = panel_tabPostsextra_data,

                TabControlElement = tabControl_tabPostsextra,
                TabElements       = new List <TabElement>()
                {
                    tabElement_tabPostsextra_tabPostsadditionals,
                    tabElement_tabPostsextra_tabPoststotags
                }
            };

            //add TabElements
            TabElements.Add(tabElement_tabPosts);
            TabElements.Add(tabElement_tabPostsextra);
        }