Esempio n. 1
0
        private void InitializeAnalyzeOptionsGroup()
        {
            AnalyzeOptionsStackPanel.Children.Clear();
            AnalyzeOption options = LabSessionManager.GetAvailableAnalyzeOptions(researchType, GetCurrentModelType());

            for (int i = 0; i < Enum.GetNames(typeof(AnalyzeOption)).Length; ++i)
            {
                int k = (int)options & (1 << i);
                if (k != 0)
                {
                    CheckBox option = new CheckBox()
                    {
                        Content = ((AnalyzeOption)k).ToString()
                    };
                    AnalyzeOptionsStackPanel.Children.Add(option);
                }
            }
        }
Esempio n. 2
0
        private void AddAnalizeOptionsList()
        {
            if (!LabSessionManager.IsResearchCreated())
            {
                return;
            }
            AnalyzeOptionsMenuItem.Items.Clear();
            AnalyzeOption options = LabSessionManager.GetAvailableAnalyzeOptions(LabSessionManager.GetResearchType(), LabSessionManager.GetResearchModelType());

            for (int i = 0; i < Enum.GetNames(typeof(AnalyzeOption)).Length; ++i)
            {
                int k = (int)options & (1 << i);
                if (k != 0)
                {
                    CheckBox option = new CheckBox()
                    {
                        Content = ((AnalyzeOption)k).ToString()
                    };
                    AnalyzeOptionsMenuItem.Items.Add(option);
                }
            }
        }