public SettingsWindow(MainWindow main, UploaderViewModel viewModel)
        {
            InitializeComponent();

            //Owner = main;

            _main = main;
            _viewModel = viewModel;

            if (_viewModel.Username != null)
            {
                UsernameBox.Text = _viewModel.Username;
                PasswordBox.Password = _viewModel.Password;

                UsernameBox.IsEnabled = false;
                PasswordBox.IsEnabled = false;
                RemoveButton.Visibility = Visibility.Visible;
            }

            if (_viewModel.Proxy == null)
                UseSystemRadio.IsChecked = true;

            else if (_viewModel.Proxy == UploaderViewModel.ProxyDisabled)
                DisableProxyRadio.IsChecked = true;

            else
            {
                ProxyAddressBox.Text = _viewModel.Proxy;
                UserDefinedRadio.IsChecked = true;

            }

            UsernameBox.Focus();
        }
Exemplo n.º 2
0
        public AboutWindow(MainWindow main)
        {
            InitializeComponent();

            //Owner = main;

            _main = main;

            LicenseBox.Text = Properties.Resources.license;

            VersionTextBlock.Text = String.Format("{0} (beta)", Assembly.GetExecutingAssembly().GetName().Version.ToString());
        }