コード例 #1
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            PrepareDatePicker(txtFrom);
            PrepareDatePicker(txtTo);
            //NavigationController.SetNavigationBarHidden(true, true);
            PrepareUI();

            uiviewStudentInfo.AddGestureRecognizer(new UITapGestureRecognizer(ro =>
            {
                OnSwipe_Left();
            }));
            uiviewAttandenceReport.AddGestureRecognizer(new UITapGestureRecognizer(ro =>
            {
                OnSwipe_Right();
            }));

            imgBack.AddGestureRecognizer(new UITapGestureRecognizer(ro =>
            {
                this.DismissModalViewController(false);
            }));
            StudentList_tableviewcell.ViewDetailsClicked += (object sender, EventArgs e) =>
            {
                StudentTracking home = this.Storyboard.InstantiateViewController("StudentTracking") as StudentTracking;
                if (home != null)
                {
                    this.PresentModalViewController(home, true);
                }
            };
            AttendanceReportModule();
            StudentInfoModule();
        }
コード例 #2
0
        private void PrepareMap(double lat, double lng)
        {
            try
            {
                CLLocationCoordinate2D coordsfordestinatin = new CLLocationCoordinate2D(lat, lng);
                MKCoordinateSpan       span3 = new MKCoordinateSpan(StudentTracking.MilesToLatitudeDegrees(2), StudentTracking.MilesToLongitudeDegrees(2, coordsfordestinatin.Latitude));
                mapview.Region = new MKCoordinateRegion(coordsfordestinatin, span3);

                // set the map delegate
                var mapDel = new MyMapDelegate();
                mapview.Delegate = mapDel;
                // add a custom annotation
                mapview.AddAnnotation(new CustomAnnotation(0, StaticDataModel.StudentInfo + "'student location", coordsfordestinatin));
            }
            catch (Exception ex)
            {
            }
        }
コード例 #3
0
        public override void ViewDidLoad()
        {
            base.ViewDidLoad();

            InvokeOnMainThread(() =>
            {
                var type = StaticMethods.DeviceType();
                if (type != "ipad")
                {
                    tblStudentList.RowHeight = 94;
                }
            });
            //if(!StaticDataModel.IsFromLanguageMenu)
            NavigationController.SetNavigationBarHidden(true, true);

            //GetStudentList();

            SetData();

            imgMenu.AddGestureRecognizer(new UITapGestureRecognizer(ro =>
            {
                SidebarController.OpenMenu();
            }));
            StudentList_tableviewcell.CarClicked += (object sender, EventArgs e) =>
            {
                if (StaticDataModel.isEnableStudentTracking)
                {
                    StudentTracking home = this.Storyboard.InstantiateViewController("StudentTracking") as StudentTracking;
                    if (home != null)
                    {
                        this.PresentModalViewController(home, true);
                    }
                    else
                    {
                    }
                }
                else
                {
                    string message = string.Empty;
                    if (StaticDataModel.CurrentLanguage == "en")
                    {
                        message = "Your child is not in bus.";
                    }
                    else
                    {
                        message = ".طفلك ليس في الحافلة";
                    }

                    BTProgressHUD.ShowToast(message, false, 10500);
                }
            };
            StudentList_tableviewcell.ViewDetailsClicked += (object sender, EventArgs e) =>
            {
                StudentReport sr = this.Storyboard.InstantiateViewController("StudentReport") as StudentReport;
                if (sr != null)
                {
                    this.PresentModalViewController(sr, true);
                }
            };

            ar_StudentList_tableviewcell.CarClicked += (object sender, EventArgs e) =>
            {
                StudentTracking home = this.Storyboard.InstantiateViewController("StudentTracking") as StudentTracking;
                if (home != null)
                {
                    this.PresentModalViewController(home, true);
                }
            };
            ar_StudentList_tableviewcell.ViewDetailsClicked += (object sender, EventArgs e) =>
            {
                StudentReport sr = this.Storyboard.InstantiateViewController("StudentReport") as StudentReport;
                if (sr != null)
                {
                    this.PresentModalViewController(sr, true);
                }
            };
            ipad_StudentList_tableviewcell.CarClicked += (object sender, EventArgs e) =>
            {
                StudentTracking home = this.Storyboard.InstantiateViewController("StudentTracking") as StudentTracking;
                if (home != null)
                {
                    this.PresentModalViewController(home, true);
                }
            };
            ipad_StudentList_tableviewcell.ViewDetailsClicked += (object sender, EventArgs e) =>
            {
                StudentReport sr = this.Storyboard.InstantiateViewController("StudentReport") as StudentReport;
                if (sr != null)
                {
                    this.PresentModalViewController(sr, true);
                }
            };
            ar_ipad_StudentList_tableviewcell.CarClicked += (object sender, EventArgs e) =>
            {
                StudentTracking home = this.Storyboard.InstantiateViewController("StudentTracking") as StudentTracking;
                if (home != null)
                {
                    this.PresentModalViewController(home, true);
                }
            };
            ar_ipad_StudentList_tableviewcell.ViewDetailsClicked += (object sender, EventArgs e) =>
            {
                StudentReport sr = this.Storyboard.InstantiateViewController("StudentReport") as StudentReport;
                if (sr != null)
                {
                    this.PresentModalViewController(sr, true);
                }
            };

            AppDelegate.NotificationReceived += (object sender, EventArgs e) =>

            {
                GetStudentList();
            };

            Settings.SaveSettings += (object sender, EventArgs e) =>
            {
                ChangeLaguageProcess();
            };
        }