示例#1
0
        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);
        }
示例#2
0
 // 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();
 }
示例#3
0
        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);
        }