Beispiel #1
0
 public void GoBack()
 {
     try {
         pageStack.Pop();
         fragmentManager.PopBackStack();
     } catch (Exception ex) {
         System.Diagnostics.Debug.WriteLine($"failed to backstack {ex.Message}");
     }
 }
        public override async void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            var showTitleTextView = View.FindViewById <TextView>(Resource.Id.ShowTitleTextView);
            var showYearTextView  = View.FindViewById <TextView>(Resource.Id.ShowYearTextView);
            int showId            = Arguments.GetInt("ShowID", -1);

            if (showId == -1)
            {
                FragmentManager.PopBackStack();
                return;
            }

            showTitleTextView.Text = "Show #" + showId.ToString();

            var client = TraktApiHelper.Client;
            var show   = await client.Shows.GetShowAsync(showId.ToString());

            showTitleTextView.Text = show.Title;
            showYearTextView.Text  = show.Year.ToString();

            var seasons = await client.Seasons.GetAllSeasonsAsync(showId.ToString());

            var seasonListView = View.FindViewById <ListView>(Resource.Id.SeasonListView);

            SetUpListView(seasonListView, seasons.Select(season => new TraktItem(show, season)).ToArray());
        }
Beispiel #3
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            var view = inflater.Inflate(Resource.Layout.fragment_nohin_mailBag_password, container, false);
            prefs = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            SetTitle("メールバック");

            etPassword = view.FindViewById<EditText>(Resource.Id.et_nohinMailbagPwd_password);

            string menuFlag = prefs.GetString("menu_flg", "1");
            
            BootstrapButton button = view.FindViewById<BootstrapButton>(Resource.Id.btn_nohinMailbagPwd_confirm);
            button.Click += delegate {
                //StartFragment(FragmentManager, typeof(NohinCompleteFragment));
                if (menuFlag == "1")
                {
                    editor.PutBoolean("mailBagFlag", true);
                    editor.Apply();

                    ShowDialog("報告", "メールバッグの\n納品が完了しました。", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); });
                }
                else
                {
                    ShowDialog("報告", "納品検品が\n完了しました。\n\nお疲れ様でした!", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); });
                }

                
            };
            
            return view;
        }
Beispiel #4
0
        private void SetTodokesakiAsync()
        {
            ((MainActivity)this.Activity).ShowProgress("届先検索中。。。");

            List <KOSU060> todokeList = GetTokuisakiMasterInfo();

            if (todokeList.Count > 0)
            {
                listView            = view.FindViewById <ListView>(Resource.Id.listView1);
                listView.ItemClick += listView_ItemClick;

                todokesakiAdapter = new TodokesakiAdapter(todokeList);
                listView.Adapter  = todokesakiAdapter;
            }
            else
            {
                ShowDialog("報告", "表示データがありません。", () =>
                {
                    FragmentManager.PopBackStack();
                });
            }

            new Thread(new ThreadStart(delegate
            {
                Activity.RunOnUiThread(() => ((MainActivity)this.Activity).DismissDialog());
            }
                                       )).Start();
        }
Beispiel #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            Xamarin.Essentials.Platform.Init(this, savedInstanceState);
            SetContentView(Resource.Layout.activity_main);
            Android.Support.V7.Widget.Toolbar toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);
            SetSupportActionBar(toolbar);

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

            fab.Visibility = ViewStates.Gone;
            // fab.Click += FabOnClick;

            DrawerLayout          drawer = FindViewById <DrawerLayout>(Resource.Id.drawer_layout);
            ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(this, drawer, toolbar, Resource.String.navigation_drawer_open, Resource.String.navigation_drawer_close);

            drawer.AddDrawerListener(toggle);
            toggle.SyncState();

            NavigationView navigationView = FindViewById <NavigationView>(Resource.Id.nav_view);

            navigationView.SetNavigationItemSelectedListener(this);

            //load default Layout
            FragmentManager.PopBackStack();
            var fm = FragmentManager.BeginTransaction();

            fm.AddToBackStack(null);
            fm.Add(Resource.Id.homeFrameLayout, new Fragment_FM_Transaction());
            fm.SetTransition(FragmentTransit.FragmentOpen);
            fm.Commit();
        }
