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(); }
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; } } }
private void On_RbDocLocNoneChecked(object sender, RoutedEventArgs e) { this._l_FirstXpsName.Text = Application.Current.Resources["Str_UiLblNone"] as string; this._l_XpsLocation.Text = Application.Current.Resources["Str_UiLblNone"] as string; this._isDocumentSet = true; this._createLocation = CreateAssignmentStartLocation.None; this.EnableDisableOKButton(); }
private void EnableDisableOKButton() { if (this._isDocumentSet == true) { this._b_Ok.IsEnabled = true; } else { this._l_FirstXpsName.Text = Application.Current.Resources["Str_UiLbl_FirstXPSName"] as string; this._l_XpsLocation.Text = Application.Current.Resources["Str_UiLbl_FirstXPSLocation"] as string; this._createLocation = CreateAssignmentStartLocation.NotSet; this._b_Ok.IsEnabled = false; } }
private void EnableDisableOKButton() { if ((bool)this._rb_DocLocEjs.IsChecked || (bool)this._rb_DocLocLocal.IsChecked) { this._b_Ok.IsEnabled = true; } else { this._l_SaveFileName.Text = this._currentFileName; this._saveLocation = CreateAssignmentStartLocation.NotSet; this._b_Ok.IsEnabled = false; } }
private void EnableDisableOKButton() { if ((bool)this._rb_DocLocEjs.IsChecked || (bool)this._rb_DocLocNone.IsChecked || (bool)this._rb_DocLocLocal.IsChecked) { this._b_Ok.IsEnabled = true; } else { this._l_FirstXpsName.Text = "ドキュメントを選択して下さい。。。"; this._createLocation = CreateAssignmentStartLocation.NotSet; this._b_Ok.IsEnabled = false; } }
private void On_RbDocLocLocalChecked(object sender, RoutedEventArgs e) { string path = this.GetOpenFileName("XPS Documents (*.xps)|*.xps", "XPSドキュメントを選択"); if (path != "cancel") { this._b_Ok.IsEnabled = true; FileInfo f = new FileInfo(path); this._l_FirstXpsName.Text = f.Name; this._firstDocumentLocalPath = path; this._createLocation = CreateAssignmentStartLocation.Local; } else { this._rb_DocLocLocal.IsChecked = false; this._firstDocumentLocalPath = ""; this.EnableDisableOKButton(); return; } }
private void On_RbDocLocLocalChecked(object sender, RoutedEventArgs e) { string path = this.GetOpenFileName("XPS Documents (*.xps)|*.xps", Application.Current.Resources["Str_DlgTitle_OpenXPS"] as string); if (path != "cancel") { this._isDocumentSet = true; this._b_Ok.IsEnabled = true; FileInfo f = new FileInfo(path); this._l_FirstXpsName.Text = f.Name; this._l_XpsLocation.Text = (string)this._rb_DocLocLocal.Content; this._firstDocumentLocalPath = path; this._createLocation = CreateAssignmentStartLocation.Local; } else { this._isDocumentSet = false; //this._rb_DocLocLocal.IsChecked = false; this._firstDocumentLocalPath = ""; this.EnableDisableOKButton(); return; } }
private void On_RbDocLocLocalChecked(object sender, RoutedEventArgs e) { string path = this.GetSaveFileName("EJP Assignments (*.EJP)|*.ejp", "保存先"); if (path != "cancel") { this._b_Ok.IsEnabled = true; FileInfo f = new FileInfo(path); this._l_SaveFileName.Text = f.Name; this._documentLocalPath = path; this._saveLocation = CreateAssignmentStartLocation.Local; } else { this._rb_DocLocLocal.IsChecked = false; this._documentLocalPath = ""; this._l_SaveFileName.Text = this._currentFileName; this.EnableDisableOKButton(); } this._tb_EjsSaveInstructions.Visibility = Visibility.Hidden; this._tb_EjsSaveInstructions.Visibility = Visibility.Hidden; this._tb_EjsSaveToCourseInstructions.Visibility = Visibility.Hidden; this._cb_Courses.Visibility = Visibility.Hidden; }
private void On_BtnCancelClick(object sender, RoutedEventArgs e) { this._createLocation = CreateAssignmentStartLocation.NotSet; this.Close(); }
private void On_RbDocLocNoneChecked(object sender, RoutedEventArgs e) { this._l_FirstXpsName.Text = "なし"; this._createLocation = CreateAssignmentStartLocation.None; this.EnableDisableOKButton(); }