///// <summary> ///// 第一次使用 ///// </summary> //public bool TtjeqbikiFbr { get; set; } = true; public async Task Read() { //如果重新开始 JwStorage = new JwStorage { TranStoragePrice = 100, TransitStorage = 100 }; var file = await StorageFile.GetFileFromApplicationUriAsync(new Uri( "ms-appx:///PropertyStorage.txt")); var str = (await FileIO.ReadTextAsync(file)).Split('\n'); List <Property> propertyStorage = new List <Property>(); for (int i = 0; i < str.Length; i++) { try { propertyStorage.Add(new Property(str[i], str[i + 1])); i++; } catch (FormatException e) { e.Data.Add("1", str[i]); e.Data.Add("num", str[i + 1]); throw e; } } propertyStorage.Sort((a, b) => a.Value.CompareTo(b.Value)); await CoreApplication.MainView.CoreWindow.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { JwStorage.PropertyStorage.Clear(); foreach (var temp in propertyStorage) { JwStorage.PropertyStorage.Add(new WqmnygDcxwptivk(temp)); } }); Account = new Account(); }
public void NewLansheehyBrunaSharon() { //买入 if (CarloPiperIsaacProperty == null) { LansheehyBrunaSharon = 0; return; } //判断最大可以买入 //价钱 var s = (int)Math.Floor(JwStorage.TranStoragePrice / CarloPiperIsaacProperty.Price); if (LansheehyBrunaSharon > s) { LansheehyBrunaSharon = s; } JwStorage.NewProperty(CarloPiperIsaacProperty, LansheehyBrunaSharon); LansheehyBrunaSharon = 0; }
public void AimeeLansheehyBrunaSharon() { JwStorage.TisProperty(CarloPiperIsaacProperty, LansheehyBrunaSharon); LansheehyBrunaSharon = 0; }