Beispiel #6
0
        private void OnFriendPickerDone(FriendPickerFragment fragment)
        {
            FragmentManager fm = SupportFragmentManager;

            fm.PopBackStack();

            String results = "";

            var selection = fragment.Selection;

            if (selection != null && selection.Count > 0)
            {
                List <String> names = new List <String> ();
                foreach (IGraphUser user in selection)
                {
                    names.Add(user.Name);
                }
                results = string.Join(", ", names.ToArray());
            }
            else
            {
                results = GetString(Resource.String.no_friends_selected);
            }

            ShowAlert(GetString(Resource.String.you_picked), results);
        }
Beispiel #7
0
        private void InitScreenByMenu(int kosuMenuflag)
        {
            kosuMenuflag = prefs.GetInt(Const.KOSU_MENU_FLAG, (int)Const.KOSU_MENU.TODOKE); // 画面区分

            if (kosuMenuflag == (int)Const.KOSU_MENU.TODOKE)
            {
                SetTitle("届先指定検品");
                SetFooterText("F1:中断");
            }
            else if (kosuMenuflag == (int)Const.KOSU_MENU.VENDOR)
            {
                SetTitle("ベンダー指定検品");
                SetFooterText("F1:中断");
                venderCd           = prefs.GetString("vendor_cd", "");
                txtVendorName.Text = prefs.GetString("vendor_nm", "");
            }
            else if (kosuMenuflag == (int)Const.KOSU_MENU.BARA)
            {
                SetTitle("バラ検品");
                txtVendorName.Text = prefs.GetString("vendor_nm", "");
                SetFooterText("");
                btnStop.Visibility = ViewStates.Gone;
            }
            else
            {
                FragmentManager.PopBackStack();
            }
        }
        private void BackToMainMenu()
        {
            string menu_kbn         = prefs.GetString("menu_kbn", "");
            string driver_nm        = prefs.GetString("driver_nm", "");
            string souko_cd         = prefs.GetString("souko_cd", "");
            string souko_nm         = prefs.GetString("souko_nm", "");
            string driver_cd        = prefs.GetString("driver_cd", "");
            string kitaku_cd        = prefs.GetString("kitaku_cd", "");
            string def_tokuisaki_cd = prefs.GetString("def_tokuisaki_cd", "");
            string tsuhshin_kbn     = prefs.GetString("tsuhshin_kbn", "");
            string souko_kbn        = prefs.GetString("souko_kbn", "");

            editor.Clear();
            editor.Commit();

            editor.PutString("menu_kbn", menu_kbn);
            editor.PutString("driver_nm", driver_nm);
            editor.PutString("souko_cd", souko_cd);
            editor.PutString("souko_nm", souko_nm);
            editor.PutString("driver_cd", driver_cd);
            editor.PutString("kitaku_cd", kitaku_cd);
            editor.PutString("def_tokuisaki_cd", def_tokuisaki_cd);
            editor.PutString("tsuhshin_kbn", tsuhshin_kbn);
            editor.PutString("souko_kbn", souko_kbn);
            editor.Apply();

            FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(0).Id, 0);
        }
Beispiel #9
0
        public override void OnBackPressed()
        {
            if (drawerLayout.IsDrawerOpen(Android.Support.V4.View.GravityCompat.Start))
            {
                // hide nav menu
                drawerLayout.CloseDrawers();
            }
            else if (FragmentManager.BackStackEntryCount > 1)
            {
                // close current fragment
                FragmentManager.PopBackStack();
                UpdateActionBar();
            }
            else
            {
                // close app on double click
                if (doubleBackToExitPressedOnce)
                {
                    base.OnBackPressed();
                    return;
                }
                doubleBackToExitPressedOnce = true;

                AWidget.Toast.MakeText(this, GetString(Resource.String.double_click_to_exit),
                                       AWidget.ToastLength.Short).Show();

                int timeout = int.Parse(ApplicationContext.GetString(Resource.String.doubleclick_to_exit_reset_timeout));
                new Handler().PostDelayed(() => doubleBackToExitPressedOnce = false, timeout);
            }
        }
