コード例 #1
0
 private bool Equals(StabilityPointStructure other)
 {
     return(StorageStructureArea.Equals(other.StorageStructureArea) &&
            AllowedLevelIncreaseStorage.Equals(other.AllowedLevelIncreaseStorage) &&
            WidthFlowApertures.Equals(other.WidthFlowApertures) &&
            InsideWaterLevel.Equals(other.InsideWaterLevel) &&
            ThresholdHeightOpenWeir.Equals(other.ThresholdHeightOpenWeir) &&
            CriticalOvertoppingDischarge.Equals(other.CriticalOvertoppingDischarge) &&
            FlowWidthAtBottomProtection.Equals(other.FlowWidthAtBottomProtection) &&
            ConstructiveStrengthLinearLoadModel.Equals(other.ConstructiveStrengthLinearLoadModel) &&
            ConstructiveStrengthQuadraticLoadModel.Equals(other.ConstructiveStrengthQuadraticLoadModel) &&
            BankWidth.Equals(other.BankWidth) &&
            InsideWaterLevelFailureConstruction.Equals(other.InsideWaterLevelFailureConstruction) &&
            EvaluationLevel.Equals(other.EvaluationLevel) &&
            LevelCrestStructure.Equals(other.LevelCrestStructure) &&
            VerticalDistance.Equals(other.VerticalDistance) &&
            FailureProbabilityRepairClosure.Equals(other.FailureProbabilityRepairClosure) &&
            FailureCollisionEnergy.Equals(other.FailureCollisionEnergy) &&
            ShipMass.Equals(other.ShipMass) &&
            ShipVelocity.Equals(other.ShipVelocity) &&
            LevellingCount.Equals(other.LevellingCount) &&
            ProbabilityCollisionSecondaryStructure.Equals(other.ProbabilityCollisionSecondaryStructure) &&
            FlowVelocityStructureClosable.Equals(other.FlowVelocityStructureClosable) &&
            StabilityLinearLoadModel.Equals(other.StabilityLinearLoadModel) &&
            StabilityQuadraticLoadModel.Equals(other.StabilityQuadraticLoadModel) &&
            AreaFlowApertures.Equals(other.AreaFlowApertures) &&
            InflowModelType.Equals(other.InflowModelType));
 }
コード例 #2
0
        private void update_level_description(string tag, int level)
        {
            int idx;

            for (idx = 0; idx < grdEvaluationScheme.Children.Count; idx++)
            {
                UIElement ui_element = grdEvaluationScheme.Children[idx];
                if (ui_element is TextBox)
                {
                    TextBox txt = (TextBox)ui_element;
                    if (txt.Tag != null)
                    {
                        _log.Info("  textbox " + txt.Tag.ToString());
                        if (txt.Tag.ToString() == tag)
                        {
                            _log.Info("Found textbox " + txt.Tag.ToString());
                            if (level < 0)
                            {
                                txt.Text       = "";
                                txt.Background = new SolidColorBrush(Color.FromArgb(0, 0, 0, 0));
                            }
                            else
                            {
                                int chapter_idx = 0;
                                int section_idx = 0;
                                StudentEvaluationItem.DecodeTag(tag, out chapter_idx, out section_idx);
                                string level_description = DataContainer.Instance.EvaluationScheme.GetLevelDescription(chapter_idx, section_idx, level);
                                txt.Text       = level_description;
                                txt.Background = new SolidColorBrush(EvaluationLevel.GetLevelColor(level));
                            }
                            return;
                        }
                    }
                }
            }
        }
