コード例 #1
0
        void tbi_Clicked(object sender, EventArgs e)
        {
            SfSchedule sfSchedule = CalenderPage.getScheduleObj();

            //SfSchedule sfSchedule = new SfSchedule();
            if (i == 0)
            {
                if (sfSchedule != null)
                {
                    sfSchedule.IsVisible = true;
                    var      CurrentDate  = DateTime.Now;
                    DateTime SpecificDate = new DateTime(CurrentDate.Year, CurrentDate.Month, CurrentDate.Day, 0, 0, 0);
                    sfSchedule.NavigateTo(SpecificDate);
                    sfSchedule.ScheduleView = ScheduleView.WeekView;
                    i = 1;
                    sfSchedule.ScheduleCellTapped += Schedulee_ScheduleCellTapped;
                }
            }
            else
            {
                var      CurrentDate  = DateTime.Now;
                DateTime SpecificDate = new DateTime(CurrentDate.Year, CurrentDate.Month, CurrentDate.Day, 0, 0, 0);
                sfSchedule.NavigateTo(SpecificDate);
                sfSchedule.ScheduleView = ScheduleView.MonthView;
                i = 0;
                sfSchedule.ScheduleCellTapped -= Schedulee_ScheduleCellTapped;
            }
        }
コード例 #2
0
        void Icon1_Tapped(object sender, EventArgs args)
        {
            var page = new CalenderPage(DateDaysofWeek);

            Placeholder.Content = page.Content;
            //y++;
            CALENDERLabelColor.TextColor = Xamarin.Forms.Color.MediumTurquoise;
            CUSTOMERLabelColor.TextColor = Xamarin.Forms.Color.Black;
            ACTIVITYLabelColor.TextColor = Xamarin.Forms.Color.Black;
            ACCOUNTLabelColor.TextColor  = Xamarin.Forms.Color.Black;
            icon1Enable.IsEnabled        = false;
            icon2Enable.IsEnabled        = true;
            icon3Enable.IsEnabled        = true;
            icon4Enable.IsEnabled        = true;
            Application.Current.Properties.Remove("FloatingCustomerPageName");
            Application.Current.Properties.Remove("FloatingActivityPageName");
            Application.Current.Properties.Remove("FloatingAccountPageName");

            Application.Current.Properties["FloatingCalenderPageName"] = "CalenderPage";

            if (Application.Current.Properties.ContainsKey("LastSelectedStaff") == true)
            {
                shedulerStaff.Text = Application.Current.Properties["LastSelectedStaff"].ToString();
            }
            else
            {
                shedulerStaff.Text = "All Schedules";
            }

            dropdownArrow.IsVisible      = true;
            CalendarIconButton.IsVisible = true;
        }
コード例 #3
0
        public SetAppointmentPage(string selectedName, string empName, string weekDateDays)
        {
            DateDaysofWeek = weekDateDays;
            selectesPageN  = selectedName;
            InitializeComponent();
            GetStaff();
            EmpName = empName;
            if (selectedName == "selectedPageCustomer")
            {
                var pages = new CustomerPage();
                Placeholder.Content = pages.Content;
                //this.Title = "Customer";
                shedulerStaff.Text           = "Customer";
                dropdownArrow.IsVisible      = false;
                CalendarIconButton.IsVisible = false;
                // this.ToolbarItems.Remove(CalendarIconButton);
            }
            else if (selectedName == "CustomerPage")
            {
                var page = new CustomerPage();
                Placeholder.Content = page.Content;
                //this.Title = "Customer";
                shedulerStaff.Text           = "Customer";
                dropdownArrow.IsVisible      = false;
                CalendarIconButton.IsVisible = false;
            }
            else if (selectedName == "ActivityPage")
            {
                var page = new ActivityPage();
                Placeholder.Content = page.Content;
                //this.Title = "Activity";
                shedulerStaff.Text           = "Activity";
                dropdownArrow.IsVisible      = false;
                CalendarIconButton.IsVisible = false;
            }
            else if (selectedName == "AccountPage")
            {
                //Application.Current.Properties["FloatingAccountPageName"] = "AccountPage";
                var page = new AccountPage();
                Placeholder.Content = page.Content;
                //this.Title = "Account";
                shedulerStaff.Text           = "Account";
                dropdownArrow.IsVisible      = false;
                CalendarIconButton.IsVisible = false;
            }
            else
            {
                var page = new CalenderPage(DateDaysofWeek);
                Placeholder.Content = page.Content;
                this.Title          = "Calender";
                if (empName != "")
                {
                    shedulerStaff.Text = empName;
                }
                else
                {
                    shedulerStaff.Text = "All Schedules";
                }

                Application.Current.Properties["FloatingCalenderPageName"] = "CalenderPage";

                middleF.HeightRequest = App.ScreenHeight - 180;
            }
        }