コード例 #1
0
        void PrintMemberClicked(object sender, RoutedEventArgs e)
        {
            IndividualProbationStatus individualProbationStatus = new IndividualProbationStatus(currentMember);
            List <UserControl>        userControls = new List <UserControl>()
            {
                individualProbationStatus
            };
            PrintViewer printViewer = new PrintViewer(userControls, "LetterPortrait");

            printViewer.Show();
        }
コード例 #2
0
        private void PrintMultiple(object sender, RoutedEventArgs e)
        {
            List <UserControl> userControls = new List <UserControl>();

            foreach (Member member in cvs.View)
            {
                IndividualMember individualMember = new IndividualMember(member)
                {
                    HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Top
                };
                userControls.Add(individualMember);
            }
            PrintViewer printViewer = new PrintViewer(userControls, "LetterPortrait");

            printViewer.Show();
        }
コード例 #3
0
        void PrintAllMembersClicked(object sender, RoutedEventArgs e)
        {
            List <UserControl> userControls = new List <UserControl>();

            foreach (Member item in collectionViewSource.View)
            {
                IndividualProbationStatus individualProbationStatus = new IndividualProbationStatus(item)
                {
                    HorizontalAlignment = HorizontalAlignment.Center, VerticalAlignment = VerticalAlignment.Top
                };
                userControls.Add(individualProbationStatus);
            }

            PrintViewer printViewer = new PrintViewer(userControls, "LetterPortrait");

            printViewer.Show();
        }
コード例 #4
0
        public void PrintListClicked(object sender, RoutedEventArgs e)
        {
            ReportPrint reportPrint = new ReportPrint(request)
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Top
            };

            List <UserControl> userControls = new List <UserControl>()
            {
                reportPrint
            };

            PrintViewer printViewer = new PrintViewer(userControls, "LetterPortrait");

            printViewer.Show();
        }
コード例 #5
0
        private void PrintMemberStatus(object sender, RoutedEventArgs e)
        {
            IndividualMember individualMember = new IndividualMember(member)
            {
                HorizontalAlignment = HorizontalAlignment.Center,
                VerticalAlignment   = VerticalAlignment.Top
            };
            //Grid grid = new Grid { Margin = new Thickness(0, 30, 0, 10) };
            //grid.Children.Add(individualMember);

            //PrintViewer printViewer = new PrintViewer(grid);

            List <UserControl> userControls = new List <UserControl>()
            {
                individualMember
            };
            PrintViewer printViewer = new PrintViewer(userControls, "LetterPortrain");

            printViewer.Show();
        }
コード例 #6
0
        private void PrintSelectedClicked(object sender, RoutedEventArgs e)
        {
            List <UserControl> size10Envelopes;

            if (memberEnvelopeGrid.SelectedItems.Count > 0)
            {
                size10Envelopes = new List <UserControl>();
            }
            else
            {
                return;
            }
            foreach (Member member in memberEnvelopeGrid.SelectedItems)
            {
                size10Envelopes.Add(new Size10Envelope(member));
            }
            PrintViewer printViewer = new PrintViewer(size10Envelopes, "Envelope");

            printViewer.Show();
        }
コード例 #7
0
        private void PrintMembersInView(object sender, RoutedEventArgs e)
        {
            List <UserControl> userControls = new List <UserControl>();

            if (displayType == "Member")
            {
                foreach (Member member in collectionViewSource.View)
                {
                    userControls.Add(new IndividualMember(member));
                }
            }
            else
            {
                foreach (Member member in collectionViewSource.View)
                {
                    userControls.Add(new IndividualProbationStatus(member));
                }
            }
            PrintViewer printViewer = new PrintViewer(userControls, "LetterPortrait");

            printViewer.Show();
        }
コード例 #8
0
        private void PrintSelectedMemberClicked(object sender, RoutedEventArgs e)
        {
            List <UserControl> userControls = new List <UserControl>();

            if (displayType == "Member")
            {
                foreach (Member member in memberListView.SelectedItems)
                {
                    userControls.Add(new IndividualMember(member));
                }
            }
            else
            {
                foreach (Member member in memberListView.SelectedItems)
                {
                    userControls.Add(new IndividualProbationStatus(member));
                }
            }
            PrintViewer printViewer = new PrintViewer(userControls, "LetterPortrait");

            printViewer.Show();
        }