Beispiel #10
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_config, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();

            SetTitle("ログイン");
            SetFooterText("");

            _HostIpEditText      = view.FindViewById <EditText>(Resource.Id.hostIp);
            _HostIpEditText.Text = WebService.GetHostIpAddress();

            _PortEditText      = view.FindViewById <EditText>(Resource.Id.port);
            _PortEditText.Text = WebService.GetPort();


            btnConfirm        = view.FindViewById <Button>(Resource.Id.confirm);
            btnConfirm.Click += delegate {
                if (_HostIpEditText.Text == "")
                {
                    ShowDialog("報告", "ホストIPを入力してください。", () => { });
                    return;
                }

                ShowDialog("警告", "この設定でよろしいでしょうか?", () => {
                    new DataBase().SetHostIpAddress(_HostIpEditText.Text, _PortEditText.Text);
                    WebService.SetHostIpAddress(_HostIpEditText.Text, _PortEditText.Text);

                    FragmentManager.PopBackStack();
                });
            };

            return(view);
        }
Beispiel #11
0
        public void OrderCompleted()
        {
            FragmentManager.PopBackStack(baseFragment, PopBackStackFlags.Inclusive);
            SetupActionBar();

            SwitchScreens(new BragFragment(), true, true);
        }
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            View view = inflater.Inflate(Resource.Layout.fragment_animation, container, false);

            this.toolbar = view.FindViewById <Toolbar>(Resource.Id.toolbar);
            this.instructionsContainer = view.FindViewById <ViewGroup>(Resource.Id.instructions);
            this.animationContainer    = view.FindViewById <ViewGroup>(Resource.Id.animation_container);
            this.animationView         = view.FindViewById <LottieAnimationView>(Resource.Id.animation_view);
            this.seekBar      = view.FindViewById <AppCompatSeekBar>(Resource.Id.seek_bar);
            this.invertButton = view.FindViewById <ImageButton>(Resource.Id.invert_colors);
            this.playButton   = view.FindViewById <ImageButton>(Resource.Id.play_button);

            this.scaleSeekBar  = view.FindViewById <AppCompatSeekBar>(Resource.Id.scale_seek_bar);
            this.scaleTextView = view.FindViewById <TextView>(Resource.Id.scale_text);

            this.loopButton        = view.FindViewById <ImageButton>(Resource.Id.loop);
            this.animationNameView = view.FindViewById <TextView>(Resource.Id.animation_name);

            ImageButton restartButton   = view.FindViewById <ImageButton>(Resource.Id.restart);
            ImageButton loadAssetButton = view.FindViewById <ImageButton>(Resource.Id.load_asset);
            ImageButton qrscanButton    = view.FindViewById <ImageButton>(Resource.Id.qrscan);
            ImageButton loadFieButton   = view.FindViewById <ImageButton>(Resource.Id.load_file);
            ImageButton loadUrlButton   = view.FindViewById <ImageButton>(Resource.Id.load_url);

            playButton.Click      += PlayButton_Click;
            restartButton.Click   += RestartButton_Click;
            loopButton.Click      += LoopButton_Click;
            invertButton.Click    += InvertButton_Click;
            loadAssetButton.Click += LoadAssetButton_Click;
            loadFieButton.Click   += LoadFileButton_Click;
            loadUrlButton.Click   += LoadUrlButton_Click;
            qrscanButton.Click    += QRScanButton_Click;

            (this.Activity as AppCompatActivity).SetSupportActionBar(toolbar);
            toolbar.SetNavigationIcon(Resource.Drawable.ic_back);
            toolbar.NavigationClick += (sender, e) => FragmentManager.PopBackStack();

            this.HasOptionsMenu = true;
            PostUpdatePlayButtonText();
            LoopButton_Click(null, EventArgs.Empty);

            this.animationView.AddAnimatorListener(this);
            this.animationView.AddAnimatorUpdateListener(this);

            this.seekBar.ProgressChanged += (sender, e) =>
            {
                if (!animationView.IsAnimating)
                {
                    animationView.Progress = e.Progress / 100f;
                }
            };

            this.scaleSeekBar.ProgressChanged += (sender, e) =>
            {
                this.animationView.Scale = e.Progress / ScaleSliderFactor;
                this.scaleTextView.Text  = String.Format("{0:0.00}", this.animationView.Scale);
            };

            return(view);
        }
