コード例 #1
0
        public SiteChooser()
        {
            InitializeComponent();

            //Read body sites from configuration file
            SitesList = new List <BodySite>();
            SitesConfiguration sitesConfig = RapidPlanEvaluation.Myconfig.GetSitesConfiguration();

            foreach (Site site in sitesConfig.Sites)
            {
                SitesList.Add(new BodySite
                {
                    Name       = site.Name,
                    IsSelected = false
                });
            }
            SitesList[0].IsSelected = true;
        }
コード例 #2
0
        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            BodySite           selSite     = SitesList.SingleOrDefault(s => s.IsSelected);
            SitesConfiguration sitesConfig = RapidPlanEvaluation.Myconfig.GetSitesConfiguration();

            foreach (Site site in sitesConfig.Sites)
            {
                if (site.Name == selSite.Name)
                {
                    AlphaBeta = site.AlphaBeta;
                    LKBn      = site.LKBn;
                    LKBm      = site.LKBm;
                    LKBD50    = site.LKBd50;
                    break;
                }
            }

            DialogResult = true;
        }