/// <summary>
        /// Creats background threads
        /// </summary>
        /// <param name="Window">Interface window containing clients (ClientPanel)</param>
        public MailLoader(MainWindow Window)
        {
            Main_Window = Window;
            dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 30);

            Loader = new BackgroundWorker();
            Loader.DoWork += new DoWorkEventHandler(Loader_DoWork);
            Loader.RunWorkerCompleted += new RunWorkerCompletedEventHandler(Loader_RunWorkerCompleted);

            Create_JoinDatabase();

            dispatcherTimer.Start();
        }
 public SendMail(MainWindow Main_window,string SelectedClient)
 {
     Main_Window = Main_window;
     InitializeComponent();
 }