Beispiel #13
0
        void ListItemClicked(int position)
        {
            FragmentManager.PopBackStack(null, PopBackStackFlags.Inclusive);

            Log.Debug(Tag, "Item {0} has been selected.", position);

            Android.App.Fragment fragment = null;
            switch (position)
            {
            case 0:
                fragment = new SessionListFragment();
                break;

            case 1:
                fragment = new SpeakerListFragment();
                break;

            case 2:
                fragment = new AboutFragment();
                break;
            }

            // Insert the fragment by replacing any existing fragment
            FragmentManager.BeginTransaction()
            .Replace(Resource.Id.content_frame, fragment)
            .Commit();

            // Highlight the selected item, update the title, and close the drawer
            drawerList.SetItemChecked(position, true);
            Title = sections [position];
            drawerLayout.CloseDrawer(drawerList);
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);
            SetContentView(R.Layout.fragment_stack);

            // Watch for button clicks.
            Button button = (Button)FindViewById(R.Id.new_fragment);

            button.Click += (s, x) => AddFragmentToStack();

            button        = (Button)FindViewById(R.Id.home);
            button.Click += (s, x) =>
            {
                // If there is a back stack, pop it all.
                FragmentManager fm = GetSupportFragmentManager();
                if (fm.GetBackStackEntryCount() > 0)
                {
                    fm.PopBackStack(fm.GetBackStackEntryAt(0).GetId(),
                                    Android.Support.V4.App.FragmentManager.POP_BACK_STACK_INCLUSIVE);
                }
            };

            if (savedInstanceState == null)
            {
                // Do first time initialization -- Add initial fragment.
                Fragment            newFragment = CountingFragment.NewInstance(mStackLevel);
                FragmentTransaction ft          = GetSupportFragmentManager().BeginTransaction();
                ft.Add(R.Id.simple_fragment, newFragment).Commit();
            }
            else
            {
                mStackLevel = savedInstanceState.GetInt("level");
            }
        }
        public override async void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            var listTitleTextView = View.FindViewById <TextView>(Resource.Id.ListTitleTextView);
            var listItemListView  = View.FindViewById <ListView>(Resource.Id.ListItemListView);

            var client = TraktApiHelper.Client;
            var listId = Arguments.GetInt("ListID", -1);

            if (listId == -1)
            {
                FragmentManager.PopBackStack();
                return;
            }
            else if (listId == 0)
            {
                listTitleTextView.Text = "Watchlist";
                var list = await client.Users.GetWatchlistAsync("me");

                SetUpListView(listItemListView, list.Select(listItem => new TraktItem(listItem)).ToArray());
            }
            else
            {
                var listName = Arguments.GetString("ListName");
                listTitleTextView.Text = listName;
                var list = await client.Users.GetCustomListItemsAsync("me", Arguments.GetInt("ListID").ToString());

                SetUpListView(listItemListView, list.Select(listItem => new TraktItem(listItem)).ToArray());
            }
        }
