示例#1
0
    private void GetProperties()
    {
        GameObject dialogPropertiesObject = GameObject.FindGameObjectWithTag(dialogPropertiesTag);

        if (dialogPropertiesObject != null)
        {
            dialogProperties = dialogPropertiesObject.GetComponent <DialogProperties>();
        }
    }
示例#2
0
 public void TestAufruf(DialogProperties flags)
 {
     if ((flags & DialogProperties.Ja_Button) == DialogProperties.Ja_Button)
     {
         Console.WriteLine("JA true, ");
     }
     if ((flags & DialogProperties.Nein_Button) == DialogProperties.Nein_Button)
     {
     }
     if ((flags & DialogProperties.Cancel_Button) == DialogProperties.Cancel_Button)
     {
     }
     if ((flags & DialogProperties.OK_Button) == DialogProperties.OK_Button)
     {
     }
 }
示例#3
0
        private async Task PickAndSendFile()
        {
            //TODO: check permission.

            var filePickerTask = new TaskCompletionSource <string[]>();

            DialogProperties properties = new DialogProperties()
            {
                SelectionMode = DialogConfigs.MultiMode,
                SelectionType = DialogConfigs.FileSelect,
                Root          = new Java.IO.File(DialogConfigs.DefaultDir),
                ErrorDir      = new Java.IO.File(DialogConfigs.DefaultDir),
                Offset        = new Java.IO.File(DialogConfigs.DefaultDir),
                Extensions    = null
            };

            FilePickerDialog dialog = new FilePickerDialog(this, properties);

            dialog.SetTitle("Select files");
            dialog.DialogSelection += (ss, ee) =>
            {
                filePickerTask.TrySetResult(ee.P0);
            };
            dialog.DismissEvent += (ss, ee) =>
            {
                filePickerTask.TrySetResult(new string[] { });
            };
            dialog.Show();

            string[] files = await filePickerTask.Task;

            if (files.Length == 0)
            {
                Finish();
                return;
            }

            await SendFiles(files);
        }
 public DialogButtonPressedArgs(DialogProperties dialogProperties)
 {
     DialogProperties = dialogProperties;
 }