30CHƯƠNG 5. THỰC HIỆN 5.3 líLưu trữ các lớp học cung cấp kiên trì đến các vùng khác của khuôn khổ. Classesoperate lưu trữ trên một cơ sở dữ liệu quan hệ, nhưng hoàn toàn shield phần còn lại của dự án từ thiếu quản lý cơ sở dữ liệu. Kiên trì tiếp xúc thông qua việc triển khaiMailHierarchicalClustererContext vàMailTextAnalyzerContext trong bối cảnh giao diệnIHierarchicalClustererContext vàIMail-TextAnalyzerContext . Những triển khai sau đó truy cập ứng dụng đối tượng miêu tả thấp. Cơ sở dữ liệu lưu trữ được tách ra thành hai cấp độ:•Cấp dữ liệu trực tiếp hợp tác với cơ sở dữ liệu quan hệ, nó thực hiện một SQL queriesfor chèn, Cập Nhật, loại bỏ hoặc danh sách mặt hàng. Mỗi loại mục, chẳng hạn như trường hợp dữ liệu thư clusteror có giao diện riêng của nó được thừa hưởng từIRepositoryItem . Dataobjects thực hiện các giao diện này sau đó được sử dụng cho lưu trữ trong bộ nhớ của item'sproperties. Mỗi loại mục được quản lý bởi một lớp frombase lớp thừa kế kho lưu trữ Trung ươngDbRepository . Lưu ý rằng lớpDbRepository đã được thực hiện từ eM Client'sstorage lớp. Kho sẽ chăm sóc của tất cả các tương tác cơ sở dữ liệu và quản lý các đối tượng lưu trữ cacheof. Chuyên ngành lớp trừu tượng, phục vụ như là một cơ sở cho kho areencapsulated đó bởi hai chìa khóa từ điển ứng dụng bộ sưu tập cấp được thực hiện trongDbDoubleKeyRepository •The application level provides an abstraction layer from the database. Item applicationclasses encapsulate the data storage items and trigger modification operations in therepository. Collection classes implement standard platform operations for enumeration,addition and removal of items. Matrices that are used inIHierarchicalClustererContext are implemented as descendants of classDoubleKeyDictionary .5.4 User interfaceThe user interface in the client has been implemented correspondingly tosection 4.7. AclassControlSidebarBoxClustersis a descendant of a control that supports embedding in thesidebar.The inherited class contains a datagrid control that displays the list of clusters and apanel that where information about the current cluster is displayed. These two controlschange their visibility on folder selection change and are visible only if the current folder isbeing clustered. Information in the detail panel are refreshed when either the user selects acluster from the list or when a mail is selected in the main area of eM Client.The user interface also allows to filter messages from cluster. When a user double clicksan item in the cluster list or clicks ”Filter cluster items” button in the detail panel, filteringis enabled in the messages area of the application and only messages from current clusterare visible.Integration with other user interface components of the client is implemented in severalmethods in the main form of the application -formMain
đang được dịch, vui lòng đợi..
