示例#1
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.prvaDer_page1);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            rupeBox                 = FindViewById <CheckBox>(Resource.Id.rupeBox);
            legloBox                = FindViewById <CheckBox>(Resource.Id.legloBox);
            izmetBox                = FindViewById <CheckBox>(Resource.Id.izmetBox);
            stetaBox                = FindViewById <CheckBox>(Resource.Id.stetaBox);
            tragoviNoguBox          = FindViewById <CheckBox>(Resource.Id.tragoviNoguBox);
            videnZiviGlodavacBox    = FindViewById <CheckBox>(Resource.Id.videnZiviGlodavacBox);
            videnUginuliGlodavacBox = FindViewById <CheckBox>(Resource.Id.videnUginuliGlodavacBox);

            SetActionBar(toolbar);
            ActionBar.Title = "Anketa";
            if (localAnketa.GetBoolean("visitedPage1", false))
            {
                rupeBox.Checked                 = localAnketa.GetBoolean("rupeBox", false);
                legloBox.Checked                = localAnketa.GetBoolean("legloBox", false);
                tragoviNoguBox.Checked          = localAnketa.GetBoolean("tragoviNoguBox", false);
                videnZiviGlodavacBox.Checked    = localAnketa.GetBoolean("videnZiviGlodavacBox", false);
                izmetBox.Checked                = localAnketa.GetBoolean("izmetBox", false);
                videnUginuliGlodavacBox.Checked = localAnketa.GetBoolean("videnUginuliGlodavacBox", false);
                stetaBox.Checked                = localAnketa.GetBoolean("stetaBox", false);
            }
        }
示例#2
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Activity_search);

            // Get title
            string categoryTitle = Intent.GetStringExtra("categoryTitle");

            if (categoryTitle == null)
            {
                return;
            }
            // Set toolbar
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar);
            toolbar.Title = categoryTitle;
            SetActionBar(toolbar);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetDisplayShowHomeEnabled(true);

            // Init recycler view
            mRecyclerView  = FindViewById <RecyclerView>(Resource.Id.recyclerView);
            mLayoutManager = new LinearLayoutManager(this);
            mRecyclerView.SetLayoutManager(mLayoutManager);

            // Init bar
            SetUpBar();

            mPresenter = new SearchPresenter(this);
            mPresenter.search();
        }
示例#3
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.profile);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            adresa   = FindViewById <TextView>(Resource.Id.adresa);
            oib      = FindViewById <TextView>(Resource.Id.oib);
            email    = FindViewById <TextView>(Resource.Id.email);
            phone    = FindViewById <TextView>(Resource.Id.phone);
            username = FindViewById <TextView>(Resource.Id.username);

            SetActionBar(toolbar);
            ActionBar.Title = "Korisnički podaci";
            sifraDjelatnika = localUsername.GetString("sifraDjelatnika", null);
            user            = db.Query <KE_DJELATNICI>(
                "SELECT * " +
                "FROM KE_DJELATNICI " +
                "WHERE KE_MBR = ?", sifraDjelatnika).FirstOrDefault();

            username.Text = user.KE_IME + " " + user.KE_PREZIME;
            adresa.Text   = user.KE_ADRESA + ", " + user.KE_POSTA + ", " + user.KE_MJESTO;
            email.Text    = user.KE_EMAIL;
            oib.Text      = user.KE_OIB;
            phone.Text    = user.KE_MOBITEL;
        }
