public XmsDemoForm() { InitializeComponent(); Logger.Init("CsDemo.log", this); m_txtMessage = new string(' ', 1024); tsDelegate = new AddToList(AddToListMethod); }
private void onResponseAddToEraseList <T>(IAsyncResult result) where T : struct { AsyncResult res = (AsyncResult)result; AddToList deleg = (AddToList)res.AsyncDelegate; deleg.EndInvoke(result); }
public override void Apply(SimpleAbilities abilities) { _modifier = new AddToList <Static>(_staticAbility); _modifier.Initialize(ChangeTracker); _abilities = abilities; _abilities.AddModifier(_modifier); }
public override void Apply(ActivatedAbilities abilities) { _abilities = abilities; _modifier = new AddToList <ActivatedAbility>(_activatedAbility); _modifier.Initialize(ChangeTracker); _activatedAbility.Initialize(OwningCard, Game); _abilities.AddModifier(_modifier); }
public Form1() { InitializeComponent(); peronsList = new ArrayList(); addToListWith_Name = new AddToList(AddToList_Name); addToListWith_Name_Gender = new AddToList(AddToList_Name_Gender); addToListWith_Name_Gender_Catagories = new AddToList(AddToList_Name_Gender_Catagory); }
public override void Apply(NamedGameModifiers namedGameModifiers) { _namedModifiers = namedGameModifiers; _modifier = new AddToList <Static>(_namedModifier); _modifier.Initialize(ChangeTracker); _namedModifiers.AddModifier(_modifier); }
public override void Apply(StaticAbilities abilities) { _abilities = abilities; _modifier = new AddToList <StaticAbility>(_staticAbility); _modifier.Initialize(ChangeTracker); _staticAbility.Initialize(OwningCard, Game); abilities.AddModifier(_modifier); }
public void OnPlaced <T>(GameObject g) where T : struct { tempList.Add(g); mouseDown = Input.GetMouseButton(0); removeLostActions = true; if (Threads == 0) { AddToList deleg = new AddToList(AddToPlaceActionList <T>); deleg.BeginInvoke(g, new AsyncCallback(onResponseAddToPlaceList <T>), null); } Threads++; }
public BeaconListViewModel() { zoneEventHandler = new ZoneEventHandler(currentElements); AddToList = ReactiveCommand.CreateFromTask <EstimoteZoneEvent, List <EstimoteZoneEvent> >(@event => AddEventToList(@event)); ChangeCurrentImplementation = ReactiveCommand.CreateFromTask <EstimoteZoneEvent, Implementation>(@event => ChangeImplementation(@event)); ChangeCurrentSector = ReactiveCommand.CreateFromTask <EstimoteZoneEvent, Sector>(@event => ChangeSector(@event)); Pin = ReactiveCommand.CreateFromTask <bool, bool>(x => PinToBeacon()); pinned = Pin.ToProperty(this, x => x.Pinned, false); buttonText = Pin.Select(x => x == true ? "Pinned" : "Pin").ToProperty(this, x => x.ButtonText, "Pin"); this.WhenAnyValue(x => x.LastReceivedEvent) .Throttle(TimeSpan.FromMilliseconds(400), RxApp.MainThreadScheduler) .Where(x => x != null && !pinned.Value) .DistinctUntilChanged(new EventComparer()) .InvokeCommand(AddToList); this.WhenAnyValue(x => x.LastReceivedEvent) .Throttle(TimeSpan.FromMilliseconds(400), RxApp.MainThreadScheduler) .Where(x => x != null && !pinned.Value) .DistinctUntilChanged(new EventComparer()) .InvokeCommand(ChangeCurrentSector); this.WhenAnyValue(x => x.LastReceivedEventFromDefaultZone) .Throttle(TimeSpan.FromMilliseconds(1000), RxApp.MainThreadScheduler) .Where(x => x != null && !pinned.Value) .DistinctUntilChanged(new EventComparer()) .InvokeCommand(ChangeCurrentImplementation); scanning = AddToList.IsExecuting .Select(x => x ? "Querying..." : "Scanning...") .ToProperty(this, x => x.Scanning, "Scanning..."); AddToList.ThrownExceptions.Subscribe(ex => { Console.WriteLine("AddToList-Error: {0}", ex); }); ChangeCurrentImplementation.ThrownExceptions.Subscribe(ex => { Console.WriteLine("ChangeCurrentImplementation-Error: {0}", ex); }); ChangeCurrentImplementation.Subscribe(async x => { if (x == null) { await ChangeCurrentSector.Execute(this.LastReceivedEvent); } }); events = AddToList.ToProperty(this, x => x.EstimoteEvents, out events); currentImplementation = ChangeCurrentImplementation.ToProperty(this, x => x.CurrentImplementation, out currentImplementation); currentSector = ChangeCurrentSector.ToProperty(this, x => x.CurrentSector, out currentSector); }
private void setObjectsToList(AddToList addToList) { listBox.Items.Clear(); int index = 1; foreach (PersonDetails person in peronsList) { Console.WriteLine("Inseting " + person.name); addToList(person, index); index++; } lblNumberOFEntries.Text = "" + peronsList.Count; }
public void AddonList() { addonListView.ClearObjects(); var targetDirectory = @"SFM\SFMM\"; // Process the list of files found in the directory. var fileEntries = Directory.GetFiles(targetDirectory, "*.SFMM", SearchOption.AllDirectories) .Select(Path.GetFileNameWithoutExtension) .Select(p => p.Substring(0)) .ToArray(); // List<AddToList> masterList = new List<AddToList>(); foreach (var fileName in fileEntries) { //masterList.Add(new AddToList("Potato")); // var listItem = new ListViewItem(fileName); if (File.Exists(targetDirectory + fileName + @"\" + "info.ini")) { var infoIni = new IniFile(targetDirectory + fileName + @"\" + "info.ini"); var Date = infoIni.Read("Date"); var Category = infoIni.Read("Category"); var Source = infoIni.Read("Source"); var Author = infoIni.Read("Author"); var URL = infoIni.Read("URL"); // listItem.SubItems.Add(fileName.ToString()); // listItem.SubItems.Add(info.CreationTime.ToString()); //listView1.Items.Add(listItem);*/ AddToList newObject = new AddToList(fileName.ToString(), Category, DateTime.Parse(Date), Source, Author, URL); addonListView.AddObject(newObject); } } olvColumn3.DataType = typeof(DateTime); //addonListView.SetObjects(AddToList.GET()); }
public void updateJobs() { AddToList.showNew(); }