示例#1
0
            public override void onItemClick <T1>(AdapterView <T1> parent, View view, int position, long id)
            {
                if (position >= outerInstance.SAMPLE_NAMES_LIST.Length)
                {
                    return;
                }

                switch (outerInstance.SAMPLE_NAMES_LIST[position])
                {
                case outerInstance.SAMPLE_SINGLE:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_Single));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_EFFECT:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_Effect));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_HDR:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_HDR));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_LLS:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_LowLight));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_PANORAMA:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_Panorama));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_DOF:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_DOF));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_FILTER:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_Filter));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_CONSTRAINED_HIGHSPEEDVIDEO:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_Constrained_HighSpeedVideo));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_HIGHSPEEDVIDEO:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_HighSpeedVideo));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_IPX:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_Image));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_TORCH:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_Torch));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_ZSL:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_ZSL));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_YUV:
                {
                    Intent intent = new Intent(outerInstance, typeof(Sample_YUV));
                    startActivity(intent);
                    break;
                }

                case outerInstance.SAMPLE_VERSION:
                {
                    try
                    {
                        StringBuilder builder     = new StringBuilder();
                        PackageInfo   packageInfo = PackageManager.getPackageInfo(PackageName, 0);

                        builder.Append(string.Format("Version code: {0:D}\n", packageInfo.versionCode)).Append(string.Format("Version name: {0}\n", packageInfo.versionName));

                        AlertDialogFragment.newInstance(android.R.drawable.ic_dialog_info, "CameraSDK Sample Application Version", builder.ToString(), false).show(FragmentManager, "info_dialog");
                        break;
                    }
                    catch (PackageManager.NameNotFoundException)
                    {
                        // This should not happen.
                    }
                }
                break;
                }
            }
示例#2
0
        /// <summary>
        /// Shows alert dialog.
        /// </summary>
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
//ORIGINAL LINE: private void showAlertDialog(final String message, final boolean finishActivity)
        private void showAlertDialog(string message, bool finishActivity)
        {
            AlertDialogFragment.newInstance(android.R.drawable.ic_dialog_alert, "Alert", message, finishActivity).show(FragmentManager, "alert_dialog");
        }