using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Collections.Specialized; using System.IO; using System.Linq; using System.Net; using System.Net.Http; using System.Net.Sockets; 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 Srez { /// /// Логика взаимодействия для MainWindow.xaml /// public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); Session.DateFinish = DateTime.Now; Session.DateStart = DateTime.Now; Session.IdSession = 0; Session.IdUser = 0; } private void loginBtn_Click(object sender, RoutedEventArgs e) { Session.DateStart = DateTime.Now; Session.IdUser = Convert.ToInt32(InputUserCode.Text); WsClient.WsClientConnect(); WsClient.WsClientSendMessage($"SetUserSession {InputUserCode.Text}"); Session.IdSession = Convert.ToInt32(WsClient.WsClientResponseFromWss()); WsClient.WsClientClose(); new Window1().Show(); this.Close(); } } }