Exemplo n.º 1
0
        private void ButtonSave_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(TextBoxIP.Text) ||
                string.IsNullOrWhiteSpace(TextBoxName.Text) ||
                string.IsNullOrWhiteSpace(TextBoxPassword.Text))
            {
                MessageBox.Show("Не все данные заполнены");
                return;
            }

            Proxy = new ProxyHolder();

            Proxy.Ip           = TextBoxIP.Text;
            Proxy.UserName     = TextBoxName.Text;
            Proxy.UserPassword = TextBoxPassword.Text;

            Close();
        }
Exemplo n.º 2
0
        private void ButtonSave_Click(object sender, RoutedEventArgs e)
        {
            if (string.IsNullOrWhiteSpace(TextBoxIP.Text) ||
                string.IsNullOrWhiteSpace(TextBoxName.Text) ||
                string.IsNullOrWhiteSpace(TextBoxPassword.Text))
            {
                MessageBox.Show(OsLocalization.Entity.ErrorSave);
                return;
            }

            Proxy = new ProxyHolder();

            Proxy.Ip           = TextBoxIP.Text;
            Proxy.UserName     = TextBoxName.Text;
            Proxy.UserPassword = TextBoxPassword.Text;

            Close();
            ButtonSave.Content = OsLocalization.Entity.ProxiesLabel3;
            Title = OsLocalization.Entity.TitleProxyAddUi;
        }