Ejemplo n.º 1
0
        /// <summary>
        /// Decompile the WixCloseApplication table.
        /// </summary>
        /// <param name="table">The table to decompile.</param>
        private void DecompileWixCloseApplicationTable(Table table)
        {
            foreach (Row row in table.Rows)
            {
                Util.CloseApplication closeApplication = new Util.CloseApplication();

                closeApplication.Id = (string)row[0];

                closeApplication.Target = (string)row[1];

                if (null != row[2])
                {
                    closeApplication.Description = (string)row[2];
                }

                if (null != row[3])
                {
                    closeApplication.Content = (string)row[3];
                }

                if (null != row[4])
                {
                    // TODO: handle this when used.
                }

                if (null != row[5])
                {
                    closeApplication.Sequence = (int)row[5];
                }

                this.Core.RootElement.AddChild(closeApplication);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Decompile the WixCloseApplication table.
        /// </summary>
        /// <param name="table">The table to decompile.</param>
        private void DecompileWixCloseApplicationTable(Table table)
        {
            foreach (Row row in table.Rows)
            {
                Util.CloseApplication closeApplication = new Util.CloseApplication();

                closeApplication.Id = (string)row[0];

                closeApplication.Target = (string)row[1];

                if (null != row[2])
                {
                    closeApplication.Description = (string)row[2];
                }

                if (null != row[3])
                {
                    closeApplication.Content = (string)row[3];
                }

                // set defaults
                closeApplication.CloseMessage = Util.YesNoType.no;
                closeApplication.RebootPrompt = Util.YesNoType.yes;
                closeApplication.ElevatedCloseMessage = Util.YesNoType.no;

                if (null != row[4])
                {
                    int attribute = (int)row[4];

                    closeApplication.CloseMessage = (0x1 == (attribute & 0x1)) ? Util.YesNoType.yes : Util.YesNoType.no;
                    closeApplication.RebootPrompt = (0x2 == (attribute & 0x2)) ? Util.YesNoType.yes : Util.YesNoType.no;
                    closeApplication.ElevatedCloseMessage = (0x4 == (attribute & 0x4)) ? Util.YesNoType.yes : Util.YesNoType.no;
                }

                if (null != row[5])
                {
                    closeApplication.Sequence = (int)row[5];
                }

                if (null != row[6])
                {
                    closeApplication.Property = (string)row[6];
                }

                this.Core.RootElement.AddChild(closeApplication);
            }
        }