示例#4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.komitenti);
            toolbar          = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            partneriListView = FindViewById <ListView>(Resource.Id.partneriListView);
            searchInput      = FindViewById <EditText>(Resource.Id.searchInput);
            resultMessage    = FindViewById <TextView>(Resource.Id.resultMessage);
            noviKomitentBtn  = FindViewById <Button>(Resource.Id.noviKomitentBtn);

            SetActionBar(toolbar);
            ActionBar.Title             = "Odabir partnera";
            radniNalog                  = localRadniNalozi.GetInt("id", 0);
            partneriListView.ItemClick += PartneriListView_ItemClick;
            noviKomitentBtn.Click      += NoviKomitentBtn_Click;
            searchInput.TextChanged    += SearchInput_TextChanged;
            searchInput.KeyPress       += SearchInput_KeyPress;
            partnerList                 = db.Query <T_KUPDOB>(
                "SELECT * " +
                "FROM T_KUPDOB " +
                "INNER JOIN DID_Lokacija ON T_KUPDOB.SIFRA = DID_Lokacija.SAN_KD_SIFRA " +
                "INNER JOIN DID_RadniNalog_Lokacija ON DID_Lokacija.SAN_Id = DID_RadniNalog_Lokacija.Lokacija " +
                "WHERE DID_RadniNalog_Lokacija.RadniNalog = ? " +
                "GROUP BY SIFRA, TIP_PARTNERA, NAZIV, OIB", radniNalog);

            partnerListFiltered      = partnerList;
            partneriListView.Adapter = new Adapter_Komitent(this, partnerListFiltered);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.potroseniMaterijali);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            materijaliListView  = FindViewById <RecyclerView>(Resource.Id.materijaliListView);
            ukupanIznosTextView = FindViewById <TextView>(Resource.Id.ukupanIznosTextView);
            radniNalogTV        = FindViewById <TextView>(Resource.Id.radniNalogTV);
            spinnerPartner      = FindViewById <Spinner>(Resource.Id.spinnerPartner);
            spinnerLokacija     = FindViewById <Spinner>(Resource.Id.spinnerLokacija);
            spinnerRadniNalog   = FindViewById <Spinner>(Resource.Id.spinnerRadniNalog);
            message             = FindViewById <TextView>(Resource.Id.message);
            messagePotvrda      = FindViewById <TextView>(Resource.Id.messagePotvrda);
            prikazMaterijala    = FindViewById <ScrollView>(Resource.Id.prikazMaterijala);
            prikazDropdowna     = FindViewById <LinearLayout>(Resource.Id.prikazDropdowna);
            ukupnoKn            = FindViewById <RelativeLayout>(Resource.Id.ukupnoKn);
            noviMaterijalBtn    = FindViewById <Button>(Resource.Id.noviMaterijalBtn);

            SetActionBar(toolbar);
            ActionBar.Title                 = "Popis materijala";
            spinnerPartner.ItemSelected    += SpinnerPartner_ItemSelected;
            spinnerLokacija.ItemSelected   += SpinnerLokacija_ItemSelected;
            spinnerRadniNalog.ItemSelected += SpinnerRadniNalog_ItemSelected;
            noviMaterijalBtn.Click         += NoviMaterijalBtn_Click;
            lokacijaId     = localKomitentLokacija.GetInt("lokacijaId", 0);
            mLayoutManager = new LinearLayoutManager(this);
            materijaliListView.SetLayoutManager(mLayoutManager);
            localMaterijaliEdit.PutBoolean("button", false);
            localMaterijaliEdit.Commit();
            List <DID_RadniNalog> radniNalozi = db.Query <DID_RadniNalog>(
                "SELECT rn.Id, rn.Godina, rn.Broj, rn.Status, rn.PokretnoSkladiste, rn.Voditelj, rn.Izdavatelj, rn.Primatelj, rn.DatumOd, rn.DatumDo, rn.DatumIzrade, rn.DatumIzvrsenja, rn.SinhronizacijaDatumVrijeme, rn.SinhronizacijaPrivremeniKljuc " +
                "FROM DID_RadniNalog rn " +
                "INNER JOIN DID_RadniNalog_Lokacija ON rn.Id = DID_RadniNalog_Lokacija.RadniNalog " +
                "INNER JOIN DID_LokacijaPozicija ON DID_RadniNalog_Lokacija.Lokacija = DID_LokacijaPozicija.SAN_Id " +
                "INNER JOIN DID_AnketaMaterijali ON DID_LokacijaPozicija.POZ_Id = DID_AnketaMaterijali.PozicijaId " +
                "GROUP BY Broj, Godina");

            if (radniNalozi.Any())
            {
                ToggleVisibility(true);

                List <string> listRadniNalozi = new List <string>();
                radniNaloziIdList = new List <string>();
                foreach (var item in radniNalozi)
                {
                    listRadniNalozi.Add("Broj: " + item.Broj.ToString() + " / Godina: " + item.Godina);
                    radniNaloziIdList.Add(item.Id.ToString());
                }
                ArrayAdapter <string> adapterRNList = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, listRadniNalozi);
                adapterRNList.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
                spinnerRadniNalog.Adapter = adapterRNList;
            }
            else
            {
                ToggleVisibility(false);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.potroseniMaterijal_Dodaj);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            kolicinaInput    = FindViewById <EditText>(Resource.Id.kolicinaInput);
            IznosData        = FindViewById <TextView>(Resource.Id.IznosData);
            cijenaData       = FindViewById <TextView>(Resource.Id.cijenaData);
            nazivData        = FindViewById <TextView>(Resource.Id.nazivData);
            sifraData        = FindViewById <TextView>(Resource.Id.sifraData);
            mjernaJedinicaTV = FindViewById <TextView>(Resource.Id.mjernaJedinicaTV);
            spremiBtn        = FindViewById <Button>(Resource.Id.spremiBtn);
            odustaniBtn      = FindViewById <Button>(Resource.Id.odustaniBtn);
            messageKolicina  = FindViewById <TextView>(Resource.Id.messageKolicina);
            dostupno         = FindViewById <TextView>(Resource.Id.dostupno);

            SetActionBar(toolbar);
            ActionBar.Title            = "Dodaj materijal";
            spremiBtn.Click           += SpremiBtn_Click;
            odustaniBtn.Click         += OdustaniBtn_Click;
            kolicinaInput.KeyPress    += KolicinaInput_KeyPress;
            kolicinaInput.TextChanged += KolicinaInput_TextChanged;
            kolicinaInput.Text         = "1,000";
            kolicinaInput.RequestFocus();
            materijalSifra   = localMaterijali.GetString("sifra", null);
            radniNalog       = localRadniNalozi.GetInt("id", 0);
            pozicijaId       = localPozicija.GetInt("pozicijaId", 0);
            lokacijaId       = localKomitentLokacija.GetInt("lokacijaId", 0);
            mjernaJedinicaId = localMaterijali.GetInt("mjernaJedinicaId", 0);

            var mjernaJedinica = db.Query <T_MjerneJedinice>(
                "SELECT * " +
                "FROM T_MjerneJedinice " +
                "WHERE Id = ?", mjernaJedinicaId).FirstOrDefault();
            T_NAZR materijal = db.Query <T_NAZR>(
                "SELECT * " +
                "FROM T_NAZR " +
                "WHERE NAZR_SIFRA = ?", materijalSifra).FirstOrDefault();

            skladiste = db.Query <DID_RadniNalog>(
                "SELECT * " +
                "FROM DID_RadniNalog " +
                "WHERE Id = ?", radniNalog).FirstOrDefault();
            staraKolicinaNaSkladistu = db.Query <DID_StanjeSkladista>(
                "SELECT * " +
                "FROM DID_StanjeSkladista " +
                "WHERE Skladiste = ? " +
                "AND Materijal = ?", skladiste.PokretnoSkladiste, materijalSifra).FirstOrDefault().Kolicina;

            dostupno.Text         = staraKolicinaNaSkladistu.ToString("F3").Replace('.', ',');
            cijena                = materijal.NAZR_CIJENA_ART;
            nazivData.Text        = materijal.NAZR_NAZIV;
            sifraData.Text        = materijal.NAZR_SIFRA;
            cijenaData.Text       = cijena.ToString("F2").Replace('.', ',');
            IznosData.Text        = cijena.ToString("F2").Replace('.', ',');
            mjernaJedinicaTV.Text = mjernaJedinica.Oznaka;
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.novaLokacija);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            searchInput        = FindViewById <EditText>(Resource.Id.searchInput);
            resultMessage      = FindViewById <TextView>(Resource.Id.resultMessage);
            lokacijaListView   = FindViewById <ListView>(Resource.Id.lokacijaListView);
            novaLokLayout      = FindViewById <ScrollView>(Resource.Id.novaLokLayout);
            poznataLokLayout   = FindViewById <LinearLayout>(Resource.Id.poznataLokLayout);
            novaLokBtn         = FindViewById <RadioButton>(Resource.Id.novaLokBtn);
            poznataLokBtn      = FindViewById <RadioButton>(Resource.Id.poznataLokBtn);
            nazivInput         = FindViewById <EditText>(Resource.Id.nazivInput);
            ulicaBrInput       = FindViewById <EditText>(Resource.Id.ulicaBrInput);
            mjestoInput        = FindViewById <EditText>(Resource.Id.mjestoInput);
            spremiBtn          = FindViewById <Button>(Resource.Id.spremiBtn);
            odustaniBtn        = FindViewById <Button>(Resource.Id.odustaniBtn);
            odaberiOpcinuBtn   = FindViewById <Button>(Resource.Id.odaberiOpcinuBtn);
            opcinaData         = FindViewById <TextView>(Resource.Id.opcinaData);
            msgNaziv           = FindViewById <TextView>(Resource.Id.msgNaziv);
            msgMjesto          = FindViewById <TextView>(Resource.Id.msgMjesto);
            msgAdresa          = FindViewById <TextView>(Resource.Id.msgAdresa);
            spinnerTipLokacije = FindViewById <Spinner>(Resource.Id.spinnerTipLokacije);
            spinnerNaselja     = FindViewById <Spinner>(Resource.Id.spinnerNaselja);
            anketePoPozicijama = FindViewById <CheckBox>(Resource.Id.anketePoPozicijama);

            SetActionBar(toolbar);
            ActionBar.Title             = "Dodavanje lokacije";
            lokacijaListView.ItemClick += LokacijaListView_ItemClick;
            spremiBtn.Click            += SpremiBtn_Click;
            odustaniBtn.Click          += OdustaniBtn_Click;
            nazivInput.TextChanged     += NazivInput_TextChanged;
            ulicaBrInput.TextChanged   += UlicaBrInput_TextChanged;
            mjestoInput.TextChanged    += MjestoInput_TextChanged;
            odaberiOpcinuBtn.Click     += OdaberiOpcinuBtn_Click;
            novaLokBtn.Click           += NovaLokBtn_Click;
            poznataLokBtn.Click        += PoznataLokBtn_Click;
            searchInput.KeyPress       += SearchInput_KeyPress;
            lokacijeList = db.Query <DID_Lokacija>(
                "SELECT * " +
                "FROM DID_Lokacija " +
                "LEFT JOIN DID_RadniNalog_Lokacija ON DID_Lokacija.SAN_Id = DID_RadniNalog_Lokacija.Lokacija " +
                "WHERE IFNULL(DID_RadniNalog_Lokacija.RadniNalog, 0) != ? " +
                "AND DID_Lokacija.SAN_KD_Sifra = ? " +
                "GROUP BY SAN_Naziv, SAN_Id", radniNalog, sifraKomitenta);

            lokacijeListFiltered = lokacijeList;

            if (!lokacijeListFiltered.Any() || localKomitentLokacija.GetBoolean("prikazNovaLokacija", false))
            {
                novaLokBtn.PerformClick();
            }
            else
            {
                poznataLokBtn.PerformClick();
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Historique);
            Android.Widget.Toolbar editToolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarMenuRE);
            editToolbar.InflateMenu(Resource.Menu.BarMenu);
            editToolbar.MenuItemClick += (sender, e) =>
            {
                switch (e.Item.Order)
                {
                case 0:
                    Intent intentprofil = new Intent(this, typeof(Profil));

                    StartActivity(intentprofil);


                    break;

                case 1:

                    Intent intentMessage = new Intent(this, typeof(Messages));

                    StartActivity(intentMessage);

                    break;

                case 2:
                    Intent intentMesreservation = new Intent(this, typeof(VosHebergement));

                    StartActivity(intentMesreservation);

                    break;

                case 3:
                    Intent intentrecherche = new Intent(this, typeof(VosHebergement));

                    StartActivity(intentrecherche);

                    break;
                }
            };

            try
            {
                ListView listViewHistorique = FindViewById <ListView>(Resource.Id.listViewHistorique);

                toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarMenuRE);
                listViewHistorique.Adapter = new historiqueScreenAdapter(this, ajouter.etiquetteHisto());


                toolbar.InflateMenu(Resource.Menu.BarMenu);
            }catch (Exception ex)
            {
                Toast.MakeText(this, ex.Message, ToastLength.Long).Show();
            }
        }
