Exemplo n.º 1
0
 public czart(List <Favad1.favadresults> data, WaterNetwork waterNetwork, BurstCoeffs burst, Favad1.favadcoefficients favadcoeff, Favad1.difference diff)
 {
     this.InitializeComponent();
     //this.Model = CreateNormalDistributionModel();
     this.DataContext  = this;
     this.rekord       = data;
     this.waterNetwork = waterNetwork;
     this.bust         = burst;
     this.diff         = diff;
     this.Model        = CreateNormalDistributionModel(data, waterNetwork, favadcoeff, burst);
     this.ShowResults(data, burst, diff);
 }
Exemplo n.º 2
0
        private int ShowResults(List <Favad1.favadresults> data1, BurstCoeffs burst, Favad1.difference diff)
        {
            var hig = 40;

            data1.Reverse();
            ColumnDefinition colDef1 = new ColumnDefinition();
            ColumnDefinition colDef2 = new ColumnDefinition();
            ColumnDefinition colDef3 = new ColumnDefinition();
            ColumnDefinition colDef4 = new ColumnDefinition();
            ColumnDefinition colDef5 = new ColumnDefinition();
            ColumnDefinition colDef6 = new ColumnDefinition();

            FavadResultsGrid.ColumnDefinitions.Add(colDef1);
            FavadResultsGrid.ColumnDefinitions.Add(colDef2);
            FavadResultsGrid.ColumnDefinitions.Add(colDef3);
            FavadResultsGrid.ColumnDefinitions.Add(colDef4);
            FavadResultsGrid.ColumnDefinitions.Add(colDef5);
            FavadResultsGrid.ColumnDefinitions.Add(colDef6);
            for (int i = 0; i < data1.Count; i++)
            {
                FavadResultsGrid.RowDefinitions.Add(new RowDefinition());
            }
            //create headers
            TextBlock column0Header = new TextBlock();

            column0Header.Text                = "PRV Step No.";
            column0Header.Height              = hig;
            column0Header.Width               = 150;
            column0Header.TextWrapping        = TextWrapping.Wrap;
            column0Header.TextAlignment       = TextAlignment.Left;
            column0Header.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            column0Header.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
            Grid.SetColumn(column0Header, 0);
            Grid.SetRow(column0Header, 0);
            FavadResultsGrid.Children.Add(column0Header);

            TextBlock column1Header = new TextBlock();

            column1Header.Text                = "Burst flow FAVAD N1 Update";
            column1Header.Height              = hig;
            column1Header.Width               = 150;
            column1Header.TextWrapping        = TextWrapping.Wrap;
            column1Header.TextAlignment       = TextAlignment.Left;
            column1Header.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            column1Header.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
            Grid.SetColumn(column1Header, 1);
            Grid.SetRow(column1Header, 0);

            FavadResultsGrid.Children.Add(column1Header);

            TextBlock column2Header = new TextBlock();

            column2Header.Text                = "AZNP";
            column2Header.Height              = hig;
            column2Header.Width               = 50;
            column2Header.TextWrapping        = TextWrapping.Wrap;
            column2Header.TextAlignment       = TextAlignment.Left;
            column2Header.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            column2Header.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
            Grid.SetColumn(column2Header, 2);
            Grid.SetRow(column2Header, 0);

            FavadResultsGrid.Children.Add(column2Header);

            TextBlock column3Header = new TextBlock();

            column3Header.Text                = "Flow from Burst Detectror";
            column3Header.Height              = hig;
            column3Header.Width               = 200;
            column0Header.TextWrapping        = TextWrapping.Wrap;
            column3Header.TextAlignment       = TextAlignment.Left;
            column3Header.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            column3Header.VerticalAlignment   = System.Windows.VerticalAlignment.Center;
            Grid.SetColumn(column3Header, 3);
            Grid.SetRow(column3Header, 0);

            FavadResultsGrid.Children.Add(column3Header);

            TextBlock column4Header = new TextBlock();

            column4Header.Text                = "Mean difference Favad";
            column4Header.Height              = hig;
            column4Header.Width               = 150;
            column4Header.TextWrapping        = TextWrapping.Wrap;
            column4Header.TextAlignment       = TextAlignment.Left;
            column4Header.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;
            column4Header.VerticalAlignment   = System.Windows.VerticalAlignment.Center; / 09