/// <summary> Обработчик клика по установке статуса </summary> private void SetUserStatus() { var windowUserSettings = new WindowStandard(new ViewUserStatus()) { MinHeight = 185, Height = 185, MinWidth = 530, Width = 530, WindowStartupLocation = WindowStartupLocation.CenterScreen, ResizeMode = ResizeMode.NoResize, Style = Application.Current.TryFindResource(@"VS2012MessageBoxStyle") as Style }; windowUserSettings.ShowDialog(); }
/// <summary> Возвращает окно WindowStandard с ViewCallRedirect </summary> public static WindowStandard GetWindowPasswordBox(PasswordBoxTypeEnum windowType) { var windowDispacher = WindowDispacher.GetInstance; var result = windowDispacher.GetWindowByUserControl(typeof(ViewPasswordBox)) as WindowStandard; if (result != null) { return(result); } result = new WindowStandard(new ViewPasswordBox(windowType)) { MinWidth = 500, MinHeight = 200, Height = 200, Width = 500, WindowStartupLocation = WindowStartupLocation.CenterOwner, ResizeMode = ResizeMode.NoResize, ShowInTaskbar = false, }; result.Activated += (sender, args) => { windowDispacher.SetActiveWindow(result); }; windowDispacher.AddToListWindow(result); result.Closed += (sender, args) => { windowDispacher.DeleteToListWindow(result); }; return(result); }
/// <summary> Возвращает окно WindowStandard с ViewContactManual </summary> public static WindowStandard GetWindowManualContact() { var windowDispacher = WindowDispacher.GetInstance; var result = windowDispacher.GetWindowByUserControl(typeof(ViewContactManual)) as WindowStandard; if (result != null) { return(result); } result = new WindowStandard(new ViewContactManual()) { Height = 500, Width = 700, WindowStartupLocation = WindowStartupLocation.CenterOwner }; result.Activated += (sender, args) => { windowDispacher.SetActiveWindow(result); }; windowDispacher.AddToListWindow(result); result.Closed += (sender, args) => { windowDispacher.DeleteToListWindow(result); }; return(result); }
/// <summary> Возвращает окно WindowStandard с ViewCallRedirect </summary> public static WindowStandard GetWindowCallRedirect(ModelCall currentModelCall) { var windowDispacher = WindowDispacher.GetInstance; var result = windowDispacher.GetWindowByUserControl(typeof(ViewCallRedirect)) as WindowStandard; if (result != null) { return(result); } result = new WindowStandard(new ViewCallRedirect(currentModelCall)) { MinWidth = 400, MinHeight = 630, Height = 630, Width = 400, WindowStartupLocation = WindowStartupLocation.CenterOwner }; result.Activated += (sender, args) => { windowDispacher.SetActiveWindow(result); }; windowDispacher.AddToListWindow(result); result.Closed += (sender, args) => { windowDispacher.DeleteToListWindow(result); }; return(result); }