protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.activity_passkey);

                Button btnLogin = FindViewById <Button>(Resource.Id.btnLogin);
                btnLogin.Click += btnLogin_Click;

                editPassKey = FindViewById <EditText>(Resource.Id.editPassKey);

                Button btnBack = FindViewById <Button>(Resource.Id.btnBack);
                btnBack.Click += (e, a) =>
                {
                    this.Finish();
                };

                editPassKey.RequestFocus();
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.activity_main);

                Button btnServerSetting = FindViewById <Button>(Resource.Id.btnServerSetting);
                btnServerSetting.Click += BtnServerSetting_Click;

                txtScanCase           = FindViewById <EditText>(Resource.Id.txtScanCase);
                txtScanCase.KeyPress += TxtScanCase_KeyPress;

                txtScanCount = FindViewById <TextView>(Resource.Id.txtScanCount);

                listViewScanCase = FindViewById <ListView>(Resource.Id.listViewScanCase);
                _listScanCase    = new List <ScanCaseModel>();

                ItemAdapter = new CaseItemAdapter(this, _listScanCase);
                listViewScanCase.Adapter = ItemAdapter;

                if (ReadSettingFile() == false)
                {
                    OpenActivity(typeof(SettingActivity));
                }

                ReadCaseFile();
                txtScanCase.RequestFocus();
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.activity_setting);

                Button btnSave = FindViewById <Button>(Resource.Id.btnSave);
                btnSave.Click += BtnSave_Click;

                editServerIP = FindViewById <EditText>(Resource.Id.txtServerIP);
                editPort     = FindViewById <EditText>(Resource.Id.txtPort);


                Button btnBack = FindViewById <Button>(Resource.Id.btnBack);
                btnBack.Click += (e, a) =>
                {
                    this.Finish();
                };

                ReadSettingFile();

                editServerIP.RequestFocus();
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
Пример #4
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.activity_main);

                txtItemCount = FindViewById <TextView>(Resource.Id.txtItemCount);
                txtMsg       = FindViewById <TextView>(Resource.Id.txtMsg);
                txtMsg.Text  = "";

                Button btnLoadItem = FindViewById <Button>(Resource.Id.btnLoadItem);
                btnLoadItem.Click += BtnLoadItem_ClickAsync;

                Button btnMapping = FindViewById <Button>(Resource.Id.btnMapping);
                btnMapping.Click += BtnMapping_Click;

                itemDb.CreateDatabase();
                ShowItemCount();
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var FragmentView = inflater.Inflate(Resource.Layout.fragment_home, container, false);

            try
            {
                txtCurrentMonth      = FragmentView.FindViewById <TextView>(Resource.Id.txtCurrentMonth);
                txtCurrentMonth.Text = DateTime.Now.ToString("MMM-yyyy");

                btnCredit        = FragmentView.FindViewById <Button>(Resource.Id.btnCredit);
                btnCredit.Click += btnCredit_Click;

                btnDebit        = FragmentView.FindViewById <Button>(Resource.Id.btnDebit);
                btnDebit.Click += btnDebit_Click;

                btnBal        = FragmentView.FindViewById <Button>(Resource.Id.btnBalance);
                btnBal.Click += BtnBal_Click;

                btnTotalBal = FragmentView.FindViewById <Button>(Resource.Id.btnTotalBalance);

                btnViewHistory        = FragmentView.FindViewById <Button>(Resource.Id.btnViewHistory);
                btnViewHistory.Click += btnViewHisotry_Click;

                GetCurrentMonthCreditDebitAsync();
            }
            catch (Exception ex1)
            {
                clsGLB.ShowMessage(ex1.Message, Activity, MessageTitle.ERROR);
            }
            return(FragmentView);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.activity_mapping);

                txtMsg      = FindViewById <TextView>(Resource.Id.txtMsg);
                txtMsg.Text = "";

                txtImei           = FindViewById <EditText>(Resource.Id.txtImei);
                txtImei.KeyPress += TxtImei_KeyPress;

                txtRfid           = FindViewById <EditText>(Resource.Id.txtRfid);
                txtRfid.KeyPress += TxtRfid_KeyPress;

                Button btnBack = FindViewById <Button>(Resource.Id.btnBack);
                btnBack.Click += (e, a) =>
                {
                    this.Finish();
                };

                txtImei.RequestFocus();
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
Пример #7
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.activity_main);

                textMessage = FindViewById <TextView>(Resource.Id.message);
                BottomNavigationView navigation = FindViewById <BottomNavigationView>(Resource.Id.navigation);
                navigation.SetOnNavigationItemSelectedListener(this);

                //Check Permission
                if (Android.Support.V4.Content.ContextCompat.CheckSelfPermission(this, Manifest.Permission.WriteExternalStorage) == (int)Permission.Granted)
                {
                    // We have permission, go ahead and use the storage.
                    //Create Database if not exist
                    creditDebitDb.CreateDatabase();
                    LoadFragment(Resource.Id.navigation_home);
                }
                else
                {
                    // Storage permission is not granted. If necessary display rationale &request.

                    if (Android.Support.V4.App.ActivityCompat.ShouldShowRequestPermissionRationale(this, Manifest.Permission.WriteExternalStorage))
                    {
                        // Provide an additional rationale to the user if the permission was not granted
                        // and the user would benefit from additional context for the use of the permission.
                        // For example if the user has previously denied the permission.
                        clsGLB.ShowMessage("Bina Permission ke kuch nhi krna chahiye...Application require storage permission to run,Go to Setting->Apps->ExpenseTracker->Permissions. Give all permission and restart the app", this, MessageTitle.INFORMATION);
                    }
                    else
                    {
                        Android.Support.V4.App.ActivityCompat.RequestPermissions(this, new String[] { Manifest.Permission_group.Storage }, REQUEST_STORAGE);
                    }
                }
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
Пример #8
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var FragmentView = inflater.Inflate(Resource.Layout.fragment_credit, container, false);

            try
            {
                editDate      = FragmentView.FindViewById <EditText>(Resource.Id.editDate);
                editDate.Text = DateTime.Now.ToString("dd-MMM-yyyy");
                ImageButton imgbtnDate = FragmentView.FindViewById <ImageButton>(Resource.Id.imgbtnDate);
                imgbtnDate.Click += (s, e) =>
                {
                    try
                    {
                        DatePickerFragment frag = DatePickerFragment.NewInstance(delegate(DateTime time)
                        {
                            editDate.Text = time.ToString("dd-MMM-yyyy");
                        });
                        frag.Show(FragmentManager, DatePickerFragment.TAG);
                    }
                    catch (Exception ex)
                    {
                        clsGLB.ShowMessage(ex.Message, Activity, MessageTitle.ERROR);
                    }
                };

                txtTotalCredit      = FragmentView.FindViewById <TextView>(Resource.Id.txtTotalCredit);
                editAmount          = FragmentView.FindViewById <EditText>(Resource.Id.editAmount);
                editRemarks         = FragmentView.FindViewById <EditText>(Resource.Id.editRemarks);
                btnAddAmount        = FragmentView.FindViewById <Button>(Resource.Id.btnAddAmount);
                btnAddAmount.Click += BtnAddAmount_Click;

                GetTotalCreditAmountAsync();
            }
            catch (Exception ex1)
            {
                clsGLB.ShowMessage(ex1.Message, Activity, MessageTitle.ERROR);
            }
            return(FragmentView);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                // Set our view from the "main" layout resource
                SetContentView(Resource.Layout.activity_main);

                txtScanCase           = FindViewById <EditText>(Resource.Id.txtScanCase);
                txtScanCase.KeyPress += TxtScanCase_KeyPress;

                txtScanCount = FindViewById <TextView>(Resource.Id.txtScanCount);
                txtMsg       = FindViewById <TextView>(Resource.Id.txtMsg);

                //if (ReadSettingFile() == false)
                //    OpenActivity(typeof(SettingActivity));

                txtScanCase.RequestFocus();
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
Пример #10
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.activity_setting);

                cmbSite = FindViewById <Spinner>(Resource.Id.cmbSite);

                Button btnSave = FindViewById <Button>(Resource.Id.btnSave);
                btnSave.Click += BtnSave_Click;

                editServerIP = FindViewById <EditText>(Resource.Id.txtServerIP);
                editPort     = FindViewById <EditText>(Resource.Id.txtPort);


                Button btnBack = FindViewById <Button>(Resource.Id.btnBack);
                btnBack.Click += (e, a) =>
                {
                    this.Finish();
                };

                _ListSite.Add("--Select--");
                _ListSite.Add("0-TEST");
                ArrayAdapter <string> arrayAdapter = new ArrayAdapter <string>(this, Resource.Layout.Spiner, _ListSite);
                cmbSite.Adapter = arrayAdapter;
                cmbSite.SetSelection(0);

                BindCombo();

                ReadSettingFile();

                editServerIP.RequestFocus();
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }
Пример #11
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            try
            {
                base.OnCreate(savedInstanceState);
                SetContentView(Resource.Layout.activity_credit_debit_history_first);

                btnBack        = FindViewById <Button>(Resource.Id.btnBack);
                btnBack.Click += BtnBack_Click;
                //Retrieve the data using Intent.GetStringExtra method
                IsFilter = Intent.GetBooleanExtra("IsFilter", true);
                _Type    = Intent.GetStringExtra("Type");

                radio_group     = FindViewById <RadioGroup>(Resource.Id.radio_group);
                layout_FromDate = FindViewById <LinearLayout>(Resource.Id.layout_FromDate);
                layout_ToDate   = FindViewById <LinearLayout>(Resource.Id.layout_ToDate);
                layout_Btn      = FindViewById <LinearLayout>(Resource.Id.layout_Btn);
                radio_credit    = FindViewById <RadioButton>(Resource.Id.radio_credit);
                radio_debit     = FindViewById <RadioButton>(Resource.Id.radio_debit);
                radio_all       = FindViewById <RadioButton>(Resource.Id.radio_all);

                txtTotalCredit = FindViewById <TextView>(Resource.Id.txtTotalCredit);
                txtTotalDebit  = FindViewById <TextView>(Resource.Id.txtTotalDebit);
                txtTotalBal    = FindViewById <TextView>(Resource.Id.txtTotalBal);

                editFromDate      = FindViewById <EditText>(Resource.Id.editFromDate);
                editFromDate.Text = DateTime.Now.ToString("dd-MMM-yyyy");
                ImageButton imgbtnFromDate = FindViewById <ImageButton>(Resource.Id.imgbtnFromDate);
                imgbtnFromDate.Click += (s, e) =>
                {
                    try
                    {
                        DatePickerFragmentForActivity frag = DatePickerFragmentForActivity.NewInstance(delegate(DateTime time)
                        {
                            editFromDate.Text = time.ToString("dd-MMM-yyyy");
                        });
                        frag.Show(FragmentManager, DatePickerFragment.TAG);
                    }
                    catch (Exception ex)
                    {
                        clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
                    }
                };
                editToDate      = FindViewById <EditText>(Resource.Id.editToDate);
                editToDate.Text = DateTime.Now.ToString("dd-MMM-yyyy");
                ImageButton imgbtnToDate = FindViewById <ImageButton>(Resource.Id.imgbtnToDate);
                imgbtnToDate.Click += (s, e) =>
                {
                    try
                    {
                        DatePickerFragmentForActivity frag = DatePickerFragmentForActivity.NewInstance(delegate(DateTime time)
                        {
                            editToDate.Text = time.ToString("dd-MMM-yyyy");
                        });
                        frag.Show(FragmentManager, DatePickerFragment.TAG);
                    }
                    catch (Exception ex)
                    {
                        clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
                    }
                };
                btnView        = FindViewById <Button>(Resource.Id.btnView);
                btnView.Click += BtnView_Click;


                if (IsFilter)
                {
                    radio_group.Visibility     = ViewStates.Visible;
                    layout_FromDate.Visibility = ViewStates.Visible;
                    layout_ToDate.Visibility   = ViewStates.Visible;
                    layout_Btn.Visibility      = ViewStates.Visible;
                    btnView.Visibility         = ViewStates.Visible;
                }
                else
                {
                    radio_group.Visibility     = ViewStates.Gone;
                    layout_FromDate.Visibility = ViewStates.Gone;
                    layout_ToDate.Visibility   = ViewStates.Gone;
                    layout_Btn.Visibility      = ViewStates.Gone;
                    btnView.Visibility         = ViewStates.Invisible;
                }

                recylerview_history = FindViewById <RecyclerView>(Resource.Id.recylerview_history);
                mLayoutManager      = new LinearLayoutManager(this);
                recylerview_history.SetLayoutManager(mLayoutManager);

                if (IsFilter == false)
                {
                    GetHistoryAsync();
                }
            }
            catch (Exception ex)
            {
                clsGLB.ShowMessage(ex.Message, this, MessageTitle.ERROR);
            }
        }