示例#9
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lokacijaNeizvrsenje);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            neprovedenoRadioBtn = FindViewById <CheckBox>(Resource.Id.neprovedenoRadioBtn);
            neprovedenoTextView = FindViewById <TextView>(Resource.Id.neprovedenoTextView);
            napomeneInput       = FindViewById <EditText>(Resource.Id.napomeneInput);
            opisInput           = FindViewById <EditText>(Resource.Id.opisInput);
            spinnerNeprovedeno  = FindViewById <Spinner>(Resource.Id.spinnerNeprovedeno);
            saveBtn             = FindViewById <Button>(Resource.Id.saveBtn);
            anketePoPozicijama  = FindViewById <CheckBox>(Resource.Id.anketePoPozicijama);

            SetActionBar(toolbar);
            ActionBar.Title            = "Lokacija";
            spinnerNeprovedeno.Enabled = false;
            saveBtn.Click += SaveBtn_Click;
            DID_RadniNalog_Lokacija radniNalogLok = db.Query <DID_RadniNalog_Lokacija>(
                "SELECT * " +
                "FROM DID_RadniNalog_Lokacija " +
                "WHERE RadniNalog = ? " +
                "AND Lokacija = ?", radniNalogId, lokacijaId).FirstOrDefault();

            bool anketePozicije = db.Query <DID_Lokacija>(
                "SELECT * " +
                "FROM DID_Lokacija " +
                "WHERE SAN_Id = ?", lokacijaId).FirstOrDefault().SAN_AnketePoPozicijama;

            anketePoPozicijama.Checked = anketePozicije;
            napomeneInput.Text         = radniNalogLok.Napomena;
            opisInput.Text             = radniNalogLok.OpisPosla;
            neprovedenoRadioBtn.Click += NeprovedenoRadioBtn_Click;

            //dropdown menu za razlog neizvrsene deratizacije
            List <DID_RazlogNeizvrsenjaDeratizacije> razlozi = db.Query <DID_RazlogNeizvrsenjaDeratizacije>(
                "SELECT * " +
                "FROM DID_RazlogNeizvrsenjaDeratizacije");

            List <string> razloziList = new List <string>();

            for (var i = 1; i < razlozi.Count; i++)
            {
                razloziList.Add(razlozi[i].Naziv);
            }

            ArrayAdapter <string> adapterPartnerList = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, razloziList);

            adapterPartnerList.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinnerNeprovedeno.Adapter = adapterPartnerList;

            if (radniNalogLok.Status == 4)
            {
                neprovedenoRadioBtn.PerformClick();
                spinnerNeprovedeno.SetSelection(radniNalogLok.RazlogNeizvrsenja - 1);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.odradeneAnkete);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            spinnerPartner    = FindViewById <Spinner>(Resource.Id.spinnerPartner);
            spinnerLokacija   = FindViewById <Spinner>(Resource.Id.spinnerLokacija);
            spinnerRadniNalog = FindViewById <Spinner>(Resource.Id.spinnerRadniNalog);
            mRecycleView      = FindViewById <RecyclerView>(Resource.Id.recyclerView);
            message           = FindViewById <TextView>(Resource.Id.message);
            messagePotvrda    = FindViewById <TextView>(Resource.Id.messagePotvrda);
            prikazAnketa      = FindViewById <LinearLayout>(Resource.Id.prikazAnketa);

            SetActionBar(toolbar);
            ActionBar.Title                 = "Odrađene ankete";
            spinnerPartner.ItemSelected    += SpinnerPartner_ItemSelected;
            spinnerLokacija.ItemSelected   += SpinnerLokacija_ItemSelected;
            spinnerRadniNalog.ItemSelected += SpinnerRadniNalog_ItemSelected;
            mLayoutManager = new LinearLayoutManager(this);
            mRecycleView.SetLayoutManager(mLayoutManager);
            radniNalozi = db.Query <DID_RadniNalog>(
                "SELECT rn.Id, rn.Godina, rn.Broj, rn.Status, rn.PokretnoSkladiste, rn.Voditelj, rn.Izdavatelj, rn.Primatelj, rn.DatumOd, rn.DatumDo, rn.DatumIzrade, rn.DatumIzvrsenja, rn.SinhronizacijaDatumVrijeme, rn.SinhronizacijaPrivremeniKljuc " +
                "FROM DID_RadniNalog rn " +
                "INNER JOIN DID_RadniNalog_Lokacija ON rn.Id = DID_RadniNalog_Lokacija.RadniNalog " +
                "INNER JOIN DID_LokacijaPozicija ON DID_RadniNalog_Lokacija.Lokacija = DID_LokacijaPozicija.SAN_Id " +
                "INNER JOIN DID_Anketa ON DID_LokacijaPozicija.POZ_Id = DID_Anketa.ANK_POZ_Id " +
                "GROUP BY Broj, Godina");

            if (radniNalozi.Any())
            {
                message.Visibility      = Android.Views.ViewStates.Gone;
                prikazAnketa.Visibility = Android.Views.ViewStates.Visible;
                List <string> listRadniNalozi = new List <string>();
                radniNaloziIdList = new List <string>();
                foreach (var item in radniNalozi)
                {
                    listRadniNalozi.Add("Broj: " + item.Broj.ToString() + " / Godina: " + item.Godina);
                    radniNaloziIdList.Add(item.Id.ToString());
                }
                ArrayAdapter <string> adapterRNList = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, listRadniNalozi);
                adapterRNList.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
                spinnerRadniNalog.Adapter = adapterRNList;

                // ako je vec gledao podatke za neki radni nalog zapamti ga i vrati ga na taj radni nalog, ako nije

                // plan je da uvijek pocetno pokazuje zadnji dodani radni nalog
                //var zadnjiRadniNalog = radniNaloziIdList.LastOrDefault();
                //spinnerRadniNalog.SetSelection(radniNaloziIdList.IndexOf(sifraUlogiranogDjelatnika.ToString()));
            }
            else
            {
                message.Visibility      = Android.Views.ViewStates.Visible;
                prikazAnketa.Visibility = Android.Views.ViewStates.Gone;
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            //sets the layout
            SetContentView(Resource.Layout.layoutLogIn);

            mLinearLayout = FindViewById <LinearLayout>(Resource.Id.linearLayout1);
            mUsername     = FindViewById <EditText>(Resource.Id.userNameInput);
            mPassword     = FindViewById <EditText>(Resource.Id.passwordInput);
            mButton       = FindViewById <Button>(Resource.Id.button1);
            Button signup = FindViewById <Button>(Resource.Id.signUpButton);

            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar1);
            SetActionBar(toolbar);
            ActionBar.Title = "Log In";

            mButton.Click += login_Click;
            signup.Click  += signup_Click;

            //input validation
            mUsername.KeyPress += (object sender, View.KeyEventArgs e) => {
                e.Handled = false;
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    if (mUsername != null && mPassword != null)
                    {
                        validateUsers();
                    }
                    else
                    {
                        Toast.MakeText(this, "empty", ToastLength.Short).Show();
                    }
                    e.Handled = true;
                }
            };
            mPassword.KeyPress += (object sender, View.KeyEventArgs e) => {
                e.Handled = false;
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    if (mUsername != null && mPassword != null)
                    {
                        validateUsers();
                    }
                    else
                    {
                        Toast.MakeText(this, "empty", ToastLength.Short).Show();
                    }
                    e.Handled = true;
                }
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.kontola_page2);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            rotKutijaZivolovka            = FindViewById <RadioButton>(Resource.Id.kutijaZivolovka);
            rotKutijasLjepljivimPodloskom = FindViewById <RadioButton>(Resource.Id.kutijasLjepljivimPodloskom);
            rotKutijaSRodenticima         = FindViewById <RadioButton>(Resource.Id.kutijaSRodenticima);
            checkboxLjep                = FindViewById <LinearLayout>(Resource.Id.checkboxLjep);
            checkboxRot                 = FindViewById <LinearLayout>(Resource.Id.checkboxRot);
            checkboxZiv                 = FindViewById <LinearLayout>(Resource.Id.checkboxZiv);
            noviMamciUcinjenoRot        = FindViewById <CheckBox>(Resource.Id.noviMamciUcinjenoRot);
            novaKutijaUcinjenoRot       = FindViewById <CheckBox>(Resource.Id.novaKutijaUcinjenoRot);
            nadopunjenaMekomUcinjenoRot = FindViewById <CheckBox>(Resource.Id.nadopunjenaMekomUcinjenoRot);
            novaLjepPodUcinjenoLjep     = FindViewById <CheckBox>(Resource.Id.novaLjepPodUcinjenoLjep);
            novaKutijaUcinjenoLjep      = FindViewById <CheckBox>(Resource.Id.novaKutijaUcinjenoLjep);
            novaKutijaUcinjenoZiv       = FindViewById <CheckBox>(Resource.Id.novaKutijaUcinjenoZiv);

            SetActionBar(toolbar);
            ActionBar.Title = "Anketa";
            ClearCheckbox();
            tipKutije = localPozicija.GetInt("tipKutije", 0);
            if (tipKutije == 1)
            {
                rotKutijaSRodenticima.Visibility = Android.Views.ViewStates.Visible;
                rotKutijaSRodenticima.Checked    = true;
                checkboxRot.Visibility           = Android.Views.ViewStates.Visible;
            }
            else if (tipKutije == 2)
            {
                rotKutijasLjepljivimPodloskom.Visibility = Android.Views.ViewStates.Visible;
                rotKutijasLjepljivimPodloskom.Checked    = true;
                checkboxLjep.Visibility = Android.Views.ViewStates.Visible;
            }
            else
            {
                rotKutijaZivolovka.Visibility = Android.Views.ViewStates.Visible;
                rotKutijaZivolovka.Checked    = true;
                checkboxZiv.Visibility        = Android.Views.ViewStates.Visible;
            }

            if (localAnketa.GetBoolean("visitedPage2", false))
            {
                noviMamciUcinjenoRot.Checked        = localAnketa.GetBoolean("noviMamciUcinjenoRot", false);
                novaKutijaUcinjenoRot.Checked       = localAnketa.GetBoolean("novaKutijaUcinjenoRot", false);
                nadopunjenaMekomUcinjenoRot.Checked = localAnketa.GetBoolean("nadopunjenaMekomUcinjenoRot", false);
                novaLjepPodUcinjenoLjep.Checked     = localAnketa.GetBoolean("novaLjepPodUcinjenoLjep", false);
                novaKutijaUcinjenoLjep.Checked      = localAnketa.GetBoolean("novaKutijaUcinjenoLjep", false);
                novaKutijaUcinjenoZiv.Checked       = localAnketa.GetBoolean("novaKutijaUcinjenoZiv", false);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.SchedulesActivity);

            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar);
            toolbar.NavigationOnClick += delegate
            {
                this.OnBackPressed();
            };


            List <Schedule> schedules = new List <Schedule>
            {
                new Schedule {
                    ShortDescription = "Short Desctription 1"
                },
                new Schedule {
                    ShortDescription = "Short Desctription 2"
                }
            };

            schedulesRecyclerView  = FindViewById <RecyclerView>(Resource.Id.schedulesRecyclerView);
            schedulesLayoutManager = new LinearLayoutManager(this);
            schedulesRecyclerView.SetLayoutManager(schedulesLayoutManager);
            schedulesAdapter = new SchedulesAdapter(schedules);
            schedulesRecyclerView.SetAdapter(schedulesAdapter);

            scheduleFridayTextView        = FindViewById <TextView>(Resource.Id.scheduleFridayTextView);
            scheduleFridayTextView.Click += delegate
            {
                //change TextViews color
                scheduleSaturdayTextView.SetBackgroundResource(Resource.Drawable.textView_unselected);
                scheduleFridayTextView.SetBackgroundResource(Resource.Drawable.textView_selected);

                //TODO: Change recyclerview here
            };

            scheduleSaturdayTextView        = FindViewById <TextView>(Resource.Id.scheduleSaturdayTextView);
            scheduleSaturdayTextView.Click += delegate
            {
                //change TextViews color
                scheduleFridayTextView.SetBackgroundResource(Resource.Drawable.textView_unselected);
                scheduleSaturdayTextView.SetBackgroundResource(Resource.Drawable.textView_selected);

                //TODO: Change recyclerview here
            };
        }
