public UpdUserWindow(ModerPage page) { this.page = page; InitializeComponent(); user = (User)page.dataGrid.SelectedItem; if (user == null) { MessageBox.Show("Вы не выбрали пользователя"); this.Close(); } ops = new Operations(); fname = user.FName.Trim(' '); lname = user.LName.Trim(' '); accessLevel = Convert.ToString(user.AccessLevel).Trim(' '); login = user.Login.Trim(' '); password = user.Password.Trim(' '); fNameBox.Text = fname; lNameBox.Text = lname; accessBox.Text = accessLevel; loginBox.Text = login; passwordBox.Text = password; }
public AddUserWindow(ModerPage page) { InitializeComponent(); this.page = page; ops = new Operations(); this.Height = 1; this.Width = 1; DoubleAnimation heightAnimation = new DoubleAnimation(); heightAnimation.From = 1; heightAnimation.To = 420; heightAnimation.Duration = TimeSpan.FromSeconds(1); this.BeginAnimation(Window.HeightProperty, heightAnimation); DoubleAnimation widthAnimation = new DoubleAnimation(); widthAnimation.From = 1; widthAnimation.To = 300; widthAnimation.Duration = TimeSpan.FromSeconds(2); this.BeginAnimation(Window.WidthProperty, widthAnimation); }