Esempio n. 1
0
        public override void Write(XmlElement parent)
        {
            CreateElement(parent, "systemParameter",

                          "spiAction", SpiAction.ToString(),
                          "uiParam", UIParam.ToStringInvariant(),
                          "pvParam", PVParam.ToStringInvariant()
                          );
        }
Esempio n. 2
0
        public override void Execute()
        {
            if (SpiAction == SpiAction.None)
            {
                return;
            }

            Backup(Package.ExecutionInfo.BackupGroup);

            Boolean result = NativeMethods.SystemParametersInfo(SpiAction, UIParam, new IntPtr(PVParam));

            if (!result)
            {
                String error = NativeMethods.GetLastErrorString();

                String args = SpiAction.ToString() + "," + UIParam.ToStringInvariant() + "," + PVParam.ToStringInvariant();

                Package.Log.Add(LogSeverity.Error, "SystemParametersInfo(" + args + ") failed: " + error);
            }
        }