private async Task AddNewSystem(SystemPosition ps) { if (ps == null) { throw new ArgumentNullException("ps"); } var starSystem = await _persistentStore.AddNewStarSystem(ps); NetLogWatcherEventArgs args = new NetLogWatcherEventArgs(); args.CurrentSystem = starSystem; OnNewPosition(this, args); //ss.Name = ps.Name; //var sys = await _starSystemRepository.Save(ss); //LogText(string.Format("{0}: Adding system: {1}", DateTime.Now, ps.Name)); //var current = _systemPointer.Get<string>("currentObjectId"); ; //_systemPointer["lastObjectId"] = current; //_systemPointer["currentObjectId"] = sys.ObjectId; //_systemPointer = await _systemPointerRepository.Save(_systemPointer); }
// methods internal void NewPosition(object source, NetLogWatcherEventArgs args) { Invoke(new Action<string, Color>(LogText), string.Format("Added Star System {0}...", args.CurrentSystem.Name), Color.Black); PopulateSystemGrid(); }
private async Task AddNewSystem(SystemPosition ps) { if (ps == null) throw new ArgumentNullException("ps"); var starSystem = await _persistentStore.AddNewStarSystem(ps); NetLogWatcherEventArgs args = new NetLogWatcherEventArgs(); args.CurrentSystem = starSystem; OnNewPosition(this, args); //ss.Name = ps.Name; //var sys = await _starSystemRepository.Save(ss); //LogText(string.Format("{0}: Adding system: {1}", DateTime.Now, ps.Name)); //var current = _systemPointer.Get<string>("currentObjectId"); ; //_systemPointer["lastObjectId"] = current; //_systemPointer["currentObjectId"] = sys.ObjectId; //_systemPointer = await _systemPointerRepository.Save(_systemPointer); }