Exemple #1
0
        protected void showHelp()
        {
            DialogAbout dlg = new DialogAbout();

            dlg.Show();

            //FilterSetDialog dlg = new FilterSetDialog();
            //dlg.Show();

            //HelpDlg dlg = new HelpDlg();
            //dlg.ShowDialog();
        }
Exemple #2
0
    protected void OnAboutActionActivated(object sender, EventArgs e)
    {
        DialogAbout aboutBox = new DialogAbout();

        aboutBox.WindowPosition = WindowPosition.CenterOnParent;
        aboutBox.Response      += (o, args) => {
            if (args.ResponseId == ResponseType.Ok)
            {
                aboutBox.Destroy();
            }
        };
        aboutBox.ShowAll();
    }
Exemple #3
0
        private void About_Click(object sender, EventArgs e)
        {
            var about = new DialogAbout();

            about.ShowDialog();
        }
        public override bool OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Android.Resource.Id.Home:
                _navigationView.Menu.Clear();
                ConfigureHomeGrid(_homeStrings, _homeImgs);
                break;

            case Resource.Id.topMenu_food:
                _navigationView.Menu.Clear();
                _navigationView.InflateMenu(Resource.Menu.menuFood);
                ClearGridView();
                break;

            case Resource.Id.topMenu_drinks:
                _navigationView.Menu.Clear();
                _navigationView.InflateMenu(Resource.Menu.menuDrinks);
                ClearGridView();
                break;

            case Resource.Id.topMenu_dessert:
                _navigationView.Menu.Clear();
                ConfigureGridView(_menu.First(kvp => kvp.Key == "dessert").Value);
                break;

            case Resource.Id.topMenu_service:
                Toast.MakeText(this, "Your waiter has been requested!", ToastLength.Long).Show();
                ServerRequestWaiter();
                break;

            case Resource.Id.topMenu_bill:
                if (TotalOrder.Count > 0)
                {
                    FragmentTransaction trans      = FragmentManager.BeginTransaction();
                    DialogBill          dialogBill = new DialogBill();
                    dialogBill.SetStyle(DialogFragmentStyle.NoFrame, 0);
                    dialogBill.Show(trans, "dialog_bill");
                }
                else
                {
                    Toast.MakeText(this, "Error! No order was sent!", ToastLength.Short).Show();
                }
                break;

            case Resource.Id.topMenu_cancel:
                CanceledCounter++;
                if (Status == EStatus.Waiting)
                {
                    Toast.MakeText(this, "Sorry! Too late to cancel your request!", ToastLength.Short).Show();
                }
                break;

            case Resource.Id.topMenu_order:
                if (CurrentOrder.Count > 0)
                {
                    Intent intent = new Intent(this, typeof(OrderActivity));
                    StartActivity(intent);
                }
                else
                {
                    Toast.MakeText(this, "Your current order is empty!", ToastLength.Long).Show();
                }
                break;

            case Resource.Id.topMenu_about:
                FragmentTransaction transaction = FragmentManager.BeginTransaction();
                DialogAbout         dialogAbout = new DialogAbout();
                dialogAbout.SetStyle(DialogFragmentStyle.NoFrame, 0);
                dialogAbout.Show(transaction, "dialog_about");
                break;

            case Resource.Id.topMenu_admin:
                FragmentTransaction transactionSettings = FragmentManager.BeginTransaction();
                DialogSettings      dialogSettings      = new DialogSettings();
                dialogSettings.SetStyle(DialogFragmentStyle.NoFrame, 0);
                dialogSettings.Show(transactionSettings, "dialog_settings");
                break;

            default:
                return(base.OnOptionsItemSelected(item));
            }
            return(base.OnOptionsItemSelected(item));
        }