Exemplo n.º 1
0
 public Settings()
 {
     InitializeComponent();
     db = new RealmDataBase();
     seconds.ItemsSource  = MiscellaneousProvider.MinuteProvider;
     seconds.SelectedItem = (new RealmDataBase().GetMinutesToSendBeforeTime() / 60);
 }
Exemplo n.º 2
0
        void Save_Clicked(string newSubjectName)
        {
            RealmDataBase db      = new RealmDataBase();
            var           student = db.GetStudent();

            if (student != null && !string.IsNullOrEmpty(newSubjectName) && !string.IsNullOrEmpty(day) && period > 0 && semester > 0)
            {
                UserDialogs.Instance.ShowLoading("Saving Please Wait", MaskType.Black);
                db.Write(newSubjectName, period.ToString(), new TimeProvider().GetPeriodTime(period.ToString()), semester, day);
                UserDialogs.Instance.HideLoading();
            }

            else
            {
                UserDialogs.Instance.Alert("N***a is you dumb? fill all the required information yesses!!", "Ëmpty subject", "OK");
            }
        }
Exemplo n.º 3
0
        //
        // This method is invoked when the application has loaded and is ready to run. In this
        // method you should instantiate the window, load the UI into it and then make the window
        // visible.
        //
        // You have 17 seconds to return from this method, or iOS will terminate your application.
        //
        public override bool FinishedLaunching(UIApplication app, NSDictionary options)
        {
            global::Xamarin.Forms.Forms.Init();
            FormsMaps.Init();
            new Syncfusion.SfAutoComplete.XForms.iOS.SfAutoCompleteRenderer();
            var renderer = new TKCustomMapRenderer();
            var temp     = new ResourceHelper();
            var db       = new RealmDataBase();

            Syncfusion.XForms.iOS.TabView.SfTabViewRenderer.Init();
            Syncfusion.ListView.XForms.iOS.SfListViewRenderer.Init();
            SfRadialMenuRenderer.Init();
            if (db.FirstRun())
            {
                LoadApplication(new App(temp.Process(), temp.GetParsedVenuesWithSubjects()));
            }
            else
            {
                LoadApplication(new App());
            }
            return(base.FinishedLaunching(app, options));
        }
Exemplo n.º 4
0
        protected override async void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;
            base.OnCreate(bundle);
            var renderer = new TKCustomMapRenderer(this);

            global::Xamarin.Forms.Forms.Init(this, bundle);
            LocalNotificationsImplementation.NotificationIconId = Resource.Drawable.book;
            UserDialogs.Init(this);
            TKGoogleMaps.Init(this, bundle);
            var db = new RealmDataBase();

            if (db.FirstRun())
            {
                var temp = new ResourceHelper(this.ApplicationContext, "RhodesMap.geojson", "Venues.txt");
                LoadApplication(new App(temp.ReadLocalFile(), temp.GetParsedVenuesWithSubjects()));
            }
            else
            {
                LoadApplication(new App());
            }
            await GetLocationPermissionAsync();
        }
Exemplo n.º 5
0
 public AddSubjectToVenueViewModel()
 {
     AddToVenue = new Command <string>(AddSubjectToVenue);
     db         = new RealmDataBase();
 }