示例#14
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);


            SetContentView(Resource.Layout.VosHebergement);
            Android.Widget.Toolbar editToolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarMenuRE);
            editToolbar.InflateMenu(Resource.Menu.BarMenu);
            editToolbar.MenuItemClick += (sender, e) =>
            {
                Intent intentprofil = new Intent(this, typeof(Profil));

                StartActivity(intentprofil);
                Toast.MakeText(this, "Bottom toolbar tapped: " + e.Item.TitleFormatted, ToastLength.Short).Show();



                Intent intentMessage = new Intent(this, typeof(Messages));

                StartActivity(intentMessage);
                Toast.MakeText(this, "Bottom toolbar tapped: " + e.Item.TitleFormatted, ToastLength.Short).Show();


                Intent intentMesreservation = new Intent(this, typeof(VosHebergement));

                StartActivity(intentMesreservation);
                Toast.MakeText(this, "Bottom toolbar tapped: " + e.Item.TitleFormatted, ToastLength.Short).Show();

                Intent intentrecherche = new Intent(this, typeof(VosHebergement));

                StartActivity(intentrecherche);
                Toast.MakeText(this, "Bottom toolbar tapped: " + e.Item.TitleFormatted, ToastLength.Short).Show();
            };

            ListView listView = FindViewById <ListView>(Resource.Id.listViewVpsHebergement);

            listView.Adapter = new VoshebegementScreenHome(this, ajouter.etiquetteVosheb());

            var btnajputer = FindViewById <FloatingActionButton>(Resource.Id.floatingActionButtonAjouter);


            listView.ItemClick += ListView_ItemClick;

            btnajputer.Click += delegate {
                Intent intentAjouterLogement = new Intent(this, typeof(AjouterLogementE1));

                StartActivity(intentAjouterLogement);
            };
        }
