Exemple #1
0
        void HandleRollButtonTouchUpInside(object sender, EventArgs e)
        {
            ObservableCollection <Character> oldList = new ObservableCollection <Character>(CombatState.CombatList);

            CombatState.RollInitiative();
            CombatState.SortCombatList();
            ReloadList(oldList);
            MainUI.SaveCombatState();
        }
Exemple #2
0
        public void LoadStuff()
        {
            int count = Monster.Monsters.Count;

            MainUI.LoadCombatState();

            if (count > 0)
            {
                InvokeOnMainThread(LoadUI);
            }
        }
Exemple #3
0
        void HandlePrevButtonTouchUpInside(object sender, EventArgs e)
        {
            int index1 = ActiveCharacterIndex;

            CombatState.MovePrevious();
            int index2 = ActiveCharacterIndex;

            ReloadListRows(new List <int> {
                index1, index2
            });
            MainUI.SaveCombatState();
        }
Exemple #4
0
        public void LoadUI()
        {
            uiLoaded = true;
            ui       = new MainUI();
            RectangleF rect = View.Frame;

            rect     = View.ConvertRectFromView(rect, View.Superview);
            rect.X   = 0;
            rect.Y   = 0;
            ui.Frame = rect;
            View.AddSubview(ui);
            LayoutView();
        }
Exemple #5
0
        public MainUI()
        {
            _MainView = this;

            BackgroundColor = CMUIColors.PrimaryColorLight;

            toolbar = new ToolbarView();
            toolbar.BackgroundColor = CMUIColors.PrimaryColorLight;

            currentTab = new CombatTab(_CombatState);


            AddSubview(toolbar);
            AddSubview(currentTab);
        }
        public void LoadUI()
        {
            uiLoaded      = true;
            ui            = new MainUI();
            ui.StartupUrl = StartupUrl;
            CGRect rect = View.Frame;

            rect     = View.ConvertRectFromView(rect, View.Superview);
            rect.X   = 0;
            rect.Y   = 0;
            ui.Frame = rect;
            View.AddSubview(ui);
            LayoutView();

            if (MobileSettings.Instance.RunLocalService)
            {
                RunLocalService();
            }

            MobileSettings.Instance.PropertyChanged += MobileSettingsPropertyChanged;
        }