/// <summary>
        /// Method for adding download
        /// </summary>
        /// <param name="param">Download param</param>
        private void AddDownload(object param)
        {
            try
            {
                //create opener for new download adding window
                IWindowOpener windowOpener = new WindowOpener();
                windowOpener.OpenNewWindow(new NewDownloadVM());
                if (DownloaderManager.Instance.LastDownload != null
                    && !_itemsToDownloaders.Contains(DownloaderManager.Instance.LastDownload))
                {
                    Downloader fileToDownload = DownloaderManager.Instance.LastDownload;
                    fileToDownload.DownloadEnded += OnDownloadEnded;

                    //create download viewer control
                    IControlCreator controlCreator = new ControlCreator();
                    DownloadViewerVM model = new DownloadViewerVM(fileToDownload);
                    var viewer = controlCreator.CreateControl(model);

                    if (!_itemsToDownloaders.Keys.OfType<Downloader>().Contains(fileToDownload))
                    {
                        _itemsToDownloaders.Add(fileToDownload, viewer);
                        NotifyPropertyChanged("ItemsToDownloaders");
                    }

                    NotifyPropertyChanged("TotalBytesDownloadedStatistic");
                    NotifyPropertyChanged("DownloadStatesStatistic");
                    NotifyPropertyChanged("DownloadTypesStatistic");
                }
            }
            catch (ArgumentNullException)
            {

            }
            catch (UriFormatException)
            {
                MessageBox.Show("Invalid url format", "Error", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
        /// <summary>
        /// Add new download from console argument url
        /// Need when we run DM from browser (run by cmd command with url param)
        /// </summary>
        public void AddDownloadFromArgs()
        {
            try
            {
                AddDownload(Settings.Default.ArgsUrl);
                //for update info
                Thread.Sleep(2000);
                Downloader fileToDownload = DownloaderManager.Instance.LastDownload;
                IControlCreator controlCreator = new ControlCreator();
                DownloadViewerVM model = new DownloadViewerVM(fileToDownload);
                var viewer = controlCreator.CreateControl(model);

                if (!_itemsToDownloaders.Keys.OfType<Downloader>().Contains(fileToDownload))
                {
                    _itemsToDownloaders.Add(fileToDownload, viewer);
                    NotifyPropertyChanged("ItemsToDownloaders");
                }

                NotifyPropertyChanged("TotalBytesDownloadedStatistic");
                NotifyPropertyChanged("DownloadStatesStatistic");
                NotifyPropertyChanged("DownloadTypesStatistic");
            }
            catch (ArgumentNullException)
            {

            }
        }