コード例 #3
0
        private void on_set_evaluation_scheme()
        {
            int           chapter_idx = 0;
            int           section_idx = 0;
            int           grid_row    = 0;
            RowDefinition rd;
            TextBox       tb;
            ComboBox      cmb;
            int           idx;

            // Load evaluation scheme info on UI

            _loading_evaluation_scheme = true;

            grdEvaluationScheme.Children.Clear();
            grdEvaluationScheme.RowDefinitions.Clear();

            if (_evaluation_scheme == null)
            {
                return;
            }

            foreach (EvaluationChapter chapter in _evaluation_scheme.Chapters)
            {
                // Chapter title
                rd        = new RowDefinition();
                rd.Height = GridLength.Auto;
                grdEvaluationScheme.RowDefinitions.Add(rd);
                tb              = new TextBox();
                tb.Text         = (chapter_idx + 1).ToString() + ". " + chapter.Name;
                tb.TextWrapping = TextWrapping.Wrap;
                tb.IsReadOnly   = true;
                tb.FontSize     = 22;
                tb.SetValue(TextBlock.FontWeightProperty, FontWeights.Bold);
                tb.BorderThickness = new Thickness(0, 0, 0, 1);
                //tb.Background = new SolidColorBrush(Color.FromRgb(240, 240, 240));
                tb.Padding = new Thickness(0, 2, 0, 2);
                tb.Margin  = new Thickness(3, 40, 3, 3);
                grdEvaluationScheme.Children.Add(tb);
                Grid.SetRow(tb, grid_row);
                grid_row++;

                // Chapter description
                rd        = new RowDefinition();
                rd.Height = GridLength.Auto;
                grdEvaluationScheme.RowDefinitions.Add(rd);
                tb                 = new TextBox();
                tb.Text            = chapter.Description;
                tb.TextWrapping    = TextWrapping.Wrap;
                tb.IsReadOnly      = true;
                tb.FontSize        = 12;
                tb.BorderThickness = new Thickness(0);
                grdEvaluationScheme.Children.Add(tb);
                Grid.SetRow(tb, grid_row);
                grid_row++;

                // Sections
                section_idx = 0;
                foreach (EvaluationSection sec in chapter.Sections)
                {
                    // Section title (name)
                    rd        = new RowDefinition();
                    rd.Height = GridLength.Auto;
                    grdEvaluationScheme.RowDefinitions.Add(rd);
                    tb              = new TextBox();
                    tb.Text         = (chapter_idx + 1).ToString() + "." + (section_idx + 1).ToString() + ". " + sec.Name;
                    tb.TextWrapping = TextWrapping.Wrap;
                    tb.IsReadOnly   = true;
                    tb.FontSize     = 14;
                    tb.SetValue(TextBlock.FontWeightProperty, FontWeights.Bold);
                    tb.BorderThickness = new Thickness(0);
                    tb.Margin          = new Thickness(3, 20, 3, 3);
                    grdEvaluationScheme.Children.Add(tb);
                    Grid.SetRow(tb, grid_row);
                    grid_row++;

                    // Section description
                    rd        = new RowDefinition();
                    rd.Height = GridLength.Auto;
                    grdEvaluationScheme.RowDefinitions.Add(rd);
                    tb                 = new TextBox();
                    tb.Text            = sec.Description;
                    tb.TextWrapping    = TextWrapping.Wrap;
                    tb.IsReadOnly      = true;
                    tb.FontSize        = 12;
                    tb.BorderThickness = new Thickness(0);
                    grdEvaluationScheme.Children.Add(tb);
                    Grid.SetRow(tb, grid_row);
                    grid_row++;

                    // Level
                    rd        = new RowDefinition();
                    rd.Height = GridLength.Auto;
                    grdEvaluationScheme.RowDefinitions.Add(rd);
                    cmb     = new ComboBox();
                    cmb.Tag = StudentEvaluationItem.EncodeTag(chapter_idx, section_idx);
                    _log.Info("Create combobox tag " + cmb.Tag.ToString());
                    cmb.Width               = 160;
                    cmb.Margin              = new Thickness(3, 3, 3, 3);
                    cmb.SelectionChanged   += Cmb_SelectionChanged;
                    cmb.HorizontalAlignment = HorizontalAlignment.Left;
                    for (idx = 0; idx < sec.Levels.Count; idx++)
                    {
                        ComboBoxItem i = new ComboBoxItem();
                        i.Tag     = sec.Levels[idx].Level;
                        i.Content = "Livello " + sec.Levels[idx].Level.ToString() + " " + EvaluationLevel.GetLevelDescription(sec.Levels[idx].Level);
                        cmb.Items.Add(i);
                    }
                    grdEvaluationScheme.Children.Add(cmb);
                    Grid.SetRow(cmb, grid_row);
                    grid_row++;

                    // Level description
                    rd        = new RowDefinition();
                    rd.Height = GridLength.Auto;
                    grdEvaluationScheme.RowDefinitions.Add(rd);
                    tb      = new TextBox();
                    tb.Text = "";
                    tb.Tag  = StudentEvaluationItem.EncodeTag(chapter_idx, section_idx);
                    _log.Info("Create textbox tag " + tb.Tag.ToString());
                    tb.TextWrapping    = TextWrapping.Wrap;
                    tb.IsReadOnly      = true;
                    tb.FontStyle       = FontStyles.Italic;
                    tb.FontSize        = 12;
                    tb.BorderThickness = new Thickness(0);
                    grdEvaluationScheme.Children.Add(tb);
                    Grid.SetRow(tb, grid_row);
                    grid_row++;

                    section_idx++;
                }

                chapter_idx++;
            }

            rd = new RowDefinition();
            grdEvaluationScheme.RowDefinitions.Add(rd);

            _loading_evaluation_scheme = false;
        }