示例#15
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lokacijaZavrsena);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            prikazText  = FindViewById <TextView>(Resource.Id.prikazText);
            spremiBtn   = FindViewById <Button>(Resource.Id.spremiBtn);
            odustaniBtn = FindViewById <Button>(Resource.Id.odustaniBtn);

            SetActionBar(toolbar);
            ActionBar.Title    = "Lokacija";
            spremiBtn.Click   += SpremiBtn_Click;
            odustaniBtn.Click += OdustaniBtn_Click;
            prikazText.Text    = "Za lokaciju " + lokacijaNaziv + " je izdana potvrda. Želite li spremiti lokaciju kao izvršenu?";
        }
示例#16
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.kontola_page3);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            neprovedenoRadioBtn = FindViewById <CheckBox>(Resource.Id.neprovedenoRadioBtn);
            neprovedenoTextView = FindViewById <TextView>(Resource.Id.neprovedenoTextView);
            napomeneInput       = FindViewById <EditText>(Resource.Id.napomeneInput);
            spinnerNeprovedeno  = FindViewById <Spinner>(Resource.Id.spinnerNeprovedeno);
            saveBtn             = FindViewById <Button>(Resource.Id.saveBtn);
            msgNapomena         = FindViewById <TextView>(Resource.Id.msgNapomena);

            SetActionBar(toolbar);
            ActionBar.Title            = "Anketa";
            saveBtn.Click             += SaveBtn_Click;
            spinnerNeprovedeno.Enabled = false;
            //napomeneInput.RequestFocus();
            napomeneInput.TextChanged += NapomeneInput_TextChanged;
            neprovedenoRadioBtn.Click += NeprovedenoRadioBtn_Click;

            List <DID_RazlogNeizvrsenjaDeratizacije> razlozi = db.Query <DID_RazlogNeizvrsenjaDeratizacije>(
                "SELECT * " +
                "FROM DID_RazlogNeizvrsenjaDeratizacije");

            List <string> razloziList = new List <string>();

            for (var i = 1; i < razlozi.Count; i++)
            {
                razloziList.Add(razlozi[i].Naziv);
            }

            ArrayAdapter <string> adapterPartnerList = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, razloziList);

            adapterPartnerList.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinnerNeprovedeno.Adapter = adapterPartnerList;

            if (localAnketa.GetBoolean("visitedPage3", false))
            {
                napomeneInput.Text          = localAnketa.GetString("napomeneInput", null);
                neprovedenoRadioBtn.Checked = localAnketa.GetBoolean("neprovedenoRadioBtn", false);
                if (neprovedenoRadioBtn.Checked)
                {
                    spinnerNeprovedeno.Enabled = true;
                    spinnerNeprovedeno.SetSelection(razloziList.IndexOf(localAnketa.GetString("spinnerSelectedItem", null)));
                }
            }
        }
示例#17
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Activity_calendar);

            // Set toolbar
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar);
            toolbar.Title = "Calendar";
            SetActionBar(toolbar);
            ActionBar.SetDisplayHomeAsUpEnabled(true);
            ActionBar.SetDisplayShowHomeEnabled(true);

            mCalendarView = FindViewById <CalendarView>(Resource.Id.calendar);
            initCalendar();
            mCalendarView.DayClick += (o, e) => {
                bool hasEvent = false;
                foreach (KeyValuePair <string, List <HMEvent> > entry in mDict)
                {
                    String dateStr = new SimpleDateFormat("MM-dd-yyyy").Format(e.P0.Calendar.Time);
                    if (entry.Key.Equals(dateStr))
                    {
                        List <HMEvent> events       = entry.Value;
                        RecyclerView   recyclerView = new RecyclerView(this);
                        recyclerView.SetLayoutManager(new LinearLayoutManager(this));
                        BottomSheetDialog dialog  = new BottomSheetDialog(this);
                        CalendarAdapter   adapter = new CalendarAdapter(this, dialog, events);
                        recyclerView.SetAdapter(adapter);
                        dialog.SetContentView(recyclerView);
                        dialog.Show();
                        dialog.SetOnDismissListener(this);
                        if (!mAdapterDict.ContainsKey(dateStr))
                        {
                            mAdapterDict.Add(dateStr, adapter);
                        }
                        hasEvent = true;
                        break;
                    }
                }
                if (!hasEvent)
                {
                    Intent intent = new Intent(this, typeof(CalendarEditAcitvity));
                    StartActivityForResult(intent, CalendarAdapter.ADD);
                }
            };
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.provedbeniPlan_page1);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            datum             = FindViewById <DatePicker>(Resource.Id.datum);
            datumLinearLayout = FindViewById <LinearLayout>(Resource.Id.datumLinearLayout);
            datumTV           = FindViewById <TextView>(Resource.Id.datumTV);
            //vrijemeInput = FindViewById<EditText>(Resource.Id.vrijemeInput);
            higijenskoStanjeDobroRBtn     = FindViewById <RadioButton>(Resource.Id.higijenskoStanjeDobroRBtn);
            higijenskoStanjeLoseRBtn      = FindViewById <RadioButton>(Resource.Id.higijenskoStanjeLoseRBtn);
            higijenskoStanjeLoseInput     = FindViewById <EditText>(Resource.Id.higijenskoStanjeLoseInput);
            gradevinskoStanjeDobroRBtn    = FindViewById <RadioButton>(Resource.Id.gradevinskoStanjeDobroRBtn);
            gradevinskoStanjeLoseRBtn     = FindViewById <RadioButton>(Resource.Id.gradevinskoStanjeLoseRBtn);
            gradevinskoStanjeLoseInput    = FindViewById <EditText>(Resource.Id.gradevinskoStanjeLoseInput);
            tehnickaOpremljenostDobroRBtn = FindViewById <RadioButton>(Resource.Id.tehnickaOpremljenostDobroRBtn);
            tehnickaOpremljenostLoseRBtn  = FindViewById <RadioButton>(Resource.Id.tehnickaOpremljenostLoseRBtn);
            nametniciListView             = FindViewById <RecyclerView>(Resource.Id.nametniciListView);

            vrijeme              = FindViewById <TimePicker>(Resource.Id.vrijeme);
            vrijeme.TimeChanged += Vrijeme_TimeChanged;
            vrijeme.Hour         = DateTime.Now.Hour;
            vrijeme.Minute       = DateTime.Now.Minute;

            SetActionBar(toolbar);
            ActionBar.Title = "Provedbeni plan";
            higijenskoStanjeDobroRBtn.Click  += HigijenskoStanjeDobroRBtn_Click;
            higijenskoStanjeLoseRBtn.Click   += HigijenskoStanjeLoseRBtn_Click;
            gradevinskoStanjeDobroRBtn.Click += GradevinskoStanjeDobroRBtn_Click;
            gradevinskoStanjeLoseRBtn.Click  += GradevinskoStanjeLoseRBtn_Click;
            //vrijemeInput.Text = DateTime.Now.ToString("HH:mm");
            lokacijaId = localProvedbeniPlan.GetInt("lokacijaId", 0);
            datumInput = DateTime.Now.Date;
            datum.UpdateDate(datumInput.Year, datumInput.Month - 1, datumInput.Day);

            nametnici = db.Query <DID_Nametnik>(
                "SELECT * " +
                "FROM DID_Nametnik");
            mLayoutManager = new LinearLayoutManager(this);
            mAdapter       = new Adapter_Nametnici_ProvedbeniPlan(nametnici);
            nametniciListView.SetLayoutManager(mLayoutManager);
            mAdapter.CheckboxClick += MAdapter_CheckboxClick;
            nametniciListView.SetAdapter(mAdapter);

            CheckIfProvedbeniPlanExist();
        }
