示例#1
0
        //load statistic button
        public void LoadStatistic(object sender, RoutedEventArgs e)
        {
            statisticView.Children.Clear();
            StatisticView sv        = new StatisticView();
            Frame         statsView = new Frame();

            statsView.Content = sv;
            statisticView.Children.Add(statsView);
        }
        private void LoadStatistic(object sender, RoutedEventArgs e)
        {
            previousOperation.Children.Clear();
            StatisticView          sv = new StatisticView();
            InterventionView       iv = new InterventionView();
            VolunteerStatisticView vv = new VolunteerStatisticView();
            Frame interView           = new Frame();
            Frame statsView           = new Frame();
            Frame volunteerView       = new Frame();

            statsView.Content     = sv;
            interView.Content     = iv;
            volunteerView.Content = vv;
            previousOperation.Children.Add(statsView);
            previousOperation.Children.Add(interView);
            previousOperation.Children.Add(volunteerView);
        }
示例#3
0
        //function to export all WPF documents as a fixed document
        public void ExportWPF()
        {
            StatisticView          sv = new StatisticView();
            InterventionView       iv = new InterventionView();
            VolunteerStatisticView vs = new VolunteerStatisticView();

            FixedDocument fixedDoc       = new FixedDocument();
            PageContent   firstPageCont  = new PageContent();
            PageContent   secondPageCont = new PageContent();
            PageContent   thirdPageCont  = new PageContent();


            FixedPage firstFixedPage  = new FixedPage();
            FixedPage secondFixedPage = new FixedPage();
            FixedPage thirdFixedPage  = new FixedPage();


            Frame svFrame = new Frame();
            Frame ivFrame = new Frame();
            Frame vsFrame = new Frame();

            svFrame.Content = sv;
            ivFrame.Content = iv;
            vsFrame.Content = vs;

            firstFixedPage.Children.Add(svFrame);
            secondFixedPage.Children.Add(ivFrame);
            thirdFixedPage.Children.Add(vsFrame);

            ((System.Windows.Markup.IAddChild)firstPageCont).AddChild(firstFixedPage);
            ((System.Windows.Markup.IAddChild)secondPageCont).AddChild(secondFixedPage);
            ((System.Windows.Markup.IAddChild)thirdPageCont).AddChild(thirdFixedPage);


            fixedDoc.Pages.Add(firstPageCont);
            fixedDoc.Pages.Add(secondPageCont);
            fixedDoc.Pages.Add(thirdPageCont);


            docViewer.Document = fixedDoc;
        }