public override View GetSampleContent(Context context) { LinearLayout linearLayout = new LinearLayout(context); linearLayout.Orientation = Orientation.Vertical; propertylayout = new LinearLayout(context); propertylayout = SetOptionPage(context); //creating instance for Schedule sfSchedule = new SfSchedule(context); sfSchedule.ScheduleView = ScheduleView.WeekView; sfSchedule.Locale = new Locale("fr"); SetFrenchCollectionSubjects(); SetChineseCollectionSubjects(); SetEnglishCollectionSubjects(); SetSpanishCollectionSubjects(); SetColors(); RandomNumbers(); SetStartTime(); SetEndTime(); sfSchedule.LayoutParameters = new FrameLayout.LayoutParams( LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent); sfSchedule.ItemsSource = GetFrenchAppointments(); linearLayout.AddView(sfSchedule); return(linearLayout); }
public override View GetSampleContent(Context context) { this.context = context; LinearLayout linearLayout = new LinearLayout(context); linearLayout.Orientation = Orientation.Vertical; //creating instance for Schedule sfSchedule = new SfSchedule(context); sfSchedule.ScheduleView = ScheduleView.WeekView; sfSchedule.AllowAppointmentDrag = true; sfSchedule.AppointmentDrop += SfSchedule_AppointmentDrop; NonAccessibleBlock nonAccessibleBlock = new NonAccessibleBlock(); //Create new instance of NonAccessibleBlocksCollection NonAccessibleBlocksCollection nonAccessibleBlocksCollection = new NonAccessibleBlocksCollection(); WeekViewSettings weekViewSettings = new WeekViewSettings(); nonAccessibleBlock.StartTime = 13; nonAccessibleBlock.EndTime = 14; nonAccessibleBlock.Text = "LUNCH"; nonAccessibleBlock.Color = Color.Black; nonAccessibleBlocksCollection.Add(nonAccessibleBlock); weekViewSettings.NonAccessibleBlocks = nonAccessibleBlocksCollection; sfSchedule.WeekViewSettings = weekViewSettings; //set the appointment collection GetAppointments(); sfSchedule.ItemsSource = appointmentCollection; linearLayout.AddView(sfSchedule); return(linearLayout); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.FindByName <SfSchedule>("schedule"); schedule.Locale = "fr"; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.ContentPage = bindable; this.schedule = bindable.Content.FindByName <SfSchedule>("Schedule"); this.WireEvents(); }
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; } }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); schedule = bindable.FindByName <SfSchedule>("schedule"); schedule.TimeInterval = 1; WeekViewSettings weekViewSettings = new WeekViewSettings(); weekViewSettings.WorkStartHour = 0; weekViewSettings.WorkEndHour = 23; WeekLabelSettings weekLabelSettings = new WeekLabelSettings(); weekLabelSettings.TimeFormat = string.Format("'Room'") + " " + "HH"; weekViewSettings.WeekLabelSettings = weekLabelSettings; schedule.WeekViewSettings = weekViewSettings; TimelineViewSettings timelineViewSettings = new TimelineViewSettings(); timelineViewSettings.StartHour = 0; timelineViewSettings.EndHour = 1; schedule.TimelineViewSettings = timelineViewSettings; TimelineLabelSettings labelSettings = new TimelineLabelSettings(); labelSettings.TimeFormat = string.Format(" 'Room' ") + " " + "mm"; timelineViewSettings.LabelSettings = labelSettings; }
protected override async void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); //get Database _firestoreDb = _userService.GetDatabase(this); clientLogged = await _storageService.GetClientDataLocal(); await GetConsultCategory(); animalSelected = JsonConvert.DeserializeObject <Animal>(Intent.GetStringExtra("Animal")); SetContentView(Resource.Layout.pet_appointments_main); _scheduler = FindViewById <SfSchedule>(Resource.Id.appointments_scheduler); progress = new ProgressDialog(this); progress.Indeterminate = false; progress.SetProgressStyle(Android.App.ProgressDialogStyle.Spinner); progress.SetMessage("Se afiseaza calendarul..."); progress.SetCancelable(false); progress.Show(); FetchAppointmentsWeek(); var scheduleHours = GetMedicScheduleHours(); _scheduler.ScheduleView = ScheduleView.WeekView; WeekViewSettings settings = new WeekViewSettings(); settings.WeekLabelSettings.TimeFormat = "hh:mm"; settings.StartHour = scheduleHours[0]; settings.EndHour = scheduleHours[1]; // set medic working hours interval _scheduler.WeekViewSettings = settings; _scheduler.CellTapped += Scheduler_CellTapped; }
public override View GetSampleContent(Context context) { this.context = context; LinearLayout linearLayout = new LinearLayout(context); linearLayout.Orientation = Orientation.Vertical; schedule = new SfSchedule(context); propertyLayout = new LinearLayout(context); propertyLayout = SetOptionPage(context); // Schedule custom appointment mapping AppointmentMapping mapping = new AppointmentMapping(); mapping.StartTime = "From"; mapping.EndTime = "To"; mapping.Subject = "EventName"; mapping.IsAllDay = "isAllDay"; mapping.MinHeight = "MinimumHeight"; mapping.Color = "color"; schedule.AppointmentMapping = mapping; schedule.ScheduleView = ScheduleView.WeekView; schedule.MonthViewSettings.ShowAppointmentsInline = true; GetAppointments(); schedule.ItemsSource = appointmentCollection; schedule.LayoutParameters = new FrameLayout.LayoutParams( LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent); linearLayout.AddView(schedule); return(linearLayout); }
public override View GetSampleContent(Context context) { con = context; sfschedule = new SfSchedule(context); InitializingAppointmentData(); sfschedule.ScheduleView = ScheduleView.DayView; sfschedule.TimeIntervalHeight = -1; sfschedule.VisibleDatesChanged += Sfschedule_VisibleDatesChanged; var dayViewSettings = new DayViewSettings(); dayViewSettings.StartHour = 9; dayViewSettings.EndHour = 16; sfschedule.DayViewSettings = dayViewSettings; nonAccessibleBlocksCollection = new NonAccessibleBlocksCollection(); var lunch = new NonAccessibleBlock(); lunch.StartTime = 12; lunch.EndTime = 13; lunch.Text = "Lunch Break"; nonAccessibleBlocksCollection.Add(lunch); nonAccessibleBlocks = nonAccessibleBlocksCollection; sfschedule.DayViewSettings.NonAccessibleBlocks = nonAccessibleBlocks; LinearLayout layout = new LinearLayout(context); layout.Orientation = Android.Widget.Orientation.Vertical; layout.AddView(sfschedule); return(layout); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); schedule = bindable.FindByName <SfSchedule>("schedule"); var viewModel = bindable.BindingContext as SchedulerViewModel; schedule.VisibleDatesChangedEvent += OnVisibleDatesChangedEvent; var meeting = new Meeting(); meeting.From = new DateTime(2020, 02, 26, 10, 0, 0); meeting.To = meeting.From.AddHours(1); meeting.EventName = "Occurs every alternate day"; meeting.Color = Color.Green; var Meetings = new ObservableCollection <Meeting>(); Meetings.Add(meeting); RecurrenceProperties recurrenceProperties = new RecurrenceProperties(); recurrenceProperties.RecurrenceType = RecurrenceType.Weekly; recurrenceProperties.RecurrenceRange = RecurrenceRange.Count; recurrenceProperties.Interval = 1; recurrenceProperties.WeekDays = WeekDays.Monday | WeekDays.Wednesday | WeekDays.Friday; recurrenceProperties.RecurrenceCount = 10; meeting.RecurrenceRule = schedule.RRuleGenerator(recurrenceProperties, meeting.From, meeting.To); viewModel.Meetings.Add(meeting); }
void InitializeSchedule() { schedule = new SfSchedule(); SqliteConnectionSet.AppointmentCollection = new ScheduleAppointmentCollection(); schedule.VerticalOptions = LayoutOptions.FillAndExpand; schedule.ScheduleView = ScheduleView.WeekView; schedule.EnableNavigation = true; schedule.BackgroundColor = Color.White; if (SqliteConnectionSet.isNewCalendar) { SqliteConnectionSet.mainStack.Children.Clear(); SqliteConnectionSet.mainStack.Children.Add(schedule); } else { SqliteConnectionSet.mainStack.Children.Add(schedule); SqliteConnectionSet.isNewCalendar = true; } this.Content = SqliteConnectionSet.mainStack; schedule.DataSource = SqliteConnectionSet.AppointmentCollection; schedule.ScheduleCellTapped += schedule_ScheduleCellTapped; }
public override View GetSampleContent(Context context) { sfschedule = new SfSchedule(context); weekViewSetting = new WeekViewSettings(); monthsettings = new MonthViewSettings(); propertylayout = new FrameLayout(context); isInitialLoad = true; propertylayout = SetOptionPage(context); getAppointments(); sfschedule.ItemsSource = appointmentCollection; sfschedule.ScheduleView = ScheduleView.WeekView; sfschedule.DayViewSettings.NonAccessibleBlocks = SetNonAccessibleBlocks(); sfschedule.WeekViewSettings.NonAccessibleBlocks = SetNonAccessibleBlocks(); sfschedule.WorkWeekViewSettings.NonAccessibleBlocks = SetNonAccessibleBlocks(); monthsettings.BlackoutDates = SetBlackoutDates(); monthsettings.ShowWeekNumber = true; sfschedule.MonthViewSettings = monthsettings; sfschedule.LayoutParameters = new FrameLayout.LayoutParams( LinearLayout.LayoutParams.MatchParent, LinearLayout.LayoutParams.MatchParent); LinearLayout layout = new LinearLayout(context); layout.Orientation = Android.Widget.Orientation.Vertical; layout.AddView(sfschedule); return(layout); }
public override void Destroy() { if (sfschedule != null) { sfschedule.Dispose(); sfschedule = null; } if (workHour_rangeSlider != null) { workHour_rangeSlider.RangeChanged -= workHour_rangeSlider_RangeChanged; workHour_rangeSlider.Dispose(); workHour_rangeSlider = null; } if (show_Non_Accessible_Block_checkBox != null) { show_Non_Accessible_Block_checkBox.CheckedChange -= show_Non_Accessible_Block_checkBox_CheckedChange; show_Non_Accessible_Block_checkBox.Dispose(); show_Non_Accessible_Block_checkBox = null; } if (show_Blackout_Dates != null) { show_Blackout_Dates.CheckedChange -= show_Blackout_Dates_CheckedChange; show_Blackout_Dates.Dispose(); show_Blackout_Dates = null; } if (show_week_number != null) { show_week_number.CheckedChange -= show_week_number_CheckedChange; show_week_number.Dispose(); show_week_number = null; } base.Destroy(); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.FindByName <SfSchedule>("schedule"); this.schedule.SizeChanged += OnScheduleSizeChanged; this.schedule.MonthViewSettings.ShowAgendaView = true; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.FindByName <SfSchedule>("schedule"); schedule.Locale = "fr"; if (schedule.Locale == "fr") { if (Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Android) { DependencyService.Get <ILocalize>().SetLocale(new CultureInfo("fr")); } else { CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("fr"); } } else if (schedule.Locale == "ja") { if (Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Android) { DependencyService.Get <ILocalize>().SetLocale(new CultureInfo("ja")); } else { CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("ja"); } } }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.FindByName <SfSchedule>("schedule"); this.label = bindable.FindByName <Label>("label"); this.WireEvents(); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.Content.FindByName <SfSchedule>("Schedule"); this.schedule.MonthViewSettings.ShowAgendaView = true; this.WireEvents(); }
public void Dispose() { if (sfschedule != null) { sfschedule.Dispose(); sfschedule = null; } }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.Content.FindByName <SfSchedule>("schedule"); this.busyIndicator = bindable.Content.FindByName <SfBusyIndicator>("busyindicator"); this.schedule.MoveToDate = new DateTime(2017, 06, 15); this.WireEvents(); }
public DietaSetmana() { InitializeComponent(); { InitializeComponent(); schedule = new SfSchedule(); } }
public void Dispose() { if (sfSchedule != null) { sfSchedule.AppointmentDrop -= SfSchedule_AppointmentDrop; sfSchedule.Dispose(); sfSchedule = null; } }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.Content.FindByName <SfSchedule>("Schedule"); this.scheduleViewButton = bindable.Content.FindByName <Button>("ScheduleViewButton"); this.dayHeader = bindable.Content.FindByName <Label>("dayHeader"); this.weekHeader = bindable.Content.FindByName <Label>("weekHeader"); this.WireEvents(); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); schedule = bindable.FindByName <SfSchedule>("schedule"); export = bindable.FindByName <Button>("export"); import = bindable.FindByName <Button>("import"); import.Clicked += ImportToSchedule; export.Clicked += ExportToOutlook; }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.Content.FindByName <SfSchedule>("schedule"); this.WireEvents(); var col = schedule.ViewHeaderStyle.DateTextColor; }
public override void Destroy() { if (sfSchedule != null) { sfSchedule.Dispose(); sfSchedule = null; } base.Destroy(); }
public override void Destroy() { if (sfSchedule != null) { sfSchedule.AppointmentDrop -= SfSchedule_AppointmentDrop; sfSchedule.Dispose(); sfSchedule = null; } base.Destroy(); }
protected override async void OnCreate(Bundle bundle) { ISharedPreferences prefs = PreferenceManager.GetDefaultSharedPreferences(Android.App.Application.Context); ISharedPreferencesEditor editor = prefs.Edit(); if (prefs.GetString("locale", "") == "") { editor.PutString("locale", "en"); editor.Apply(); } string loc = prefs.GetString("locale", ""); var locale = new Java.Util.Locale(loc); Java.Util.Locale.Default = locale; var config = new Android.Content.Res.Configuration { Locale = locale }; #pragma warning disable CS0618 // Type or member is obsolete BaseContext.Resources.UpdateConfiguration(config, metrics: BaseContext.Resources.DisplayMetrics); #pragma warning restore CS0618 // Type or member is obsolete base.OnCreate(bundle); SetContentView(Resource.Layout.activity_sceduler); Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar); SetSupportActionBar(toolbar); FloatingActionButton fab = FindViewById <FloatingActionButton>(Resource.Id.fab); fab.Click += FabOnClick; DrawerLayout drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout); ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close); drawer.AddDrawerListener(toggle); toggle.SyncState(); NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view); navigationView.SetNavigationItemSelectedListener(this); apiClient = new APIClient(); schedulerCollection = await apiClient.GetScheduleAsync(1); schedulerList = schedulerCollection.OrderBy(x => x.Start_date).ToList(); CreateNotificationChannel(); schedule = new SfSchedule(this); CreateAppointments(); schedule.ItemsSource = Orders; schedule.ScheduleView = ScheduleView.WeekView; schedule.CellTapped += schedule_ScheduleCellTapped; LinearLayout linearLayout = FindViewById <LinearLayout>(Resource.Id.scheduler_p); linearLayout.AddView(schedule); PushNotif(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); LinearLayout linearLayout = new LinearLayout(this); linearLayout.Orientation = Orientation.Vertical; this.AddButton(linearLayout); //Creating an instance for SfSchedule Control SfSchedule schedule = new SfSchedule(this); schedule.ScheduleView = Com.Syncfusion.Schedule.Enums.ScheduleView.WeekView; // Creating an instance for schedule appointment Collection Calendar startTime = (Calendar)currentDate.Clone(); //setting start time for the event startTime.Set(2017, 08, 03, 10, 0, 0); Calendar endTime = (Calendar)currentDate.Clone(); //setting end time for the event endTime.Set(2017, 08, 03, 12, 0, 0); // move to date. schedule.MoveToDate = startTime; // Set exception dates. var exceptionDate1 = Calendar.Instance; exceptionDate1.Set(2017, 08, 03); var exceptionDate2 = Calendar.Instance; exceptionDate2.Set(2017, 08, 05); exceptionDate3 = Calendar.Instance; exceptionDate3.Set(2017, 08, 07); ScheduleAppointment recurrenceAppointment = new ScheduleAppointment(); recurrenceAppointment.Id = 1; recurrenceAppointment.StartTime = startTime; recurrenceAppointment.EndTime = endTime; recurrenceAppointment.Subject = "Daily Occurs"; recurrenceAppointment.Color = Color.Blue; recurrenceAppointment.RecurrenceRule = "FREQ=DAILY;COUNT=20"; recurrenceAppointment.RecurrenceExceptionDates = new ObservableCollection <Calendar> { exceptionDate1, exceptionDate2, exceptionDate3 }; scheduleAppointmentCollection.Add(recurrenceAppointment); //Adding schedule appointment collection to SfSchedule appointments schedule.ItemsSource = scheduleAppointmentCollection; linearLayout.AddView(schedule); SetContentView(linearLayout); }
protected override void OnAttachedTo(ContentPage bindable) { base.OnAttachedTo(bindable); this.schedule = bindable.FindByName <SfSchedule>("schedule"); // Setting a date and time to select schedule.SelectedDate = new DateTime(2017, 10, 04, 10, 0, 0); // Setting null value to deselect //schedule.SelectedDate = null; }
public ScheduleAppointmentEditor(Context context, SfSchedule schedule) { con = context; sfSchedule = schedule; density = con.Resources.DisplayMetrics; EditorLayout = new LinearLayout(context); EditorLayout.Orientation = Orientation.Vertical; EditorLayout.SetBackgroundColor(Color.White); EditorLayout.SetPaddingRelative(30, 30, 30, 30); AddInputControls(); }