protected override void OnActivityResult(int requestCode, Result result, Intent intent)
 {
     if (requestCode == InfoRequestCode)
     {
         FractionManager.Load();
         BuildList();
     }
 }
Beispiel #2
0
    public override void OnCreate()
    {
        base.OnCreate();
        Context = ApplicationContext;

        FontManager.Init(Context);
        DataSaver.Init(Context);
        Screen.Init(Context);

        PlayerManager.Init();
        FractionManager.Init();
    }
        protected override ActionBar OnCreateActionBar(ActionBar bar)
        {
            bar.Color     = new Color(GetColor(Resource.Color.colorPrimaryDark));
            bar.TextColor = Color.White;
            bar.Title     = GetString(Resource.String.fractions_activity);

            bar.AddButton(GetDrawable(Resource.Drawable.add), view => {
                var dialog = new NewFractionDialog(this);
                dialog.SetSize(Screen.Width / 4 * 3, Screen.Height / 2);
                dialog.AddButton("Ok", v => {
                    if (String.IsNullOrWhiteSpace(dialog.FractionName))
                    {
                        return(false);
                    }
                    Fraction fraction = new Fraction(dialog.FractionName);
                    FractionManager.Add(fraction);
                    BuildList();
                    return(true);
                });
                dialog.ShowAt(view);
            });
            return(bar);
        }
 public static void LoadManagers()
 {
     PlayerManager.Load();
     FractionManager.Load();
 }