Example #1
0
        void InjectDialogs(string name, ManagedDialogs dialogs)
        {
            if (dialogs.Any())
            {
                var dialogsInfo = new StringBuilder();

                foreach (var item in dialogs)
                {
                    if (!this.DefaultRefAssemblies.Contains(item.Assembly.Location))
                    {
                        this.DefaultRefAssemblies.Add(item.Assembly.Location);
                    }

                    var info = GetDialogInfo(item);

                    ValidateDialogInfo(info);
                    dialogsInfo.Append(info + "\n");
                }
                this.AddProperty(new Property(name, dialogsInfo.ToString().Trim()));
            }
        }
Example #2
0
        void DemoPlay(ManagedDialogs dialogs, string demoProperties = "")
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            IsDemoMode = true;

            var resourcesMsi = BuildUiPlayerResources();
            var dummySession = Installer.OpenPackage(resourcesMsi, true);

            foreach (var pair in demoProperties.ToDictionary())
            {
                dummySession[pair.Key] = pair.Value;
            }

            Runtime = new MsiRuntime(dummySession);
            Dialogs = dialogs;

            shellView = new ShellView();
            GoNext();
            shellView.ShowDialog();
        }
Example #3
0
 /// <summary>
 /// Plays the specified dialogs in demo mode.
 /// </summary>
 /// <param name="dialogs">The dialogs.</param>
 public static void Play(ManagedDialogs dialogs)
 {
     new UIShell().DemoPlay(dialogs);
 }
Example #4
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ManagedUI"/> class.
 /// </summary>
 public ManagedUI()
 {
     InstallDialogs = new ManagedDialogs();
     ModifyDialogs  = new ManagedDialogs();
 }