Beispiel #16
0
        public void DisplayLogin()
        {
            if (!Xamarin.Forms.Forms.IsInitialized)
            {
                // initialize Xamarin.Forms before we use it
                Xamarin.Forms.Forms.Init(this, null);

                // we want to listen to the messaging center
                Xamarin.Forms.MessagingCenter.Subscribe(this, LoginPage.LoginMessage, (User user) =>
                {
                    // update the app
                    User = user;

                    // go back to the main page
                    FragmentManager.PopBackStack();
                });
            }

            // create the login page (Xamarin.Forms ContentPage)
            var loginPage = new LoginPage();

            // show the login screen
            var loginFragment = loginPage.CreateFragment(this);

            FragmentManager
            .BeginTransaction()
            .AddToBackStack(null)
            .Replace(Resource.Id.frameLayout, loginFragment)
            .Commit();
        }
        public override async void OnActivityCreated(Bundle savedInstanceState)
        {
            base.OnActivityCreated(savedInstanceState);

            var seasonTitleTextView = View.FindViewById <TextView>(Resource.Id.SeasonTitleTextView);
            int showId       = Arguments.GetInt("ShowID", -1);
            int seasonNumber = Arguments.GetInt("SeasonNumber", -1);

            if (showId == -1 || seasonNumber == -1)
            {
                // TODO: Show error message?
                FragmentManager.PopBackStack();
                return;
            }

            var client = TraktApiHelper.Client;
            var show   = await client.Shows.GetShowAsync(showId.ToString());

            seasonTitleTextView.Text = $"{show.Title} Season {seasonNumber}";
            var season = await client.Seasons.GetSeasonAsync(showId.ToString(), seasonNumber);

            var episodeListView = View.FindViewById <ListView>(Resource.Id.EpisodeListView);

            SetUpListView(episodeListView, season.Select(episode => new TraktItem(show, episode)).ToArray());
        }
Beispiel #18
0
        private void GetTenpoList()
        {
            ((MainActivity)this.Activity).ShowProgress("読み込み中...");

            List <TUMIKOMI020> todokeList = GetTokuisakiMasterInfo();

            new Thread(new ThreadStart(delegate
            {
                Activity.RunOnUiThread(() => {
                    if (todokeList.Count > 0)
                    {
                        ListView listView   = view.FindViewById <ListView>(Resource.Id.listView1);
                        listView.ItemClick += listView_ItemClick;

                        todokesakiAdapter = new Tsumikomi020Adapter(todokeList);
                        listView.Adapter  = todokesakiAdapter;
                    }
                    else
                    {
                        ShowDialog("エラー", "表示データがありません", () => { FragmentManager.PopBackStack(); });
                    }
                });
                Activity.RunOnUiThread(() => ((MainActivity)this.Activity).DismissDialog());
            }
                                       )).Start();
        }
Beispiel #19
0
 public override void OnBackPressed()
 {
     if (FragmentManager.BackStackEntryCount != cero)
     {
         FragmentManager.PopBackStack();
     }
     else
     {
         Android.App.AlertDialog.Builder builder = new Android.App.AlertDialog.Builder(this);
         builder.SetTitle(tituloDiago);
         builder.SetMessage(mensajeDialogoOnBackPressed);
         builder.SetPositiveButton(mensajeDialogoOnBackPressedPositiveButton, delegate {
             Android.App.AlertDialog.Builder cerrarSesionModal = new Android.App.AlertDialog.Builder(this);
             cerrarSesionModal.SetTitle(tituloDiago);
             cerrarSesionModal.SetMessage(mensajeDialogoOnBackPressedConfirmacion);
             cerrarSesionModal.SetPositiveButton(mensajeDialogoOnBackPressedPositiveButtonConfirmacion, delegate {
                 Intent i = new Intent(this, typeof(LoginConocidoActivity));
                 StartActivity(i);
             });
             cerrarSesionModal.SetNegativeButton(mensajeDialogoOnBackPressedNegativeButtonConfirmacion, delegate { });
             cerrarSesionModal.Show();
         });
         builder.SetNegativeButton(mensajeDialogoOnBackPressedNegativeButton, delegate { });
         builder.Show();
     }
 }