示例#19
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.SpeakersActivity);

            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar);
            toolbar.NavigationOnClick += delegate
            {
                this.OnBackPressed();
            };

            //get all the speakers from the db
            allSpeakers = DatabaseHelper.GetAllFromTable <Speaker>("speakers.db");

            //get only the international spakers
            internationalSpeakers = allSpeakers.Where(x => x.Nationality.Equals("international")).ToList();

            //get only the national speakers
            nationalSpeakers = allSpeakers.Where(x => x.Nationality.Equals("national")).ToList();

            speakersRecyclerView  = FindViewById <RecyclerView>(Resource.Id.speakersRecyclerView);
            speakersLayoutManager = new LinearLayoutManager(this);
            speakersRecyclerView.SetLayoutManager(speakersLayoutManager);
            LoadSpeakers(internationalSpeakers);

            internationalSpeakersTextView        = FindViewById <TextView>(Resource.Id.internationalSpeakersTextView);
            internationalSpeakersTextView.Click += delegate
            {
                //change TextViews's style when selected/not-selected
                internationalSpeakersTextView.SetBackgroundResource(Resource.Drawable.textView_selected);
                nationalSpeakersTextView.SetBackgroundResource(Resource.Drawable.textView_unselected);

                LoadSpeakers(internationalSpeakers);
            };

            nationalSpeakersTextView        = FindViewById <TextView>(Resource.Id.nationalSpeakersTextView);
            nationalSpeakersTextView.Click += delegate
            {
                //change TextViews's style when selected/not-selected
                nationalSpeakersTextView.SetBackgroundResource(Resource.Drawable.textView_selected);
                internationalSpeakersTextView.SetBackgroundResource(Resource.Drawable.textView_unselected);

                LoadSpeakers(nationalSpeakers);
            };
        }
示例#20
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.prvaDer_page3);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            kutijaSLjepljivimPodloskama = FindViewById <RadioButton>(Resource.Id.kutijaSLjepljivimPodloskama);
            kutijaSRodenticima          = FindViewById <RadioButton>(Resource.Id.kutijaSRodenticima);
            kutijaZivolovke             = FindViewById <RadioButton>(Resource.Id.kutijaZivolovke);
            checkboxLjep                = FindViewById <LinearLayout>(Resource.Id.checkboxLjep);
            checkboxRot                 = FindViewById <LinearLayout>(Resource.Id.checkboxRot);
            checkboxZiv                 = FindViewById <LinearLayout>(Resource.Id.checkboxZiv);
            noviMamciUcinjenoRot        = FindViewById <CheckBox>(Resource.Id.noviMamciUcinjenoRot);
            novaKutijaUcinjenoRot       = FindViewById <CheckBox>(Resource.Id.novaKutijaUcinjenoRot);
            nadopunjenaMekomUcinjenoRot = FindViewById <CheckBox>(Resource.Id.nadopunjenaMekomUcinjenoRot);
            novaLjepPodUcinjenoLjep     = FindViewById <CheckBox>(Resource.Id.novaLjepPodUcinjenoLjep);
            novaKutijaUcinjenoLjep      = FindViewById <CheckBox>(Resource.Id.novaKutijaUcinjenoLjep);
            novaKutijaUcinjenoZiv       = FindViewById <CheckBox>(Resource.Id.novaKutijaUcinjenoZiv);

            SetActionBar(toolbar);
            ActionBar.Title = "Anketa";
            kutijaSLjepljivimPodloskama.Click += KutijaSLjepljivimPodloskama_Click;
            kutijaSRodenticima.Click          += KutijaSRodenticima_Click;
            kutijaZivolovke.Click             += KutijaZivolovke_Click;

            if (localAnketa.GetBoolean("visitedPage3", false))
            {
                if (localAnketa.GetBoolean("ANK_Kutija_Ljep", false))
                {
                    kutijaSLjepljivimPodloskama.PerformClick();
                    novaLjepPodUcinjenoLjep.Checked = localAnketa.GetBoolean("novaLjepPodUcinjenoLjep", false);
                    novaKutijaUcinjenoLjep.Checked  = localAnketa.GetBoolean("novaKutijaUcinjenoLjep", false);
                }
                else if (localAnketa.GetBoolean("ANK_Kutija_Rot", false))
                {
                    kutijaSRodenticima.PerformClick();
                    noviMamciUcinjenoRot.Checked        = localAnketa.GetBoolean("noviMamciUcinjenoRot", false);
                    novaKutijaUcinjenoRot.Checked       = localAnketa.GetBoolean("novaKutijaUcinjenoRot", false);
                    nadopunjenaMekomUcinjenoRot.Checked = localAnketa.GetBoolean("nadopunjenaMekomUcinjenoRot", false);
                }
                else if (localAnketa.GetBoolean("ANK_Kutija_Ziv", false))
                {
                    kutijaZivolovke.PerformClick();
                    novaKutijaUcinjenoZiv.Checked = localAnketa.GetBoolean("novaKutijaUcinjenoZiv", false);
                }
            }
        }
