Exemplo n.º 1
0
        protected override void OnStart()
        {
            // Handle when your app starts
            // load app variables from file
            bool result = AppVarsFile.ReadAppVars();

            // create tables for ORM, if not already created
            ORM.GetConnection().CreateTable <Project>();
            ORM.GetConnection().CreateTable <Trip>();
            ORM.GetConnection().CreateTable <Site>();
            ORM.GetConnection().CreateTable <Specimen>();
        }
Exemplo n.º 2
0
        void btnSaveSettings_Clicked(object sender, EventArgs e)
        {
            if (!entryStartingRecordNumber.Text.Equals(""))
            {
                AppVariables.CollectionCount = int.Parse(entryStartingRecordNumber.Text);
            }
            if (!entryCollectorName.Text.Equals(""))
            {
                AppVariables.CollectorName = entryCollectorName.Text;
            }
            if (pickerExportFormat.SelectedIndex != -1)
            {
                AppVariables.DataExportFormat = pickerExportFormat.SelectedItem.ToString();
            }

            AppVarsFile.WriteAppVars();

            DependencyService.Get <ICrossPlatformToast>().ShortAlert("Saved settings");
        }