コード例 #1
0
        ///<summary> Открывает модальное окно и возвращает список выбранных пользователей (некрасивое решение, надо бы переделать потом) </summary>
        public static List <ModelContact> ShowSelectionContact()
        {
            var view = new ViewSelectionContact();

            var windowStandard = new WindowStandard(view)
            {
                MinHeight             = 450,
                Height                = 500,
                MinWidth              = 500,
                Width                 = 550,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                Owner                 = WindowMain.CurrentMainWindow
            };

            windowStandard.ShowDialog();

            return(view.ListSeleModelContact);
        }
コード例 #2
0
        /// <summary> Отобразить окно отправки контакта </summary>
        public static List <ModelContact> ShowSendContacts()
        {
            var view = new ViewSelectionContact();

            view.RefreshListModelContact();
            view.ButtonOk.SetResourceReference(Button.ContentProperty, "ViewSelectionContact_Send");
            view.WindowCaptionResourceKey = @"ViewSelectionContact_SendContact";
            var windowStandard = new WindowStandard(view)
            {
                MinHeight             = 450,
                Height                = 500,
                MinWidth              = 500,
                Width                 = 550,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                Owner                 = WindowMain.CurrentMainWindow
            };

            windowStandard.ShowDialog();

            return(view.ListSeleModelContact);
        }
コード例 #3
0
        /// <summary> Отобразить окно с учасниками чата </summary>
        public static List <ModelContact> ShowInviteAndRevokeChatMembers(List <ModelContact> chatMembers)
        {
            var view = new ViewSelectionContact();

            view._viewModelSelectionContact.SelectListModelContact(chatMembers);
            view.RefreshListModelContact();
            view.ButtonOk.SetResourceReference(Button.ContentProperty, "ViewSelectionContact_Save");
            view.WindowCaptionResourceKey = @"ViewSelectionContact_ChatMembers";
            var windowStandard = new WindowStandard(view)
            {
                MinHeight             = 450,
                Height                = 500,
                MinWidth              = 500,
                Width                 = 550,
                WindowStartupLocation = WindowStartupLocation.CenterOwner,
                Owner                 = WindowMain.CurrentMainWindow
            };

            windowStandard.ShowDialog();

            return(view.ListSeleModelContact);
        }