Ejemplo n.º 1
0
        private static void PreviewDialog_Completed(ConsentDialog dialog, ConsentDialog.CompletedResults results)
        {
            var sb = new StringBuilder();

            sb.AppendLine("The preview consent dialog completed with button ID: " + results.buttonId);

            if (results.toggleValues != null)
            {
                sb.AppendLine("Consent toggles:");
                foreach (KeyValuePair <string, bool> t in results.toggleValues)
                {
                    string toggleId    = t.Key;
                    bool   toggleValue = t.Value;
                    sb.AppendLine("Toggle ID: " + toggleId + "; Value: " + toggleValue);
                }
            }

            NativeUI.Alert("Consent Dialog Completed", sb.ToString());
        }
        void Dialog_Completed(ConsentDialog dialog, ConsentDialog.CompletedResults results)
        {
            buttonId.Value = results.buttonId;

            if (results.toggleValues != null)
            {
                toggleCount.Value       = results.toggleValues.Count;
                toggleIDs.stringValues  = new string[toggleCount.Value];
                toggleValues.boolValues = new bool[toggleCount.Value];

                int i = 0;

                foreach (KeyValuePair <string, bool> pair in results.toggleValues)
                {
                    toggleIDs.stringValues[i]  = pair.Key;
                    toggleValues.boolValues[i] = pair.Value;
                    i++;
                }
            }

            Fsm.Event(eventTarget, completedEvent);
            Finish();
        }
Ejemplo n.º 3
0
 private static void PreviewDialog_Completed(ConsentDialog dialog, ConsentDialog.CompletedResults results)
 {
 }