public LoginForm() { InitializeComponent(); _loginPresenter = new LoginPresenter(this); ModelCore.SetDefaultLocalConfig(); }
private async void CreateAsync(object window) { Window win = window as Window; string entity = ""; ModelCore _modelCore = null; try { SettingsCore settings = new SettingsCore(); settings.SettingsSerialize(); _modelCore = new Cores.ModelCore(new ConnectionModel(Type, ConnString)); entity = _modelCore.CreateModel(Document.Text, settings.Settings); } catch (Exception ex) { await _dialogCoordinator.ShowMessageAsync(this, $"Error!", $"Error message: {ex.Message} /r/nStackTrace: {ex.StackTrace}"); return; } if (_modelCore != null && _modelCore.Errors.Count > 0) { await _dialogCoordinator.ShowMessageAsync(this, $"Error!", $"Error message: {_modelCore.Errors.First().Message} /r/nStackTrace: {_modelCore.Errors.First().StackTrace}"); } else { win.Tag = entity; win.DialogResult = true; win.Close(); } }
public SelectSoftViewModel() { ModelCore core = new ModelCore(); core.Start(); ParseSoft(core.GetSoftwareDT()); }
public override void InitializeSites(string initialCommunitiesText, string initialCommunitiesMap, ICore modelCore) { ModelCore.UI.WriteLine(" Loading initial communities from file \"{0}\" ...", initialCommunitiesText); Landis.Library.InitialCommunities.DatasetParser parser = new Landis.Library.InitialCommunities.DatasetParser(Timestep, ModelCore.Species); Landis.Library.InitialCommunities.IDataset communities = Landis.Data.Load <Landis.Library.InitialCommunities.IDataset>(initialCommunitiesText, parser); ModelCore.UI.WriteLine(" Reading initial communities map \"{0}\" ...", initialCommunitiesMap); IInputRaster <uintPixel> map; map = ModelCore.OpenRaster <uintPixel>(initialCommunitiesMap); using (map) { uintPixel pixel = map.BufferPixel; foreach (Site site in ModelCore.Landscape.AllSites) { map.ReadBufferPixel(); uint mapCode = pixel.MapCode.Value; if (!site.IsActive) { continue; } //if (!modelCore.Ecoregion[site].Active) // continue; //modelCore.Log.WriteLine("ecoregion = {0}.", modelCore.Ecoregion[site]); ActiveSite activeSite = (ActiveSite)site; initialCommunity = communities.Find(mapCode); if (initialCommunity == null) { throw new ApplicationException(string.Format("Unknown map code for initial community: {0}", mapCode)); } InitializeSite(activeSite); } } }
public DistributionViewModel(ModelCore core) { this.core = core; this.core.DataUpdate += Core_DataUpdate; ImportData(); }
public UpdateFormViewModel(ModelCore core, string softName) { this.core = core; this.softName = softName; ImportUpdates(); }
public BanggiaModel() { OnCreating(); BanggiaId = ModelCore.GetGuidId(); OnCreated(); }
public InstallWindowVM(ModelCore core) { this.core = core; this.core.DataUpdate += Core_DataUpdate; }
public SelectSoftViewModel(ModelCore core) { ParseSoft(core.GetSoftwareDT()); }
public EditWindowVM(ModelCore core) { this.core = core; }
/// <summary>ビュー側の初期化が終了した後で主処理を開始します。</summary> public void Initialize() { _modelCore = ModelCore.LoadAndStart(this, this, this); }
public ChitietHoadonModel() { OnCreating(); ChitietHoadonId = ModelCore.GetGuidId(); OnCreated(); }
public Item() { OnCreating(); ItemId = ModelCore.GetGuidId(); OnCreated(); }
public HanghoaModel() { OnCreating(); HanghoaId = ModelCore.GetGuidId(); OnCreated(); }
public _UserModel() { OnCreating(); _UserId = ModelCore.GetGuidId(); OnCreated(); }
public HoadonModel() { OnCreating(); HoadonId = ModelCore.GetGuidId(); OnCreated(); }