UKSIVTSOSAT 1.0.0

dotnet add package UKSIVTSOSAT --version 1.0.0
NuGet\Install-Package UKSIVTSOSAT -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="UKSIVTSOSAT" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add UKSIVTSOSAT --version 1.0.0
#r "nuget: UKSIVTSOSAT, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install UKSIVTSOSAT as a Cake Addin
#addin nuget:?package=UKSIVTSOSAT&version=1.0.0

// Install UKSIVTSOSAT as a Cake Tool
#tool nuget:?package=UKSIVTSOSAT&version=1.0.0

using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

} using Sibintec.Classes; using Sibintec.Models; using Sibintec.Writer; 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.Diagnostics; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using Sibintec.Reader;

namespace Sibintec { /// <summary> /// Логика взаимодействия для Authorization.xaml /// </summary> public partial class Authorization : Window { public Authorization() { InitializeComponent(); } private int loginAttempts = 0; private void Enter_Click(object sender, RoutedEventArgs e) { if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0) { User user = App.context.Users.ToList().Find(u ⇒ u.Email == txtLogin.Text && u.Password == txtPassword.Password); if (user == null) { MessageBox.Show("Вы ввели неверные данные!");

                loginAttempts++;
                if (loginAttempts >= 3)
                {
                    Captcha captcha = new Captcha();
                    captcha.Show();
                    this.Close();
                }
            }
            else if (user.Idpermission == 1)
            {
                Alldata.ID = user.Iduser;
                MenuReader menuReader = new MenuReader();
                menuReader.Show();
                this.Close();
            }
            else if (user.Idpermission == 2)
            {
                Alldata.ID = user.Iduser;
                MenuWriter menuWriter = new MenuWriter();
                menuWriter.Show();
                this.Close();
            }

            else
            {
                MessageBox.Show("Вы ввели неверные данные!");

            }
        }
        else
            MessageBox.Show("Вы должны заполнить все поля!");

    }


    private void exit_Click(object sender, RoutedEventArgs e)
    {
        MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

        if (messageBoxResult == MessageBoxResult.Yes)
        {
            Environment.Exit(0);
        }
    }
    private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Visible;//видимый
        txtPassword.Visibility = Visibility.Hidden;
        textPassword.Text = txtPassword.Password;
    }

    private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
    {
        var io = txtPassword.Password;
        textPassword.Text = io;
        var oi = textPassword.Text;
        txtPassword.Password = oi;
        textPassword.Visibility = Visibility.Hidden;//не видимый
        txtPassword.Visibility = Visibility.Visible;
        txtPassword.Password = textPassword.Text;
    }
    private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
    {

    }
    private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtPassword.Focus();
    }
    private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
    {
        txtLogin.Focus();
    }

    private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
    {

    }

    private void bthClose_Click(object sender, RoutedEventArgs e)
    {
        Environment.Exit(0);
    }

    private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
    {
        txtPassword.Password = textPassword.Text;

        textPassword.Text = txtPassword.Password;
    }

    private void Window_MouseDown(object sender, MouseButtonEventArgs e)
    {
        if (e.LeftButton == MouseButtonState.Pressed)
            DragMove();
    }
}

}

Product Compatible and additional computed target framework versions.
.NET net8.0-windows7.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.0 136 4/13/2024

using Sibintec.Classes;
using Sibintec.Models;
using Sibintec.Writer;
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.Diagnostics;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Sibintec.Reader;

namespace Sibintec
{
   /// <summary>
   /// Логика взаимодействия для Authorization.xaml
   /// </summary>
   public partial class Authorization : Window
   {
       public Authorization()
       {
           InitializeComponent();
       }
       private int loginAttempts = 0;
       private void Enter_Click(object sender, RoutedEventArgs e)
       {
           if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0)
           {
               User user = App.context.Users.ToList().Find(u => u.Email == txtLogin.Text && u.Password == txtPassword.Password);
               if (user == null)
               {
                   MessageBox.Show("Вы ввели неверные данные!");

                   loginAttempts++;
                   if (loginAttempts >= 3)
                   {
                       Captcha captcha = new Captcha();
                       captcha.Show();
                       this.Close();
                   }
               }
               else if (user.Idpermission == 1)
               {
                   Alldata.ID = user.Iduser;
                   MenuReader menuReader = new MenuReader();
                   menuReader.Show();
                   this.Close();
               }
               else if (user.Idpermission == 2)
               {
                   Alldata.ID = user.Iduser;
                   MenuWriter menuWriter = new MenuWriter();
                   menuWriter.Show();
                   this.Close();
               }

               else
               {
                   MessageBox.Show("Вы ввели неверные данные!");

               }
           }
           else
               MessageBox.Show("Вы должны заполнить все поля!");

       }


