Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //IN DER GUI WIRD DER BUTTON "ADDE EIN YOOLET" GEDRÜCKT
- protected void onNewYooLetChosen(object sender, ItemEventArgs e)
- {
- YooLetModel yM = (YooLetModel)MobileClientData.GetInstance().ConvertType(MobileClientData.GetInstance().getAvailableYooLets()[e.Position]);
- ((ApplicationState)Application).CurrentYooView.Add(yM);
- }
- //DIE ADDED-METHODE (WIRD NUR 1-mal REGISTRIERT)
- this.CurrentYooView.Added += delegate(object sender, ObservableDictArgs<Guid, IYooLet> args)
- {
- YooLetModel yM = (YooLetModel)args.ChangedItem.Value;
- yM.SetAbsId(args.ChangedItem.Key);
- yM.SetUp();
- MobileClientData.GetInstance().CurrentYooLetModels.Add(args.ChangedItem.Key, yM);
- MobileClientData.GetInstance().activeYooLets.Add(MobileClientData.GetInstance().activeYooLets.Count, args.ChangedItem.Key);
- if (MobileClientData.GetInstance().CurrentYooLetActivity.Value.GetType() == typeof(RemoteScreen))
- MobileClientData.GetInstance().CurrentYooLetActivity.Value.UpdateGui();
- else
- {
- //Create Activity
- Intent i = new Intent();
- i.SetClass(this, MobileClientData.GetInstance().ConvertType(yM).GetType());
- i.SetFlags(ActivityFlags.NewTask);
- i.PutExtra("absId", args.ChangedItem.Key.ToString());
- StartActivity(i);
- }
- };
Add Comment
Please, Sign In to add comment