示例#21
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.MenuDisplayLayout);

            string ID       = Intent.GetStringExtra("RestaurantID");
            string menuType = Intent.GetStringExtra("MenuType");

            Console.WriteLine(ID + " " + menuType);

            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar1);
            SetActionBar(toolbar);
            ActionBar.Title = menuType;

            mRecyclerView = FindViewById <RecyclerView>(Resource.Id.recyclerView1);

            getMenuItems(ID, menuType);
        }
示例#22
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.layoutLogIn, container, false);

            mLinearLayout = view.FindViewById <LinearLayout>(Resource.Id.linearLayout1);
            mUsername     = view.FindViewById <EditText>(Resource.Id.userNameInput);
            mPassword     = view.FindViewById <EditText>(Resource.Id.passwordInput);
            mButton       = view.FindViewById <Button>(Resource.Id.button1);

            Android.Widget.Toolbar toolbar = view.FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar1);
            mButton.Click += login_Click;

            mUsername.KeyPress += (object sender, View.KeyEventArgs e) => {
                e.Handled = false;
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    if (mUsername != null && mPassword != null)
                    {
                        validateUsers();
                    }
                    else
                    {
                        Toast.MakeText(Context as Activity, "empty", ToastLength.Short).Show();
                    }
                    e.Handled = true;
                }
            };
            mPassword.KeyPress += (object sender, View.KeyEventArgs e) => {
                e.Handled = false;
                if (e.Event.Action == KeyEventActions.Down && e.KeyCode == Keycode.Enter)
                {
                    if (mUsername != null && mPassword != null)
                    {
                        validateUsers();
                    }
                    else
                    {
                        Toast.MakeText(Context as Activity, "empty", ToastLength.Short).Show();
                    }
                    e.Handled = true;
                }
            };
            return(view);
        }
示例#23
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.login);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            usernameInput   = FindViewById <EditText>(Resource.Id.usernameInput);
            passwordInput   = FindViewById <EditText>(Resource.Id.paswordInput);
            errMessage      = FindViewById <TextView>(Resource.Id.errMessage);
            loginBtn        = FindViewById <Button>(Resource.Id.loginBtn);
            username        = FindViewById <LinearLayout>(Resource.Id.username);
            password        = FindViewById <LinearLayout>(Resource.Id.password);
            loadingLayout   = FindViewById <LinearLayout>(Resource.Id.loading);
            prijava         = FindViewById <RelativeLayout>(Resource.Id.prijava);
            zapamtiPrijavu  = FindViewById <CheckBox>(Resource.Id.zapamtiPrijavu);
            verzijaTextView = FindViewById <TextView>(Resource.Id.verzijaTextView);

            localUsername.Edit().Clear().Commit();
            SetActionBar(toolbar);
            ActionBar.Title            = "Prijava";
            loginBtn.Click            += LoginBtn_Click;
            usernameInput.FocusChange += HandleAnimationUsername;
            passwordInput.FocusChange += HandleAnimationPassword;
            usernameInput.TextChanged += UsernameInput_TextChanged;
            passwordInput.TextChanged += PasswordInput_TextChanged;
            passwordInput.KeyPress    += PasswordInput_KeyPress;

            verzijaTextView.Text = "Verzija: " +
                                   Application.Context.ApplicationContext.PackageManager.GetPackageInfo(Application.Context.ApplicationContext.PackageName, 0).VersionName.ToString();

            Database.GetDBConnection();

            List <RememberCredentials> rememberedCredentials = db.Query <RememberCredentials>(
                "SELECT * " +
                "FROM RememberCredentials");

            if (rememberedCredentials.Any())
            {
                usernameInput.Text = rememberedCredentials.FirstOrDefault().Username;
                passwordInput.Text = rememberedCredentials.FirstOrDefault().Password;
                usernameInput.RequestFocus();
                passwordInput.RequestFocus();
                zapamtiPrijavu.Checked = true;
            }
        }
示例#24
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            SetContentView(Resource.Layout.Messages);
            Android.Widget.Toolbar editToolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarMenuRE);
            editToolbar.InflateMenu(Resource.Menu.BarMenu);
            editToolbar.MenuItemClick += (sender, e) =>
            {
                switch (e.Item.Order)
                {
                case 0:
                    Intent intentprofil = new Intent(this, typeof(Profil));

                    StartActivity(intentprofil);


                    break;

                case 1:

                    Intent intentMessage = new Intent(this, typeof(Messages));

                    StartActivity(intentMessage);

                    break;

                case 2:
                    Intent intentMesreservation = new Intent(this, typeof(VosHebergement));

                    StartActivity(intentMesreservation);

                    break;

                case 3:
                    Intent intentrecherche = new Intent(this, typeof(VosHebergement));

                    StartActivity(intentrecherche);

                    break;
                }
            };
        }
示例#25
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.lokacije);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            lokacijaListView = FindViewById <RecyclerView>(Resource.Id.recyclerView);
            searchInput      = FindViewById <EditText>(Resource.Id.searchInput);
            resultMessage    = FindViewById <TextView>(Resource.Id.resultMessage);
            novaLokacijaBtn  = FindViewById <Button>(Resource.Id.novaLokacijaBtn);

            SetActionBar(toolbar);
            ActionBar.Title = "Odabir lokacije";
            localAnketa.Edit().Clear().Commit();
            localPozicija.Edit().Clear().Commit();
            localPotvrda.Edit().Clear().Commit();
            localNeizvrsernaLokacija.Edit().Clear().Commit();
            localProvedbeniPlan.Edit().Clear().Commit();
            localKomitentLokacijaEdit.PutBoolean("noviKomitent", false);
            string sifraPartnera = localKomitentLokacija.GetString("sifraKomitenta", null);

            radniNalog   = localRadniNalozi.GetInt("id", 0);
            lokacijeList = db.Query <DID_Lokacija>(
                "SELECT * " +
                "FROM DID_Lokacija " +
                "INNER JOIN T_KUPDOB ON DID_Lokacija.SAN_KD_SIFRA = T_KUPDOB.SIFRA " +
                "INNER JOIN DID_RadniNalog_Lokacija ON DID_Lokacija.SAN_Id = DID_RadniNalog_Lokacija.Lokacija " +
                "WHERE DID_Lokacija.SAN_KD_Sifra = ? " +
                "AND DID_RadniNalog_Lokacija.RadniNalog = ?", sifraPartnera, radniNalog);

            lokacijeListFiltered = lokacijeList;
            mLayoutManager       = new LinearLayoutManager(this);
            mAdapter             = new Adapter_LokacijeRecycleView(lokacijeListFiltered);
            lokacijaListView.SetLayoutManager(mLayoutManager);
            lokacijaListView.SetAdapter(mAdapter);
            mAdapter.ItemPotvrda        += MAdapter_PotvrdaClick;
            mAdapter.ItemClick          += MAdapter_ItemClick;
            mAdapter.ItemZakljucaj      += MAdapter_ItemZakljucaj;
            mAdapter.ItemProvedbeniPlan += MAdapter_ItemProvedbeniPlan;
            mAdapter.ItemPostavke       += MAdapter_ItemPostavke;
            searchInput.KeyPress        += SearchInput_KeyPress;
            searchInput.TextChanged     += SearchInput_TextChanged;
            novaLokacijaBtn.Click       += NovaLokacijaBtn_Click;
        }
