Example #1
0
 private void DownloadEJSCourseDocument_Async(string path, EjsBridge.ejsService.ejsCourseDocument document)
 {
     //BackgroundWorker bgw = new BackgroundWorker();
     EjsBridge.ejsBridgeManager.DownloadCourseDocument(
         App._currentEjpStudent.SessionToken, path,
         document);
 }
Example #2
0
        private void On_RbDocLocEjsChecked(object sender, RoutedEventArgs e)
        {
            ejpWindows.EjsCourseDocumentSelectWindow docSelectWindow =
                new EjsCourseDocumentSelectWindow();

            docSelectWindow.Closing += delegate(object ws, System.ComponentModel.CancelEventArgs we)
            {
                if (docSelectWindow.Cancelled == false && docSelectWindow.SelectedDocument != null)
                {
                    string baseDir = Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
                    baseDir += @"\Meet\eJournalPlus\";
                    string path = baseDir +
                                  @"TemporaryFiles\DownloadedFiles\" +
                                  Guid.NewGuid().ToString() + ".xps";

                    this._isDocumentSet          = true;
                    this._firstDocumentLocalPath = path;
                    this._createLocation         = CreateAssignmentStartLocation.EJournalServer;
                    this._l_FirstXpsName.Text    = docSelectWindow.SelectedDocument._name;
                    this._l_XpsLocation.Text     = (string)this._rb_DocLocEjs.Content;
                    this._ejsDocumentToDownload  = docSelectWindow.SelectedDocument;
                }
                else
                {
                    this._isDocumentSet = false;
                    //this._rb_DocLocEjs.IsChecked = false;
                    this._createLocation = CreateAssignmentStartLocation.NotSet;
                }
            };

            docSelectWindow.ShowDialog();

            this._createLocation = CreateAssignmentStartLocation.EJournalServer;
            this.EnableDisableOKButton();
        }