Beispiel #20
0
        private void OnButtonClick(ButtonClickEventArgs buttonClickEventArgs)
        {
            try
            {
                if (buttonClickEventArgs.ButtonClicked.Text == buttonClickEventArgs.Lst.First().CorrectAnswer)
                {
                    Toast.MakeText(Android.App.Application.Context, "Correct", ToastLength.Short).Show();
                    buttonClickEventArgs.Lst.RemoveAt(0);

                    TestFunction(buttonClickEventArgs.Lst);
                }
                else
                {
                    Toast.MakeText(Android.App.Application.Context, "Incorrect", ToastLength.Short).Show();
                    buttonClickEventArgs.Lst.RemoveAt(0);

                    TestFunction(buttonClickEventArgs.Lst);
                }
            }
            catch
            {
                //TODO: Email address is empty
                FragmentManager.PopBackStack();
                Android.Support.V4.App.Fragment fragment = new HomeFragment(EmailAddress, Token);
                FragmentManager.BeginTransaction().Replace(Resource.Id.fragment_container, fragment).Commit();

                return;
            }
        }
Beispiel #21
0
        private async void fillDetallePedidoVenta()
        {
            progressLayout.Visibility = ViewStates.Visible;
            string codPedido = string.Empty;
            Bundle bundle    = this.Arguments;

            if (bundle != null)
            {
                codPedido = bundle.GetString("codPedido");
            }
            var pedidoVenta = await datos.getPedidoVenta(codPedido);

            if (pedidoVenta != null)
            {
                AppCompatActivity activity = (AppCompatActivity)this.Activity;

                activity.SupportActionBar.Title = pedidoVenta.Sell_to_Customer_Name;
                var tmTotal      = pedidoVenta.SalesLines.Sum(q => q.Cantidad_KG / 1000).ToString("N0");
                var importeTotal = pedidoVenta.SalesLines.Sum(q => q.PrecioLineaTotal).ToString("N2");

                activity.SupportActionBar.Subtitle = string.Format("{0} Tm - {1} €", tmTotal, importeTotal);


                listViewDetallePedidoVenta         = (ListView)view.FindViewById(Resource.Id.listViewDetallePedidoVenta);
                adapterDetallePedidoVenta          = new AdapterDetallePedidoVenta(this.Activity, pedidoVenta.SalesLines.ToList());
                listViewDetallePedidoVenta.Adapter = adapterDetallePedidoVenta;
                progressLayout.Visibility          = ViewStates.Gone;
            }
            else
            {
                progressLayout.Visibility = ViewStates.Gone;
                Toast.MakeText(this.Activity, "Sin información del pedido seleccionado.", ToastLength.Short).Show();
                FragmentManager.PopBackStack();
            }
        }
Beispiel #22
0
 void OnBackPressed(object sender, ActivityEventArgs e)
 {
     if ((sender as IMenuItem).ItemId == global::Android.Resource.Id.Home)
     {
         FragmentManager.PopBackStack();
     }
 }
Beispiel #23
0
        public override View OnCreateView(LayoutInflater Inflater, ViewGroup container,
                                          Bundle savedInstanceState)
        {
            View v = Inflater.Inflate(R.Layouts.fragment_stack, container, false);

            // Watch for button clicks.
            Button button = (Button)v.FindViewById(R.Ids.new_fragment);

            button.Click += (o, a) => AddFragmentToStack();

            button        = (Button)v.FindViewById(R.Ids.delete_fragment);
            button.Click += (o, a) => GetChildFragmentManager().PopBackStack();

            button        = (Button)v.FindViewById(R.Ids.home);
            button.Click += (o, a) =>
            {
                // If there is a back stack, pop it all.
                FragmentManager fm = GetChildFragmentManager();
                if (fm.GetBackStackEntryCount() > 0)
                {
                    fm.PopBackStack(fm.GetBackStackEntryAt(0).GetId(),
                                    FragmentManager.POP_BACK_STACK_INCLUSIVE);
                }
                ;
            };

            return(v);
        }
