public void Render(StorageSelectionFormViewModel viewModel)
        {
            this.SuspendLayout();
            if (viewModel.FileName != null)
            {
                this.fileNameTextBox.Text = viewModel.FileName;
            }

            if (viewModel.NewFileName != null)
            {
                this.newFileNameTextBox.Text = viewModel.NewFileName;
            }

            if (viewModel.Password != null)
            {
                this.passwordTextBox.Text = viewModel.Password;
            }

            if (viewModel.Mode != null)
            {
                var isNew = viewModel.Mode == StorageSelectionFormMode.New;
                this.createStorageRadioButton.Checked   = isNew;
                this.openStorageRadioButton.Checked     = !isNew;
                this.NewStorageTableLayout.Visible      = isNew;
                this.ExistingStorageTableLayout.Visible = !isNew;
                this.createButton.Visible = isNew;
                this.openButton.Visible   = !isNew;
            }

            if (viewModel.SavePassword != null)
            {
                this.savePasswordCheckBox.Checked = viewModel.SavePassword == true;
            }

            this.ResumeLayout(true);
        }
        public void Render(StorageSelectionFormViewModel viewModel)
        {
            this.SuspendLayout();
            if (viewModel.FileName != null)
            {
                this.fileNameTextBox.Text = viewModel.FileName;
            }

            if (viewModel.NewFileName != null)
            {
                this.newFileNameTextBox.Text = viewModel.NewFileName;
            }

            if (viewModel.Password != null)
            {
                this.passwordTextBox.Text = viewModel.Password;
            }

            if (viewModel.Mode != null)
            {
                var isNew = viewModel.Mode == StorageSelectionFormMode.New;
                this.createStorageRadioButton.Checked = isNew;
                this.openStorageRadioButton.Checked = !isNew;
                this.NewStorageTableLayout.Visible = isNew;
                this.ExistingStorageTableLayout.Visible = !isNew;
                this.createButton.Visible = isNew;
                this.openButton.Visible = !isNew;
            }

            if (viewModel.SavePassword != null)
            {
                this.savePasswordCheckBox.Checked = viewModel.SavePassword == true;
            }

            this.ResumeLayout(true);
        }