protected override void OnContentRendered(EventArgs e)
        {
            base.OnContentRendered(e);
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
                loginWindow.ShowDialog();
            }
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                this._cancelled = true;
                this.Close();
            }
            else
            {
                this._tb_LoginName.Text =
                    App._currentEjpStudent.LastName + " " + App._currentEjpStudent.FirstName;

                this.LoadDataFromEjs();
            }

            //Set the combobox to display the documents
            //of the first course in the list, if there are
            //any courses in the list.
            if (this._cb_Courses.Items.Count > 0)
            {
                this._cb_Courses.SelectedIndex = 0;
            }
        }
        private void On_RbDocLocEjsChecked(object sender, RoutedEventArgs e)
        {
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
                loginWindow.ShowDialog();
            }
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                MessageBox.Show("公開するためログインが必要です。");
                this._rb_DocLocEjs.IsChecked = false;
                this._l_SaveFileName.Text    = "";
            }
            else
            {
                this._tb_EjsSaveInstructions.Visibility         = Visibility.Visible;
                this._tb_EjsSaveToCourseInstructions.Visibility = Visibility.Visible;
                this._cb_Courses.Visibility = Visibility.Visible;

                this._saveLocation = CreateAssignmentStartLocation.EJournalServer;
                this.EnableDisableOKButton();
                if (this._needsCourseList)
                {
                    this.LoadDataFromEjs();
                    this._needsCourseList = false;
                }
            }
        }
Exemple #3
0
        protected override void OnContentRendered(EventArgs e)
        {
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
                loginWindow.ShowDialog();
            }
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                this._cancelled = true;
                this.Close();
            }
            else
            {
                this._tb_LoginName.Text =
                    App._currentEjpStudent.LastName + " " + App._currentEjpStudent.FirstName;

                this.LoadDataFromEjs();
            }

            if (this._cb_Courses.Items.Count > 0)
            {
                this._cb_Courses.SelectedIndex = 0;
            }
        }
 private void On_BtnOKClick(object sender, RoutedEventArgs e)
 {
     if (this.SaveLocation == CreateAssignmentStartLocation.EJournalServer)
     {
         if (App.IsCurrentUserEJSAuthenticated() == false)
         {
             ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
             loginWindow.ShowDialog();
         }
         if (App.IsCurrentUserEJSAuthenticated() == false)
         {
             MessageBox.Show("公開するためログインが必要です。");
             this._rb_DocLocEjs.IsChecked = false;
             this._l_SaveFileName.Text    = "";
         }
         else
         {
             if (this._l_SaveFileName.Text.Length == 0)
             {
                 MessageBox.Show("公開するアサインメントの名前を必ず入力して下さい。");
                 return;
             }
             this.DocumentLocalPath  = this._l_SaveFileName.Text;
             this.RegisterToCourseId = ((ejsCourse)this._cb_Courses.SelectedValue)._id;
             this.Close();
         }
     }
     else
     {
         //this.DocumentLocalPath = this._l_SaveFileName.Text;
         this.Close();
     }
 }
Exemple #5
0
        protected override void OnContentRendered(EventArgs e)
        {
            base.OnContentRendered(e);
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
                loginWindow.ShowDialog();
            }
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                this.Close();
            }
            else
            {
                this.LoadDataFromEjs();
            }

            this._l_Date.Text = DateTime.Today.ToShortDateString();
        }
        protected override void OnContentRendered(EventArgs e)
        {
            base.OnContentRendered(e);
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
                loginWindow.ShowDialog();
            }
            if (App.IsCurrentUserEJSAuthenticated() == false)
            {
                this.Close();
            }
            else
            {
                this._tb_LoginName.Text =
                    App._currentEjpStudent.LastName + " " + App._currentEjpStudent.FirstName;

                this.LoadDataFromEjs();
            }
        }
Exemple #7
0
 private void OnPublishAssignment(object sender, RoutedEventArgs e)
 {
     if (App.IsCurrentUserEJSAuthenticated() == false)
     {
         ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
         loginWindow.ShowDialog();
     }
     if (App.IsCurrentUserEJSAuthenticated() == false)
     {
         MessageBox.Show(Application.Current.Resources["ERR_MustLogInBeforePublishAsg"] as string);                //Properties.Resources.ERR_MustLogInBeforePublishAsg);
     }
     else
     {
         if (this._l_SaveFileName.Text.Length == 0)
         {
             MessageBox.Show(Application.Current.Resources["ERR_NameNeededToPusblishAsg"] as string);                    //Properties.Resources.ERR_NameNeededToPusblishAsg);
             return;
         }
         this.DocumentLocalPath  = this._l_SaveFileName.Text;
         this.RegisterToCourseId = ((ejsCourse)this._cb_Courses.SelectedValue)._id;
         this.Cancelled          = false;
         this.Close();
     }
 }
Exemple #8
0
 private void OnPublishAssignment(object sender, RoutedEventArgs e)
 {
     if (App.IsCurrentUserEJSAuthenticated() == false)
     {
         ejpWindows.EjsLoginWindow loginWindow = new EjsLoginWindow();
         loginWindow.ShowDialog();
     }
     if (App.IsCurrentUserEJSAuthenticated() == false)
     {
         MessageBox.Show("公開するためログインが必要です。");
     }
     else
     {
         if (this._l_SaveFileName.Text.Length == 0)
         {
             MessageBox.Show("公開するアサインメントの名前を必ず入力して下さい。");
             return;
         }
         this.DocumentLocalPath  = this._l_SaveFileName.Text;
         this.RegisterToCourseId = ((ejsCourse)this._cb_Courses.SelectedValue)._id;
         this.Cancelled          = false;
         this.Close();
     }
 }