Beispiel #1
0
 public void GetRemoteFileList()
 {
     this.m_RemoteFileList.Clear();
     YpiConnect.Proxy.FileTransferServiceProxy             fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
     YellowstonePathology.YpiConnect.Contract.MethodResult methodResult             = fileTransferServiceProxy.GetRemoteFileList(ref this.m_RemoteFileList, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
     NotifyPropertyChanged("");
 }
        private void HyperlinkViewDocument_Click(object sender, RoutedEventArgs e)
        {
            Hyperlink hyperLink = (Hyperlink)sender;

            YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile = (YellowstonePathology.YpiConnect.Contract.RemoteFile)hyperLink.Tag;

            if (remoteFile.IsDownloaded == false)
            {
                YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                fileTransferServiceProxy.Download(ref remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
            }

            if (remoteFile.Extension == ".XPS")
            {
                XpsDocument       xpsDocument       = XpsDocumentHelper.FromMemoryStream(remoteFile.MemoryStream);
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(xpsDocument);
                xpsDocumentViewer.ShowDialog();
            }

            if (remoteFile.Extension == ".TIF")
            {
                TifDocumentViewer tifDocumentViewer = new TifDocumentViewer();
                tifDocumentViewer.Load(remoteFile.MemoryStream);
                tifDocumentViewer.ShowDialog();
            }
        }
Beispiel #3
0
        private void UploadFile()
        {
            if (this.ListViewLocalFiles.SelectedItems.Count > 0)
            {
                YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                for (int idx = 0; idx < this.ListViewLocalFiles.SelectedItems.Count; idx++)
                {
                    YellowstonePathology.YpiConnect.Contract.LocalFile localFile = (YellowstonePathology.YpiConnect.Contract.LocalFile) this.ListViewLocalFiles.SelectedItems[idx];
                    localFile.Load();
                    fileTransferServiceProxy.Upload(ref localFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
                }

                this.GetRemoteFileList();
            }
        }
Beispiel #4
0
 private void MenuItemShowResultSummaryText_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewSearchResults.SelectedItem != null)
     {
         YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult = (YellowstonePathology.YpiConnect.Contract.Search.SearchResult) this.ListViewSearchResults.SelectedItem;
         if (searchResult.FinalTime.HasValue == true)
         {
             YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
             string summaryResultString = fileTransferServiceProxy.GetSummaryResultString(searchResult.ReportNo);
             ResultSummaryTextDialog resultSummaryTextDialog = new ResultSummaryTextDialog(summaryResultString);
             resultSummaryTextDialog.ShowDialog();
         }
         else
         {
             MessageBox.Show("The result summary is not available until the case is final.");
         }
     }
 }
        private void HyperlinkViewDocument_Click(object sender, RoutedEventArgs e)
        {
            Hyperlink hyperLink = (Hyperlink)sender;
            YellowstonePathology.YpiConnect.Contract.RemoteFile remoteFile = (YellowstonePathology.YpiConnect.Contract.RemoteFile)hyperLink.Tag;

            if (remoteFile.IsDownloaded == false)
            {
                YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                fileTransferServiceProxy.Download(ref remoteFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
            }

            if (remoteFile.Extension == ".XPS")
            {
                XpsDocument xpsDocument = XpsDocumentHelper.FromMemoryStream(remoteFile.MemoryStream);
                XpsDocumentViewer xpsDocumentViewer = new XpsDocumentViewer();
                xpsDocumentViewer.LoadDocument(xpsDocument);
                xpsDocumentViewer.ShowDialog();
            }

            if (remoteFile.Extension == ".TIF")
            {
                TifDocumentViewer tifDocumentViewer = new TifDocumentViewer();
                tifDocumentViewer.Load(remoteFile.MemoryStream);
                tifDocumentViewer.ShowDialog();
            }
        }
        private void UploadFile()
        {
            if (this.ListViewLocalFiles.SelectedItems.Count > 0)
            {
                YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
                for (int idx = 0; idx < this.ListViewLocalFiles.SelectedItems.Count; idx++)
                {
                    YellowstonePathology.YpiConnect.Contract.LocalFile localFile = (YellowstonePathology.YpiConnect.Contract.LocalFile)this.ListViewLocalFiles.SelectedItems[idx];
                    localFile.Load();
                    fileTransferServiceProxy.Upload(ref localFile, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
                }

                this.GetRemoteFileList();
            }
        }
 public void GetRemoteFileList()
 {
     this.m_RemoteFileList.Clear();
     YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
     YellowstonePathology.YpiConnect.Contract.MethodResult methodResult = fileTransferServiceProxy.GetRemoteFileList(ref this.m_RemoteFileList, YellowstonePathology.YpiConnect.Contract.Identity.ApplicationIdentity.Instance.WebServiceAccount);
     NotifyPropertyChanged("");
 }
 private void MenuItemShowResultSummaryText_Click(object sender, RoutedEventArgs e)
 {
     if (this.ListViewSearchResults.SelectedItem != null)
     {
         YellowstonePathology.YpiConnect.Contract.Search.SearchResult searchResult = (YellowstonePathology.YpiConnect.Contract.Search.SearchResult)this.ListViewSearchResults.SelectedItem;
         if (searchResult.FinalTime.HasValue == true)
         {
             YellowstonePathology.YpiConnect.Proxy.FileTransferServiceProxy fileTransferServiceProxy = new Proxy.FileTransferServiceProxy();
             string summaryResultString = fileTransferServiceProxy.GetSummaryResultString(searchResult.ReportNo);
             ResultSummaryTextDialog resultSummaryTextDialog = new ResultSummaryTextDialog(summaryResultString);
             resultSummaryTextDialog.ShowDialog();
         }
         else
         {
             MessageBox.Show("The result summary is not available until the case is final.");
         }
     }
 }