コード例 #1
0
 private void Settings_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         Localizer.TranslateControl(this);
         lvUsers.SetObjects(members.GetAllUsers());
         country = demo.GetCountry();
         countryView1.LoadCountry(country, true);
         diseasePickerControl1.LoadLists(true);
         // Tell the AdminLevelTypesControl that it is not being launched from the StartUp wizard
         adminLevelTypesControl1.IsStartUp = false;
     }
 }
コード例 #2
0
 private void TaskForceCountryStep_Load(object sender, EventArgs e)
 {
     if (!DesignMode)
     {
         Localizer.TranslateControl(this);
         country = demo.GetCountry();
         if (!string.IsNullOrEmpty(country.TaskForceName))
             DoNextStep();
         TaskForceApi api = new TaskForceApi();
         var taskForceCountries = api.GetAllCountries();
         var tfCountry = taskForceCountries.FirstOrDefault(c => c.Name == country.Name);
         if (tfCountry != null)
         {
             country.TaskForceName = tfCountry.Name;
             var userId = ApplicationData.Instance.GetUserId();
             demo.UpdateCountry(country, userId);
             DoNextStep();
         }
         adminUnitMatcher1.BindData(new AdminLevel { Name = country.Name }, taskForceCountries);
     }
 }
コード例 #3
0
 public StepCountrySettings(Country c)
     : base()
 {
     model = c;
     InitializeComponent();
 }
コード例 #4
0
ファイル: CountryView.cs プロジェクト: ericjohnolson/NadaNtd
 public void LoadCountry(Country country, bool showDate)
 {
     model = country;
     bsCountry.DataSource = model;
 }