Exemplo n.º 1
0
 private void start()
 {
     ImagePicker.With(this)
     .SetFolderMode(config.FolderMode)
     .SetCameraOnly(config.CameraOnly)
     .SetFolderTitle(config.FolderTitle)
     .SetMultipleMode(config.MultipleMode)
     .SetSelectedImages(config.SelectedImages)
     .SetMaxSize(config.MaxSize)
     .Start();
 }
        public void Start()
        {
            bool folderMode   = folderModeSwitch.Checked;
            bool multipleMode = multipleModeSwitch.Checked;
            bool cameraOnly   = cameraOnlySwitch.Checked;

            ImagePicker.With(this)
            .SetFolderMode(folderMode)
            .SetCameraOnly(cameraOnly)
            .SetFolderTitle("Album")
            .SetMultipleMode(multipleMode)
            .SetSelectedImages(images)
            .SetMaxSize(10)
            .Start();
        }
Exemplo n.º 3
0
        public override System.Boolean OnOptionsItemSelected(IMenuItem item)
        {
            switch (item.ItemId)
            {
            case Resource.Id.id_action_btn_Add: {
                ImagePicker.With(this).SetFolderMode(true)
                .SetCameraOnly(false)
                .SetFolderTitle("Album")
                .SetMultipleMode(true)
                .SetSelectedImages(mImageList)
                .SetMaxSize(10)
                .Start();
                // GetImageStreamAsync();
                break;
            }

            case Resource.Id.id_action_btn_remove_all: {
                AlertDialog.Builder builder = new AlertDialog.Builder(this);
                builder.SetTitle("提示");
                builder.SetMessage("是否要删除所有已选照片?");
                builder.SetPositiveButton(Resource.String.str_cn_confrim, (ss, ee) => {
                        mImageAdapter.mImageViewer.RemoveAll();
                        mImageAdapter.NotifyDataSetChanged();
                    });
                builder.SetNegativeButton(Resource.String.str_cn_cancel, (ss, ee) => { });
                builder.Create().Show();
                break;
            }

            case Resource.Id.id_action_btn_appinfo: {
                string curInfo = "联系作者:[email protected]\n\n" + "软件版本:\n" +
                                 "\n\t版本号 " + mHhiAndroid.GetAppInfo().CurrentVer.ToString() +
                                 "\n\t传输协议版本 " + mHhiAndroid.GetAppInfo().NetProtocolVer.ToString() + "\n\n";

                string checkResult          = mHhiAndroid.CheckVer();
                AlertDialog.Builder builder = new AlertDialog.Builder(this);
                builder.SetTitle("提示");
                if (checkResult == "uptodate")
                {
                    builder.SetMessage(curInfo + "已是最新版本");
                    builder.SetPositiveButton(Resource.String.str_cn_confrim, (sender, e) => { });
                }
                else if (checkResult == "obsoleted")
                {
                    builder.SetMessage(curInfo + "当前版本已经被废弃不可使用\n请更新");
                    builder.SetPositiveButton(Resource.String.str_cn_confrim, (ss, ee) => {
                            Intent intent = new Intent();
                            intent.SetAction("android.intent.action.VIEW");
                            Uri content_url = Uri.Parse(checkResult);
                            intent.SetData(content_url);
                            StartActivity(intent);
                        });
                    builder.SetNegativeButton(Resource.String.str_cn_cancel, (ss, ee) => { });
                }
                else
                {
                    builder.SetMessage(curInfo + "有新版本可以使用\n是否更新?");
                    builder.SetPositiveButton(Resource.String.str_cn_confrim, (ss, ee) => {
                            Intent intent = new Intent();
                            intent.SetAction("android.intent.action.VIEW");
                            Uri content_url = Uri.Parse(checkResult);
                            intent.SetData(content_url);
                            StartActivity(intent);
                        });
                    builder.SetNegativeButton(Resource.String.str_cn_cancel, (ss, ee) => { });
                }
                builder.Create().Show();
                break;
            }
            }
            return(base.OnOptionsItemSelected(item) || mDrawerToggle.OnOptionsItemSelected(item));
        }