Exemplo n.º 1
0
 /// <summary>
 /// Base class for different folders
 /// </summary>
 /// <param name="_folderMenu">the folder menu where the folder is placed</param>
 /// <param name="_mw">the main window</param>
 public Folders(FolderMenu _folderMenu, MainWindow _mw)
 {
     InitializeComponent();
     folderMenu = _folderMenu;
     user       = folderMenu.user;
     folderImg  = "folder.jpg";
     mw         = _mw;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Base class for different folders
 /// </summary>
 /// <param name="_folderMenu">the folder menu where the folder is placed</param>
 /// <param name="_mw">the main window</param>
 public Folders(FolderMenu _folderMenu, MainWindow _mw)
 {
     InitializeComponent();
     folderMenu = _folderMenu;
     user = folderMenu.user;
     folderImg = "folder.jpg";
     mw = _mw;
 }
        /// <summary>
        /// gets the emails to its folders and place them there
        /// addEmailsToFolderThread worker
        /// </summary>
        /// <param name="obj">an instans of FolderMenu</param>
        private static void addEmailsToFolder_DoWork(object obj)
        {
            FolderMenu thisFolderMenu = (FolderMenu)obj;

            foreach (Folders item in thisFolderMenu.headerTreeItem.Items)
            {
                item.addEmailsToFolder();
            }
        }
 /// <summary>
 /// adds all folderMenus to the applaiction
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">event</param>
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     User.GetUsersFromSettings();
     foreach (User.user user in User.users)
     {
         FolderMenu folderMenu = new FolderMenu(user, this);
         leftMenu.Children.Add(folderMenu);
         MailDatabaseHandler mdh = new MailDatabaseHandler(user);
         mdhList.Add(mdh);
     }
 }
 /// <summary>
 /// Click to add new user
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void newUser_Click(object sender, RoutedEventArgs e)
 {
     addNewUser newUser = new addNewUser();
     if(newUser.ShowDialog() == true)
     {
         FolderMenu folderMenu = new FolderMenu(User.users[User.users.Count-1],this);
         leftMenu.Children.Add(folderMenu);
         MailDatabaseHandler mdh = new MailDatabaseHandler(User.users[User.users.Count-1], true);
         mdhList.Add(mdh);
     }
 }
        /// <summary>
        /// Click to add new user
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void newUser_Click(object sender, RoutedEventArgs e)
        {
            addNewUser newUser = new addNewUser();

            if (newUser.ShowDialog() == true)
            {
                FolderMenu folderMenu = new FolderMenu(User.users[User.users.Count - 1], this);
                leftMenu.Children.Add(folderMenu);
                MailDatabaseHandler mdh = new MailDatabaseHandler(User.users[User.users.Count - 1], true);
                mdhList.Add(mdh);
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// An Inbox folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public Inbox(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Indbakke";
 }
Exemplo n.º 8
0
 /// <summary>
 /// An Inbox folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public SpamFilter(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Spam";
 }
Exemplo n.º 9
0
 /// <summary>
 /// An Trash folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public Trash(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Papirkurv";
     folderImg = "trash-empty.jpg";
 }
Exemplo n.º 10
0
 /// <summary>
 /// An Inbox folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public Inbox(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Indbakke";
 }
Exemplo n.º 11
0
 /// <summary>
 /// adds all folderMenus to the applaiction
 /// </summary>
 /// <param name="sender">sender</param>
 /// <param name="e">event</param>
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     User.GetUsersFromSettings();
     foreach (User.user user in User.users)
     {
         FolderMenu folderMenu = new FolderMenu(user,this);
         leftMenu.Children.Add(folderMenu);
         MailDatabaseHandler mdh = new MailDatabaseHandler(user);
         mdhList.Add(mdh);
     }
 }
Exemplo n.º 12
0
 /// <summary>
 /// An Inbox folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public SpamFilter(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Spam";
 }
Exemplo n.º 13
0
 /// <summary>
 /// An Trash folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public Trash(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Papirkurv";
     folderImg  = "trash-empty.jpg";
 }
Exemplo n.º 14
0
 /// <summary>
 /// A folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public Folder(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Mapper";
 }
Exemplo n.º 15
0
 public Sendt(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Sendt";
 }
Exemplo n.º 16
0
 public Sendt(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Sendt";
 }
Exemplo n.º 17
0
 /// <summary>
 /// A folder
 /// </summary>
 /// <param name="_folderMenu">the folder mene</param>
 /// <param name="_mw">the main window</param>
 public Folder(FolderMenu _folderMenu, MainWindow _mw)
     : base(_folderMenu, _mw)
 {
     folderName = "Mapper";
 }