Example #1
0
        /// <summary>
        /// Function: Create form elements
        /// Author  : Jerry Xu
        /// Date    : 2008-11-6
        /// </summary>
        private void CreateFormElements()
        {
            LibraryFileItem fileItem;

            foreach (LibraryFile item in _files)
            {
                fileItem                      = new LibraryFileItem(item);
                fileItem.Width                = containerFiles.Width - 2;
                fileItem.Dock                 = DockStyle.Top;
                fileItem.LibraryFileCheck    += new EventHandler <LibraryFileCheckEventArgs>(fileItem_LibraryFileCheck);
                fileItem.LibraryImportRename += new EventHandler <ImportRenameEventArgs>(fileItem_LibraryImportRename);
                containerFiles.Height         = containerFiles.Height + fileItem.Height;
                containerFiles.Controls.Add(fileItem);
            }

            LibraryMessageItem messageItem;

            foreach (MessageInfo item in _messages)
            {
                messageItem       = new LibraryMessageItem(item);
                messageItem.Width = containerMessage.Width - 2;
                messageItem.Dock  = DockStyle.Top;
                messageItem.LibraryMessageCheck += new EventHandler <LibraryMessageCheckEventArgs>(messageItem_LibraryMessageCheck);
                messageItem.LibraryImportRename += new EventHandler <ImportRenameEventArgs>(fileItem_LibraryImportRename);
                containerMessage.Height          = containerMessage.Height + messageItem.Height;
                containerMessage.Controls.Add(messageItem);
            }
        }
Example #2
0
        private void OnLibraryMessageCheck(LibraryMessageItem item)
        {
            if (item == null || item.Item == null)
            {
                return;
            }

            _LibraryMessageCheck(this, new LibraryMessageCheckEventArgs(item));
        }
 public LibraryMessageCheckEventArgs(LibraryMessageItem item)
 {
     Item = item;
 }