       private void exit_Click(object sender, RoutedEventArgs e)
       {
           MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

           if (messageBoxResult == MessageBoxResult.Yes)
           {
               Environment.Exit(0);
           }
       }
       private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
       {
           var io = txtPassword.Password;
           textPassword.Text = io;
           var oi = textPassword.Text;
           txtPassword.Password = oi;
           textPassword.Visibility = Visibility.Visible;//видимый
           txtPassword.Visibility = Visibility.Hidden;
           textPassword.Text = txtPassword.Password;
       }

       private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
       {
           var io = txtPassword.Password;
           textPassword.Text = io;
           var oi = textPassword.Text;
           txtPassword.Password = oi;
           textPassword.Visibility = Visibility.Hidden;//не видимый
           txtPassword.Visibility = Visibility.Visible;
           txtPassword.Password = textPassword.Text;
       }
       private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
       {

       }
       private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
       {
           txtPassword.Focus();
       }
       private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
       {
           txtLogin.Focus();
       }

       private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
       {

       }

       private void bthClose_Click(object sender, RoutedEventArgs e)
       {
           Environment.Exit(0);
       }

       private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
       {
           txtPassword.Password = textPassword.Text;

           textPassword.Text = txtPassword.Password;
       }

       private void Window_MouseDown(object sender, MouseButtonEventArgs e)
       {
           if (e.LeftButton == MouseButtonState.Pressed)
               DragMove();
       }
   }
}
using Sibintec.Classes;
using Sibintec.Models;
using Sibintec.Writer;
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.Diagnostics;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using Sibintec.Reader;

namespace Sibintec
{
   /// <summary>
   /// Логика взаимодействия для Authorization.xaml
   /// </summary>
   public partial class Authorization : Window
   {
       public Authorization()
       {
           InitializeComponent();
       }
       private int loginAttempts = 0;
       private void Enter_Click(object sender, RoutedEventArgs e)
       {
           if (txtLogin.Text.Length != 0 && txtPassword.Password.Length != 0)
           {
               User user = App.context.Users.ToList().Find(u => u.Email == txtLogin.Text && u.Password == txtPassword.Password);
               if (user == null)
               {
                   MessageBox.Show("Вы ввели неверные данные!");

                   loginAttempts++;
                   if (loginAttempts >= 3)
                   {
                       Captcha captcha = new Captcha();
                       captcha.Show();
                       this.Close();
                   }
               }
               else if (user.Idpermission == 1)
               {
                   Alldata.ID = user.Iduser;
                   MenuReader menuReader = new MenuReader();
                   menuReader.Show();
                   this.Close();
               }
               else if (user.Idpermission == 2)
               {
                   Alldata.ID = user.Iduser;
                   MenuWriter menuWriter = new MenuWriter();
                   menuWriter.Show();
                   this.Close();
               }

               else
               {
                   MessageBox.Show("Вы ввели неверные данные!");

               }
           }
           else
               MessageBox.Show("Вы должны заполнить все поля!");

       }


       private void exit_Click(object sender, RoutedEventArgs e)
       {
           MessageBoxResult messageBoxResult = MessageBox.Show("Вы уверены, что хотите выйти?", "Предупреждение", MessageBoxButton.YesNo, MessageBoxImage.Warning);

           if (messageBoxResult == MessageBoxResult.Yes)
           {
               Environment.Exit(0);
           }
       }
       private void CheckBoxPassword_Checked(object sender, RoutedEventArgs e)
       {
           var io = txtPassword.Password;
           textPassword.Text = io;
           var oi = textPassword.Text;
           txtPassword.Password = oi;
           textPassword.Visibility = Visibility.Visible;//видимый
           txtPassword.Visibility = Visibility.Hidden;
           textPassword.Text = txtPassword.Password;
       }

       private void CheckBoxPassword_UnChecked(object sender, RoutedEventArgs e)
       {
           var io = txtPassword.Password;
           textPassword.Text = io;
           var oi = textPassword.Text;
           txtPassword.Password = oi;
           textPassword.Visibility = Visibility.Hidden;//не видимый
           txtPassword.Visibility = Visibility.Visible;
           txtPassword.Password = textPassword.Text;
       }
       private void txtPassword_PasswordChanged(object sender, RoutedEventArgs e)
       {

       }
       private void textPassword_MouseDown(object sender, MouseButtonEventArgs e)
       {
           txtPassword.Focus();
       }
       private void textLogin_MouseDown(object sender, MouseButtonEventArgs e)
       {
           txtLogin.Focus();
       }

       private void txtLogin_TextChanged(object sender, TextChangedEventArgs e)
       {

       }

       private void bthClose_Click(object sender, RoutedEventArgs e)
       {
           Environment.Exit(0);
       }

       private void textPassword_TextChanged(object sender, TextChangedEventArgs e)
       {
           txtPassword.Password = textPassword.Text;

           textPassword.Text = txtPassword.Password;
       }

       private void Window_MouseDown(object sender, MouseButtonEventArgs e)
       {
           if (e.LeftButton == MouseButtonState.Pressed)
               DragMove();
       }
   }
}