Exemplo n.º 1
0
            public static void ExportEnergyLabel(PackagedSolution packaged)
            {
                if (packaged.EnergyLabel.Count <= 0)
                {
                    return;
                }

                var fixedDoc = new FixedDocument();

                var v  = new LabelLayout();
                var vm = new LabelExportViewModel(packaged);

                fixedDoc.Pages.Add(CreatePageContent(v, vm));

                var calculationLayout    = new CalculationLayout();
                var calculationViewModel = new CalculationViewModel(packaged.EnergyLabel);

                calculationViewModel.Setup();

                fixedDoc.Pages.Add(CreatePageContent(calculationLayout, calculationViewModel));

                if (packaged.EnergyLabel.Count > 1)
                {
                    calculationLayout    = new CalculationLayout();
                    calculationViewModel = new CalculationViewModel(packaged.EnergyLabel);
                    calculationViewModel.SetupSpecialPage();
                    fixedDoc.Pages.Add(CreatePageContent(calculationLayout, calculationViewModel));
                }

                IDocumentPaginatorSource dps = fixedDoc;

                RunSaveDialog(fixedDoc.DocumentPaginator, packaged.Name);
            }
Exemplo n.º 2
0
 /// <summary>
 /// Overridden to start an animation when the page is displayed on screen.
 /// </summary>
 protected override async void OnAppearing()
 {
     base.OnAppearing();
     await LabelLayout.FadeTo(1.0, 2000, Easing.CubicInOut);
 }
Exemplo n.º 3
0
        public Styling()
        {
            normalGrid        = new GridLayout();
            normalGrid.width  = 950;
            normalGrid.height = 450;
            normalGrid.margin = new Thickness(0);

            textLayout            = new TextLayout();
            textLayout.fontFamily = new FontFamily("Cambria");

            imageLayout        = new ImageLayout();
            imageLayout.width  = 500;
            imageLayout.height = 250;
            imageLayout.margin = new Thickness(100, 50, 100, 50); //<----

            normalButton        = new ButtonLayout();
            normalButton.width  = 200;
            normalButton.height = 50;
            normalButton.margin = new Thickness(5); //<----

            menuButton        = new ButtonLayout();
            menuButton.width  = 250;
            menuButton.height = 50;
            menuButton.margin = new Thickness(0); //<----

            backButton        = new ButtonLayout();
            backButton.width  = 200;
            backButton.height = 50;
            backButton.margin = new Thickness(0); //<----

            textBoxLayout        = new TextBoxLayout();
            textBoxLayout.width  = 200;
            textBoxLayout.height = 25;
            textBoxLayout.margin = new Thickness(0); //<----

            normalLabel          = new LabelLayout();
            normalLabel.width    = 200;
            normalLabel.height   = 25;
            normalLabel.margin   = new Thickness(0); //<----
            normalLabel.fontSize = 12;

            titleLabel          = new LabelLayout();
            titleLabel.width    = 500;
            titleLabel.height   = 50;
            titleLabel.margin   = new Thickness(10);
            titleLabel.fontSize = 24;

            mainMenuStackPanel        = new StackLayout();
            mainMenuStackPanel.width  = 750;
            mainMenuStackPanel.height = 50;
            mainMenuStackPanel.margin = new Thickness(0, 37.5, 0, 37.5); //<----

            calculateStackPanel        = new StackLayout();
            calculateStackPanel.width  = 500;
            calculateStackPanel.height = 50;
            calculateStackPanel.margin = new Thickness(0, 0, 0, 0);

            inputFieldLayout        = new StackLayout();
            inputFieldLayout.width  = 50;
            inputFieldLayout.height = 200;
            inputFieldLayout.margin = new Thickness(0, 0, 0, 0);
        }