private void btnShowDocument_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var azureClient = new AzureDataClient();
                var file        = azureClient.GetFile(CurrentToDo.Path);

                if (file.Exists())
                {
                    string copiedFile = azureClient.DownloadFileToOpen(file, (progress, total) => { });

                    if (String.IsNullOrEmpty(copiedFile))
                    {
                        return;
                    }


                    System.Diagnostics.Process process = new System.Diagnostics.Process();
                    Uri pdf = new Uri(copiedFile, UriKind.RelativeOrAbsolute);
                    process.StartInfo.FileName = pdf.LocalPath;

                    process.Start();
                }
                else
                {
                    throw new FileNotFoundException();
                }
            }
            catch (Exception error)
            {
                MessageBox.Show("Could not open the file.", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }
        private void btnZipAndMailTo_Click(object sender, RoutedEventArgs e)
        {
            var paths = DocumentsForMail.Where(x => !String.IsNullOrEmpty(x.Path)).Select(x => x.Path).Distinct().ToList();

            if (paths.Count() < 1)
            {
                MainWindow.ErrorMessage = ((string)Application.Current.FindResource("OdaberiBarJedanDokumentUzvicnik"));
                return;
            }

            try
            {
                List <string> completedPaths = new List <string>();


                var azureClient = new AzureDataClient();
                foreach (var item in paths)
                {
                    var file = azureClient.GetFile(item);

                    var localPath = azureClient.DownloadFileToOpen(file, (progress, total) => { });
                    completedPaths.Add(localPath);
                }



                System.Windows.Forms.FolderBrowserDialog folderBrowser = new System.Windows.Forms.FolderBrowserDialog();
                var result = folderBrowser.ShowDialog();

                if (result == System.Windows.Forms.DialogResult.OK)
                {
                    var path = ZipFileHelper.MakeArchiveFromFiles(completedPaths, folderBrowser.SelectedPath);

                    if (!String.IsNullOrEmpty(path))
                    {
                        try
                        {
                            string outlookPath = AppConfigurationHelper.Configuration?.OutlookDefinedPath ?? "";
                            Process.Start($"{outlookPath}", $"/a \"{path}\" /c ipm.note ");
                        }
                        catch (Exception error)
                        {
                            MainWindow.ErrorMessage = ((string)Application.Current.FindResource("OutlookNijeInstaliranIliNijePovezanUzvicnik"));
                        }
                    }
                }
            } catch (Exception ex)
            {
            }
        }
        private void btnShowPhysicalPersonDocument_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var azureClient = new AzureDataClient();
                var file        = azureClient.GetFile(CurrentPhysicalPersonDocument.Path);

                string localFile = azureClient.DownloadFileToOpen(file, (progress, total) => { });

                if (!String.IsNullOrEmpty(localFile))
                {
                    System.Diagnostics.Process process = new System.Diagnostics.Process();
                    //string path = "C:\\Users\\Zdravko83\\Desktop\\1 ZBORNIK.pdf";
                    Uri pdf = new Uri(localFile, UriKind.RelativeOrAbsolute);
                    process.StartInfo.FileName = pdf.LocalPath;
                    process.Start();
                }
            }
            catch (Exception error)
            {
                MessageBox.Show("Could not open the file.", "Error", MessageBoxButton.OK, MessageBoxImage.Warning);
            }
        }