Beispiel #24
0
        private void SetTodokesakiAsync()
        {
            ((MainActivity)this.Activity).ShowProgress("読み込み中");

            List <KOSU190> todokeList = WebService.RequestMate020(souko_cd);

            if (todokeList.Count > 0)
            {
                ListView listView = view.FindViewById <ListView>(Resource.Id.listView1);
                listView.ItemClick += listView_ItemClick;

                todokesakiAdapter = new VendorAllAdapter(todokeList);
                listView.Adapter  = todokesakiAdapter;
            }
            else
            {
                ShowDialog("報告", "表示データがありません。", () => {
                    FragmentManager.PopBackStack();
                });
            }

            new Thread(new ThreadStart(delegate
            {
                Activity.RunOnUiThread(() => ((MainActivity)this.Activity).DismissDialog());
            }
                                       )).Start();
        }
Beispiel #25
0
 public static void ClearBackStack(this FragmentManager manager)
 {
     for (var i = 0; i < manager.BackStackEntryCount; i++)
     {
         manager.PopBackStack();
     }
 }
Beispiel #26
0
        public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
        {
            view   = inflater.Inflate(Resource.Layout.fragment_kosu_tyingConfirm, container, false);
            prefs  = PreferenceManager.GetDefaultSharedPreferences(Context);
            editor = prefs.Edit();
            HideFooter();

            string kenpin_souko  = prefs.GetString("souko_cd", "");
            string kitaku_cd     = prefs.GetString("kitaku_cd", "");
            string syuka_date    = prefs.GetString("syuka_date", "");
            string bin_no        = prefs.GetString("bin_no", "");
            string tokuisaki_cd  = prefs.GetString("tokuisaki_cd", "");
            string todokesaki_cd = prefs.GetString("todokesaki_cd", "");
            string vendor_cd     = prefs.GetString("vendor_cd", "");

            view.FindViewById <BootstrapButton>(Resource.Id.stopButton).Click += delegate {
                FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0);
            };

            try
            {
                KOSU110 nyukaStatus;

                if (prefs.GetInt(Const.KOSU_MENU_FLAG, (int)Const.KOSU_MENU.TODOKE) == (int)Const.KOSU_MENU.TODOKE)
                {
                    SetTitle("届先指定検品");

                    nyukaStatus = WebService.RequestKosu110(kenpin_souko, kitaku_cd, syuka_date, bin_no, tokuisaki_cd, todokesaki_cd);
                }
                else
                {
                    SetTitle("ベンダー指定検品");

                    nyukaStatus = WebService.RequestKosu115(kenpin_souko, kitaku_cd, syuka_date, vendor_cd);
                }

                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_case).Text     = nyukaStatus.sum_case_sumi + "/" + nyukaStatus.sum_case;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_oricon).Text   = nyukaStatus.sum_oricon_sumi + "/" + nyukaStatus.sum_oricon;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_huteikei).Text = nyukaStatus.sum_futeikei_sumi + "/" + nyukaStatus.sum_futeikei;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_hazai).Text    = nyukaStatus.sum_hazai_sumi + "/" + nyukaStatus.sum_hazai;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_miseidou).Text = nyukaStatus.sum_ido_sumi + "/" + nyukaStatus.sum_ido;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_henpin).Text   = nyukaStatus.sum_henpin_sumi + "/" + nyukaStatus.sum_henpin;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_hansoku).Text  = nyukaStatus.sum_hansoku_sumi + "/" + nyukaStatus.sum_hansoku;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_kaisyu).Text   = "0" + "/" + "0";
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_total).Text    = nyukaStatus.total_sumi + "/" + nyukaStatus.total;
                view.FindViewById <TextView>(Resource.Id.txt_tyConfirm_daisu).Text    = nyukaStatus.sum_mate_cnt;
            }
            catch
            {
                Activity.RunOnUiThread(() =>
                {
                    ShowDialog("報告", "表示データがありません。", () => {
                        FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(3).Id, 0);
                    });
                });
            }

            return(view);
        }
