Exemple #1
0
        public static void OnAddNewAssessment(object sender, ExecutedRoutedEventArgs e)
        {
            AssessmentsGrid control = sender as AssessmentsGrid;

            if (control == null)
            {
                return;
            }
            if (e.OriginalSource is DataGridCell)
            {
                try
                {
                }
                catch (InvalidCastException ex)
                {
                    control.AddAssessmentMethod();
                }
            }
        }
Exemple #2
0
        public MainWindow()
        {
            XamlResourceLoader.Instance.LoadResource(XamlResourceLoader.Instance.RisksThemeFiles, App.Current.Resources);

            //assessments.Add(new Assessment(1, 1, 1, 1, 1, 1, 1, 1));
            Helper.LoadFromFile();
            InitializeComponent();
            ExpertsGrid     experts = new ExpertsGrid();
            RisksGrid       risks   = new RisksGrid();
            AssessmentsGrid asm     = new AssessmentsGrid();
            ResultGrid      result  = new ResultGrid();

            //EnterpriseFactory.Instance.Experts.Add(new Expert(1, "Nik"));
            //EnterpriseFactory.Instance.Risks.Add(new Risk(1, "NesterovExam"));
            //EnterpriseFactory.Instance.Assessments.Add(new Assessment(1, 1, 1, 1, 1, 1, 1, 1));
            OptControl.ItemsCollection.Add(new OptionsSelectorItem("Experts", experts));
            OptControl.ItemsCollection.Add(new OptionsSelectorItem("Risks", risks));
            OptControl.ItemsCollection.Add(new OptionsSelectorItem("Assessments", asm));
            OptControl.ItemsCollection.Add(new OptionsSelectorItem("Results", result));
            OptControl.ItemsCollection.Add(new OptionsSelectorItem("Charts", asm));
            OptControl.SelectedMenuItem = OptControl.ItemsCollection[0];
        }
Exemple #3
0
        private static void SelectedExpertChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            AssessmentsGrid control = d as AssessmentsGrid;

            control.FilterCollection();
        }