12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- using Redmine.Net.Api;
- using Redmine.Net.Api.Types;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace RedmineOracle
- {
- /// <summary>
- /// Логика взаимодействия для pgAuthRm.xaml
- /// </summary>
- public partial class pgAuthRm : Page
- {
- ListIstIssues li;
- public pgAuthRm()
- {
- InitializeComponent();
- }
- private void btnAuth_Click(object sender, RoutedEventArgs e)
- {
- infoAuth.loginRm = tbLogin.Text;
- infoAuth.passwordRm = tbPass.Text;
- checkAuth(tbLogin.Text,tbPass.Text);
- }
- async void checkAuth(string login,string pass)
- {
- await Task.Run(() =>
- {
- try
- {
- var host = "http://testred.ru/";
- var a = new RedmineManager(host, login, pass);
- User currUser = a.GetCurrentUser();
- infoAuth.isAuthForum = true;
- Application.Current.Dispatcher.Invoke(() =>
- {
- LoadPages.rmFrame.Navigate(new pgRmList());
- });
-
- }
- catch
- {
- MessageBox.Show("Проверьте введенные данные!");
- }
- });
- }
- }
- }
|