Beispiel #27
0
        private void InitComponent()
        {
            SetTitle("納品検品");

            TextView txtTokuisaki = view.FindViewById <TextView>(Resource.Id.txt_nohinwork_tokuisakiNm);

            txtTokuisaki.Text = prefs.GetString("tokuisaki_nm", "");
            TextView txtTodokesaki = view.FindViewById <TextView>(Resource.Id.txt_nohinwork_todokesakiNm);

            txtTodokesaki.Text = prefs.GetString("todokesaki_nm", "");;

            tvCase                 = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_case);
            tvOricon               = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_oricon);
            tvSonota               = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_sonota);
            tvIdo                  = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_ido);
            tvMail                 = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_mail);
            tvFuteikei             = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_futeikei);
            tvHansoku              = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_hansoku);
            tvTc                   = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_tc);
            tvTsumidai             = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_tsumidaisu);
            tvAll                  = view.FindViewById <TextView>(Resource.Id.txt_nohinWork_all);
            tvmatehanNm            = view.FindViewById <TextView>(Resource.Id.matehanNm);
            nohinWorkButton        = view.FindViewById <BootstrapButton>(Resource.Id.nohinButton);
            nohinWorkButton.Click += delegate {
                if (tsumikomiDataList.Count == ko_su)
                {
                    Log.Debug(TAG, "MAIN NOHIN COMPLETE");
                    editor.PutString("menu_flg", "2");
                    editor.PutBoolean("nohinWorkEndFlag", true);
                    editor.Apply();

                    ShowDialog("報告", "納品検品が\n完了しました。\n\nお疲れ様でした!", () => { FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(2).Id, 0); });
                }
                else
                {
                    nohinWorkButton.Visibility = ViewStates.Gone;
                    kaizoButton.Visibility     = ViewStates.Visible;

                    tvCase.Text     = "0";
                    tvOricon.Text   = "0";
                    tvFuteikei.Text = "0";
                    tvTc.Text       = "0";
                    tvIdo.Text      = "0";
                    tvMail.Text     = "0";
                    tvHansoku.Text  = "0";
                    tvSonota.Text   = "0";
                }
            };

            kaizoButton        = view.FindViewById <BootstrapButton>(Resource.Id.kaizoButton);
            kaizoButton.Click += delegate {
                editor.PutString("menu_flg", "2");
                editor.Apply();
                StartFragment(FragmentManager, typeof(NohinMailBagPasswordFragment));
            };

            nohinWorkButton.Visibility = ViewStates.Gone;
            kaizoButton.Visibility     = ViewStates.Visible;
        }
Beispiel #28
0
 public override bool OnKeyDown(Keycode keycode, KeyEvent paramKeyEvent)
 {
     if (keycode == Keycode.Num4)
     {
         FragmentManager.PopBackStack(FragmentManager.GetBackStackEntryAt(1).Id, 0);
     }
     return(true);
 }
Beispiel #29
0
 void SetRoot(Fragment fragment)
 {
     if (FragmentManager.BackStackEntryCount > 0)
     {
         FragmentManager.PopBackStack(null, PopBackStackFlags.Inclusive);
     }
     Navigate(fragment);
 }
        public void OnTabSelected(ActionBar.Tab tab, FragmentTransaction ft)
        {
            FragmentManager.PopBackStack(null, FragmentManager.PopBackStackInclusive);

            Log.Debug(Tag, "The tab {0} has been selected.", tab.Text);
            Fragment frag = _fragments [tab.Position];

            ft.Replace(Resource.Id.content_frame, frag);
        }