コード例 #4
0
        private void evaluation_scheme_load_fake_data()
        {
            EvaluationChapter chapter;
            EvaluationSection sec;
            EvaluationLevel   it;

            _log.Info("Rubrica valutativa, caricamento dati fittizi");

            EvaluationScheme scheme = new EvaluationScheme();

            scheme.Release          = "1.0";
            scheme.DatePubblication = new DateTime(2018, 11, 17);
            scheme.Notes            = "Fake data";
            scheme.Chapters         = new List <EvaluationChapter>();

            chapter             = new EvaluationChapter();
            chapter.Name        = "Il sé e l’altro";
            chapter.Description = "Frequentando la scuola, il bambino ha l’opportunità di ampliare il mondo delle proprie relazioni e può così sviluppare meglio le sue “capacità non soltanto di stare genericamente con gli altri, ma anche di comprendere, condividere, aiutare e cooperare”. Le diverse esperienze che riguardano “il sé e l’altro” si intrecciano con le attività degli altri campi e tendono allo sviluppo affettivo ed emotivo, sociale, etico morale e di un corretto atteggiamento nei confronti della religiosità e delle religioni.";
            chapter.Sections    = new List <EvaluationSection>();
            sec             = new EvaluationSection();
            sec.Name        = "Sviluppo dell’identità e dell’autonomia personale";
            sec.Description = "Il bambino e se stesso: riconosce, ed esprime i propri bisogni, esigenze, sentimenti, capacità.";
            sec.Levels      = new List <EvaluationLevel>();
            it             = new EvaluationLevel();
            it.Level       = 1;
            it.Description = "Su invito dell’insegnante che lo sostiene emotivamente, esprime i propri bisogni primari, esigenze. Con l’aiuto dell’insegnante osserva le routine della giornata. Stimolato, scopre le proprie capacità ed inizia a maturare un positivo senso di sé.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 2;
            it.Description = "Esprime i propri bisogni primari e le principali emozioni; racconta i propri vissuti con domande stimolo dell’insegnante. Inizia a scoprire le proprie capacità e ad avere fiducia in sé.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 3;
            it.Description = "Esprime in modo consapevole i propri bisogni/esigenze che riconosce su di sé e sugli altri. Manifesta i propri stati d’animo / emozioni con i diversi linguaggi ed inizia a gestirli ed a controllarli. Ha fiducia nelle proprie capacità.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 4;
            it.Description = "Esprime in modo autonomo, pertinente e responsabile le proprie e altrui esigenze formulando ipotesi e trovando soluzioni adeguate. Ha una buona immagine di sé: ha sicurezza e fiducia nelle proprie capacità.";
            sec.Levels.Add(it);
            chapter.Sections.Add(sec);

            sec             = new EvaluationSection();
            sec.Name        = "Socializzazione";
            sec.Description = "Il bambino e gli altri: accetta gli altri, coetanei e adulti e partecipa all'attività di gruppo.";
            sec.Levels      = new List <EvaluationLevel>();
            it             = new EvaluationLevel();
            it.Level       = 1;
            it.Description = "E’ interessato ai coetanei, agli adulti e all’ambiente circostante; gioca vicino ai compagni e con l’aiuto dell’insegnante partecipa alle attività collettive mantenendo l’attenzione per brevi periodi.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 2;
            it.Description = "Condivide semplici esperienze con i pari: gioca con i compagni scambiando informazioni, si relaziona positivamente con il piccolo gruppo. Nelle attività collettive inizia a manifestare interesse apportando il proprio contributo.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 3;
            it.Description = "Accetta i compagni ed è disponibile ad aiutare chi è in difficoltà, riconosce i diversi ruoli. Partecipa attivamente alle esperienze del grande gruppo collaborando in modo proficuo.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 4;
            it.Description = "Accetta i pari e gli adulti che rispetta e con i quali interagisce positivamente, giocando e lavorando in modo costruttivo e creativo. Si accorge delle difficoltà dei compagni che aiuta spontanea - mente; dell’adulto tiene in considerazione suggerimenti e consigli. Affronta con interesse e curiosità le varie attività proposte: pone domande, formula ipotesi.";
            sec.Levels.Add(it);
            chapter.Sections.Add(sec);

            scheme.Chapters.Add(chapter);

            chapter             = new EvaluationChapter();
            chapter.Name        = "Il corpo e il movimento";
            chapter.Description = "Il corpo è il primo medium dell’apprendimento. Attraverso il corpo il bambino impara a prendere consapevolezza della realtà che lo circonda nello spazio, a relazionarsi con la realtà esterna, a esprimere i suoi sentimenti (gioia, tristezza, paura, dolore , affetto...). In breve: a conoscere e a comunicare.";
            chapter.Sections    = new List <EvaluationSection>();
            sec = new EvaluationSection();

            sec             = new EvaluationSection();
            sec.Name        = "Cura di sé";
            sec.Description = "Il bambino ha cura del proprio corpo nei comportamenti di igiene, nel vestirsi e nell’alimentazione.";
            sec.Levels      = new List <EvaluationLevel>();
            it             = new EvaluationLevel();
            it.Level       = 1;
            it.Description = "Con l’aiuto dell’adulto o di un compagno tutor, inizia a conoscere la routine scolastica: accede ai servizi e talvolta si tiene pulito, si lava le mani; si nutre, si lascia vestire e svestire.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 2;
            it.Description = "Sollecitato verbalmente dell’adulto che lo invita a tenersi pulito, a mangiare servendosi delle posate, talvolta riesce ad effettuare correttamente la routine scolastica. Prova a vestirsi/svestirsi. Comincia a chiedere aiuto all’adulto nei momenti di difficoltà.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 3;
            it.Description = "In autonomia si tiene pulito e conosce ed osserva le pratiche igieniche di routine; sa vestirsi e svestirsi; mangia correttamente e sa stare seduto composto. Esprime le proprie preferenze alimentari e accetta di assaggiare alimenti nuovi.";
            sec.Levels.Add(it);
            it             = new EvaluationLevel();
            it.Level       = 4;
            it.Description = "Ha interiorizzato e consolidato la routine scolastica; ha cura del proprio corpo. Sa vestirsi e svestirsi manifestando la capacità di autoregolazione termica, abbottonare e sbottonare, allacciare e slacciare. Mangia correttamente e sa stare seduto composto, aiuta gli altri e sa dar loro corrette indicazioni di comportamento.";
            sec.Levels.Add(it);
            chapter.Sections.Add(sec);

            scheme.Chapters.Add(chapter);

            EvaluationScheme = scheme;

            //chapter = new EvaluationChapter();
            //chapter.Name = "";
            //chapter.Description = "";
            //chapter.Sections = new List<EvaluationSection>();

            //sec = new EvaluationSection();
            //sec.Name = "";
            //sec.Description = "";
            //sec.Items = new List<EvaluationItem>();

            //it = new EvaluationItem();
            //it.Level = 1;
            //it.Description = "";
            //sec.Items.Add(it);
            //it = new EvaluationItem();
            //it.Level = 2;
            //it.Description = "";
            //sec.Items.Add(it);
            //it = new EvaluationItem();
            //it.Level = 3;
            //it.Description = "";
            //sec.Items.Add(it);
            //it = new EvaluationItem();
            //it.Level = 4;
            //it.Description = "";
            //sec.Items.Add(it);
            //chapter.Sections.Add(sec);
        }