Ejemplo n.º 1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _controller = new HazzatController();

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIImage.FromFile("settings.png")
                                                                    , UIBarButtonItemStyle.Plain
                                                                    , (ooo, oo) => {
                var donationView = this.Storyboard.InstantiateViewController("DonationsView") as DonationController;

                this.NavigationController.PushViewController(donationView, true);
            });

            List <KeyValuePair <int, string> > lst = new List <KeyValuePair <int, string> >();

            _controller.GetSeasonServices(id, (src, data) =>
            {
                foreach (var item in data.Result)
                {
                    lst.Add(new KeyValuePair <int, string>(item.ItemId, item.Service_Name));
                }
                InvokeOnMainThread(() =>
                {
                    TableView.Source = _dataSource = new DataSource(lst, this);
                });
            });
        }
Ejemplo n.º 2
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            _controller = new HazzatController();

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIImage.FromFile("settings.png")
                                                                    , UIBarButtonItemStyle.Plain
                                                                    , (ooo, oo) =>
            {
            });

            NavigationItem.RightBarButtonItem = new UIBarButtonItem(UIImage.FromFile("info.png")
                                                                    , UIBarButtonItemStyle.Plain
                                                                    , (ooo, oo) =>
            {
            });

            List <KeyValuePair <int, string> > lst = new List <KeyValuePair <int, string> >();

            _controller.GetSeasons(true, (src, data) =>
            {
                foreach (var item in data.Result)
                {
                    lst.Add(new KeyValuePair <int, string>(item.ItemId, item.Name));
                }
                InvokeOnMainThread(() =>
                {
                    TableView.Source = _dataSource = new DataSource(lst, this);
                });
            });
        }
Ejemplo n.º 3
0
        private void LoadServiceHymns(StructureInfo[] hymnsBySeason)
        {
            foreach (var structInfo in hymnsBySeason.OrderBy(s => s.Service_Order))
            {
                var groupDetails = new HymnGroup(structInfo.Service_Name);

                HazzatController.GetSeasonServiceHymns(
                    structInfo.ItemId,
                    (sender, e) => GetCompletedHymnsBySeason(e.Result, groupDetails));
            }
        }
Ejemplo n.º 4
0
        private void LoadServiceHymnsByTune(SeasonInfo[] filteredSeasons)
        {
            foreach (var seasonInfo in filteredSeasons.OrderBy(s => s.Season_Order))
            {
                var groupDetails = new HymnGroup(seasonInfo.Name);

                HazzatController.GetServiceHymnListBySeasonIdAndTuneId(seasonInfo.ItemId,
                                                                       NavigationInfo.ItemId,
                                                                       (sender, e) => GetCompletedHymnsBySeasonAndTypeOrTune(e.Result, groupDetails));
            }
        }
Ejemplo n.º 5
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            Title = "HymnPage";

            string contentDirectoryPath = Path.Combine(NSBundle.MainBundle.BundlePath, "Content/");

            _controller = new HazzatController();

            _controller.GetSeasonServiceHymnText(id, (src, data) =>
            {
                _controller.GetTextRowDelimiterToken((s, d) =>
                {
                    string textDelimiter = d.Result;
                    InvokeOnMainThread(() =>
                    {
                        WebViewExtend.LoadHtmlString(HymnPageViewRenderer.RenderText(data.Result, textDelimiter), new NSUrl(contentDirectoryPath, true));
                        TipBox.Alpha = 0;
                    });
                });
            });
        }
Ejemplo n.º 6
0
 public HymnPageViewController(IntPtr handle) : base(handle)
 {
     _controller           = new HazzatController();
     _contentDirectoryPath = Path.Combine(NSBundle.MainBundle.BundlePath, "Content/");
 }
Ejemplo n.º 7
0
 private void GetSeasonServices(int seasonId)
 {
     IsBusy = true;
     HazzatController.GetSeasonServices(seasonId, OnGetSeasonServicesCompleted);
 }
Ejemplo n.º 8
0
 private void GetSeasonsByTuneId(int tuneId)
 {
     IsBusy = true;
     HazzatController.GetSeasonsByTuneId(tuneId, OnGetSeasonsByTuneIdCompleted);
 }
Ejemplo n.º 9
0
 public BaseViewModel()
 {
     HazzatController = new HazzatController();
 }