示例#26
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.potroseniMaterijali_PrikazPozicija);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            materijaliListView = FindViewById <ListView>(Resource.Id.materijaliListView);
            partnerData        = FindViewById <TextView>(Resource.Id.partnerData);
            lokacijaData       = FindViewById <TextView>(Resource.Id.lokacijaData);
            materijalData      = FindViewById <TextView>(Resource.Id.materijalData);

            SetActionBar(toolbar);
            ActionBar.Title   = "Pozicije";
            radniNalog        = localRadniNalozi.GetInt("id", 0);
            materijalSifra    = localMaterijali.GetString("sifra", null);
            lokacijaId        = localKomitentLokacija.GetInt("lokacijaId", 0);
            lokacijaData.Text = db.Query <DID_Lokacija>(
                "SELECT * " +
                "FROM DID_Lokacija " +
                "WHERE SAN_Id = ?", lokacijaId).FirstOrDefault().SAN_Naziv;

            materijalData.Text = db.Query <T_NAZR>(
                "SELECT * " +
                "FROM T_NAZR " +
                "WHERE NAZR_SIFRA = ?", materijalSifra).FirstOrDefault().NAZR_NAZIV;
            partnerData.Text = db.Query <T_KUPDOB>(
                "SELECT * " +
                "FROM T_KUPDOB " +
                "WHERE SIFRA = ?", localMaterijali.GetString("sifraPartnera", null)).FirstOrDefault().NAZIV;

            pozicije = db.Query <DID_LokacijaPozicija>(
                "SELECT * " +
                "FROM DID_LokacijaPozicija poz " +
                "INNER JOIN DID_AnketaMaterijali mat ON poz.POZ_Id = mat.PozicijaId " +
                "WHERE mat.RadniNalog = ? " +
                "AND poz.SAN_Id = ? " +
                "AND mat.MaterijalSifra = ? " +
                "GROUP BY poz.POZ_Broj, poz.POZ_BrojOznaka", radniNalog, lokacijaId, materijalSifra);

            materijaliListView.Adapter    = new Adapter_MaterijaliPozicija(this, pozicije);
            materijaliListView.ItemClick += PartneriListView_ItemClick;
        }
示例#27
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.potroseniMaterijal_NoviMaterijal);
            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbarHomePage);
            kolicinaInput         = FindViewById <EditText>(Resource.Id.kolicinaInput);
            nazivData             = FindViewById <TextView>(Resource.Id.nazivData);
            cijenaData            = FindViewById <TextView>(Resource.Id.cijenaData);
            message               = FindViewById <TextView>(Resource.Id.message);
            spremiBtn             = FindViewById <Button>(Resource.Id.spremiBtn);
            odustaniBtn           = FindViewById <Button>(Resource.Id.odustaniBtn);
            spinnerMjernaJedinica = FindViewById <Spinner>(Resource.Id.spinnerMjernaJedinica);

            SetActionBar(toolbar);
            ActionBar.Title            = "Novi materijal";
            skladiste                  = localRadniNalozi.GetString("skladiste", null);
            spremiBtn.Click           += SpremiBtn_Click;
            odustaniBtn.Click         += OdustaniBtn_Click;
            kolicinaInput.KeyPress    += KolicinaInput_KeyPress;
            kolicinaInput.TextChanged += Input_TextChanged;
            kolicinaInput.Text         = "1,000";
            nazivData.Text             = localMaterijali.GetString("naziv", null);
            cijena             = Convert.ToDecimal(localMaterijali.GetString("cijena", null)).ToString("F2").Replace('.', ',');
            cijenaData.Text    = cijena;
            mjerneJediniceList = db.Query <T_MjerneJedinice>(
                "SELECT * " +
                "FROM T_MjerneJedinice");

            List <string> listMjernaJedinica = new List <string>();

            foreach (var item in mjerneJediniceList)
            {
                listMjernaJedinica.Add(item.Oznaka);
            }

            ArrayAdapter <string> adapterMjernaJedinicaList = new ArrayAdapter <string>(this, Android.Resource.Layout.SimpleSpinnerItem, listMjernaJedinica);

            adapterMjernaJedinicaList.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
            spinnerMjernaJedinica.Adapter = adapterMjernaJedinicaList;
        }
示例#28
0
        public override void OnViewCreated(View view, Bundle savedInstanceState)
        {
            conversationView = view.FindViewById <ListView>(Resource.Id.@in);
            outDeviceName    = view.FindViewById <TextView>(Resource.Id.deviceselected);
            outEditText      = view.FindViewById <EditText>(Resource.Id.edit_text_out);
            sendButton       = view.FindViewById <Button>(Resource.Id.button_send);
            toolbarBottom    = view.FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar_bottom);

            toolbarBottom.InflateMenu(Resource.Menu.bluetooth_chat);

            OnCreatdLinerLayout(view);
            OnCreatedSchedule(view);
            OnCreatePower(view);
            OnCreateProgressbar(view);
            OnCreateTextProgress(view);

            outEditText.Visibility      = ViewStates.Invisible;
            sendButton.Visibility       = ViewStates.Invisible;
            conversationView.Visibility = ViewStates.Invisible;

            PairWithBlueToothDevice(false);
        }
示例#29
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.activity_main);
            context = this;

            Toolbar toolbar = FindViewById <Toolbar>(Resource.Id.toolbar);

            toolbar.SetNavigationIcon(Resource.Drawable.airplane);
            toolbar.Title = "Travis :)";
            //Toolbar will now take on default actionbar characteristics
            this.SetActionBar(toolbar);
            //ActionBar.Title = "Travis :)";
            //ActionBar.SetIcon(Resource.Drawable.airplane);


            ChatBotConversation.context = context;

            adapter = new MessageRecycler(this, textMessages);

            assets = this.Assets;

            inputMessage = FindViewById <EditText>(Resource.Id.input);
            fab          = FindViewById <FloatingActionButton>(Resource.Id.fab);

            chatList = FindViewById <RecyclerView>(Resource.Id.recyclerView);

            chatList.SetLayoutManager(new GridLayoutManager(context, 1, LinearLayoutManager.Vertical, false));
            chatList.SetAdapter(adapter);


            DisplayChatMessage();


            fab.Click += delegate { SendMethod(); };
        }
示例#30
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(Resource.Layout.delayActivity);

            Android.Widget.Toolbar toolbar = FindViewById <Android.Widget.Toolbar>(Resource.Id.toolbar);
            SetActionBar(toolbar);
            this.ActionBar.Title = "";
            Button confirm = FindViewById <Button>(Resource.Id.confirmDelay);

            confirm.Click += (object sender, EventArgs e) =>
            {
                var intent = new Intent(this, typeof(detailsActivity));
                StartActivity(intent);
                Finish();
            };
            ImageButton cameraBtn = FindViewById <ImageButton>(Resource.Id.camera);

            cameraBtn.Click += (object sender, EventArgs e) =>
            {
            };
        }