protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "image_file", ref m_image_file);
     ReadAttributeValue(e, "resource_id", ref m_resource_id);
     ReadAttributeValue(e, "center", ref m_center);
     base.OnXmlReadTag(e);
 }
Beispiel #2
0
        private void OnUnknownElement(object sender, XmlElementEventArgs xmlElementEventArgs)
        {
            var element = xmlElementEventArgs.Element;

            var nameAttribute = element.GetAttribute("name");

            if (string.IsNullOrEmpty(nameAttribute))
            {
                return;
            }

            var tuple = new XmlAttributeElement
            {
                ElementName   = element.Name,
                AttributeName = nameAttribute
            };

            var success = _elementAttributeProperties.ContainsKey(tuple);

            if (!success)
            {
                return;
            }

            var valueNode = xmlElementEventArgs.Element.SelectSingleNode("value");

            if (valueNode == null)
            {
                return;
            }

            var property = _elementAttributeProperties[tuple];

            SetProperty(property, xmlElementEventArgs.ObjectBeingDeserialized, valueNode.InnerText);
        }
Beispiel #3
0
 private void ProcessWorker(List <Worker> workers, XmlElementEventArgs e)
 {
     if (e.Element.Name == "Worker" && int.TryParse(e.Element.InnerText, out var workerId))
     {
         workers.Add(ToWorker(workerId));
     }
 }
 private static void Serializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     Debug.LogWarning("Configuration: Unknown element: " + e.Element.Name);
     Debug.LogWarning("Is your configuration syntax invalid?");
     Debug.LogWarning("The default values will be used for all values that cannot be read.");
     Debug.LogWarning("You can genereate a new valid configuration by deleting the old one.");
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "text", ref m_text);
     ReadAttributeValue(e, "font_name", ref m_font_name);
     ReadAttributeValue(e, "font_size", ref m_font_size);
     base.OnXmlReadTag(e);
 }
    protected void SynonymHandler(object sender, XmlElementEventArgs e)
    {
        var  member = SynonymsAttribute.GetMember(e.ObjectBeingDeserialized, e.Element.Name);
        Type memberType;

        if (member != null && member is FieldInfo)
        {
            memberType = ((FieldInfo)member).FieldType;
        }
        else if (member != null && member is PropertyInfo)
        {
            memberType = ((PropertyInfo)member).PropertyType;
        }
        else
        {
            return;
        }
        if (member != null)
        {
            object value;
            XmlSynonymDeserializer serializer = new XmlSynonymDeserializer(memberType, new XmlRootAttribute(e.Element.Name));
            using (System.IO.StringReader reader = new System.IO.StringReader(e.Element.OuterXml))
                value = serializer.Deserialize(reader);
            if (member is FieldInfo)
            {
                ((FieldInfo)member).SetValue(e.ObjectBeingDeserialized, value);
            }
            else if (member is PropertyInfo)
            {
                ((PropertyInfo)member).SetValue(e.ObjectBeingDeserialized, value);
            }
        }
    }
Beispiel #7
0
        static void OnUnknownElement(object sender, XmlElementEventArgs e)
        {
            FieldInfo  field = e.ObjectBeingDeserialized.GetType().GetField(e.Element.Name);
            MethodInfo parse = field.FieldType.GetMethod("Parse");

            field.SetValue(e.ObjectBeingDeserialized, parse.Invoke(null, new object[] { e.Element.Value }));
        }
Beispiel #8
0
 private static void Serializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     Debug.LogError("Unknown Element");
     Debug.LogError("\t" + e.Element.Name + " " + e.Element.InnerXml);
     Debug.LogError("\t LineNumber: " + e.LineNumber);
     Debug.LogError("\t LinePosition: " + e.LinePosition);
 }
 private void mySerializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     lock (SerializerObj)
     {
         m_IsHaveUnKnow = true;
     }
 }
Beispiel #10
0
        private void Serializer_UnknownElementEvent(object sender, XmlElementEventArgs e)
        {
            var errTxt = $"Unknown Element {e.Element.Name} {e.Element.InnerXml}. Line number:{e.LineNumber} Line Position: {e.LinePosition} ";

            _logger.LogError(errTxt);
            _errorList.Add(errTxt);
        }
Beispiel #11
0
 void unknownElement(object sender, XmlElementEventArgs e)
 {
     Logger.logMethod(MethodBase.GetCurrentMethod(), "unknown element: '" + e.Element.Name + "'.");
     // PartNumber
     // SerialFormat
     // ModelNumber
     // DrawingNumber
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "accepted", ref m_accepted);
     ReadAttributeValue(e, "resource_id", ref m_resource_id);
     ReadAttributeValue(e, "license_file", ref m_license_file);
     ReadAttributeValue(e, "accept_message", ref m_accept_message);
     base.OnXmlReadTag(e);
 }
Beispiel #13
0
 /// <summary>
 /// Notify about unknown OpenGL specification elements.
 /// </summary>
 /// <param name="sender">
 /// The <see cref="XmlSerializer"/> parsing the OpenGL specification.
 /// </param>
 /// <param name="e">
 /// A <see cref="XmlElementEventArgs"/> that specifies the event arguments.
 /// </param>
 private static void SpecSerializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     if (e.Element.Name == "unused")
     {
         return;
     }
     Console.WriteLine("Unknown element {0} at {1}:{2}.", e.Element.Name, e.LineNumber, e.LinePosition);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "id", ref m_id);
     ReadAttributeValue(e, "checked", ref m_checked);
     ReadAttributeValue(e, "checked_value", ref m_checked_value);
     ReadAttributeValue(e, "unchecked_value", ref m_unchecked_value);
     base.OnXmlReadTag(e);
 }
Beispiel #15
0
 private void Serializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     Debug.WriteLine("Unknown Element");
     Debug.WriteLine("\t" + e.Element.Name + " " + e.Element.InnerXml);
     Debug.WriteLine("\t LineNumber: " + e.LineNumber);
     Debug.WriteLine("\t LinePosition: " + e.LinePosition);
     Debug.Assert(false);             //TODO raise exception or not depending on settings (?)
 }
Beispiel #16
0
        /// <summary>
        /// This event is thrown if the element is not known.
        /// </summary>
        /// <param name="sender">The current object sender.</param>
        /// <param name="e">Element event argument.</param>
        void serialiser_UnknownElement(object sender, XmlElementEventArgs e)
        {
            System.Xml.XmlElement xmlElement = e.Element;

            // Throw a general exception.
            throw new System.Exception(
                      "Unknown Element : " + xmlElement.Name + " = " + xmlElement.Value);
        }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "filename", ref m_filename);
     ReadAttributeValue(e, "fileversion", ref m_fileversion);
     ReadAttributeValue(e, "comparison", ref m_comparison);
     ReadAttributeValue(e, "defaultvalue", ref m_defaultvalue);
     base.OnXmlReadTag(e);
 }
Beispiel #18
0
 internal static void OnUnknownElement(object sender, XmlElementEventArgs e)
 {
     if (ValidateSettings(Asmx, TraceEventType.Warning) && (e.Element != null))
     {
         string str  = RuntimeUtils.ElementString(e.Element);
         string name = (e.ExpectedElements == null) ? "WebUnknownElement" : ((e.ExpectedElements.Length == 0) ? "WebUnknownElement1" : "WebUnknownElement2");
         TraceEvent(TraceEventType.Warning, Res.GetString(name, new object[] { str, e.ExpectedElements }));
     }
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "package", ref m_package);
     ReadAttributeValue(e, "cmdparameters", ref m_cmdparameters);
     ReadAttributeValue(e, "cmdparameters_silent", ref m_cmdparameters_silent);
     ReadAttributeValue(e, "cmdparameters_basic", ref m_cmdparameters_basic);
     ReadAttributeValue(e, "disable_wow64_fs_redirection", ref m_disable_wow64_fs_redirection);
     base.OnXmlReadTag(e);
 }
Beispiel #20
0
        private void Serializer_UnknownElement(object sender, XmlElementEventArgs e)
        {
            P p = e.ObjectBeingDeserialized as P;

            if (p != null)
            {
                p.Text += e.Element.OuterXml.Replace(" xmlns=\"http://www.w3.org/2006/04/ttaf1\"", string.Empty);
            }
        }
Beispiel #21
0
 private static void Serializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     stringWriter.WriteLine("Unknown Element");
     stringWriter.WriteLine(e.Element.Name + " " + e.Element.InnerXml);
     stringWriter.WriteLine("LineNumber: " + e.LineNumber);
     stringWriter.WriteLine("LinePosition: " + e.LinePosition);
     stringWriter.WriteLine(sender.ToString());
     stringWriter.WriteLine("");
 }
Beispiel #22
0
 private void Deserializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     log("UnknownElement (Line, Position): ({0}, {1})", e.LineNumber, e.LinePosition);
     log("UnknownElement ExpectedElements: {0}", e.ExpectedElements);
     log("UnknownElement Name: {0}", e.Element.Name);
     log("UnknownElement LocalName: {0}", e.Element.LocalName);
     log("UnknownElement Namespace URI: {0}", e.Element.NamespaceURI);
     log("UnknownElement InnerXml: {0}", e.Element.InnerXml);
     log("UnknownElement Classname: {0}", e.ObjectBeingDeserialized.ToString());
 }
 private void serializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     if (e.Element.LocalName != "nil")
     {
         throw new SerializationException(
                   String.Format(
                       "Unknown element detected while deserializing a response at {0}:{1}, expected element = {2}. Detected element is {3}={4}.",
                       e.LineNumber, e.LinePosition, e.ExpectedElements, e.Element.LocalName, e.Element.InnerXml));
     }
 }
Beispiel #24
0
 private void OnUnknownElement(object sender, XmlElementEventArgs e)
 {
     if ((Thread.CurrentThread.GetHashCode() == this.currentThread) && (e.Element != null))
     {
         SoapUnknownHeader header = new SoapUnknownHeader {
             Element = e.Element
         };
         this.unknownHeaders.Add(header);
     }
 }
Beispiel #25
0
        private void xmlSerializer_UnknownElement(object sender, XmlElementEventArgs e)
        {
#if DEBUG
            //Console.WriteLine("Unknown Element");
            //Console.WriteLine("\t" + e.Element.Name + " " + e.Element.InnerXml);
            //Console.WriteLine("\t LineNumber: " + e.LineNumber);
            //Console.WriteLine("\t LinePosition: " + e.LinePosition);
#else
#endif
        }
Beispiel #26
0
        static void serializer_UnknownElement(object sender, XmlElementEventArgs e)
        {
            // We changed from "ActionLists" to "MainChannelFrames"
            if (e.Element.Name == "ActionLists")
            {
                GUIAnimation guiAnimation = e.ObjectBeingDeserialized as GUIAnimation;
                guiAnimation.MainChannelFrames.Clear();

                foreach (XmlNode actionsListsNode in e.Element.ChildNodes)
                {
                    if (actionsListsNode.Name != "ActionList")
                    {
                        continue;
                    }

                    MainChannelFrame mcf = new MainChannelFrame();
                    mcf.Frame = uint.Parse(actionsListsNode.Attributes["Frame"].Value);
                    guiAnimation.MainChannelFrames.Add(mcf);

                    foreach (XmlNode actionListNode in actionsListsNode.ChildNodes)
                    {
                        if (actionListNode.Name != "Actions")
                        {
                            continue;
                        }

                        foreach (XmlNode actionsNode in actionListNode.ChildNodes)
                        {
                            Actions.Action action = null;

                            if (actionsNode.Name == "SoundAction")
                            {
                                Actions.SoundAction soundAction = new Actions.SoundAction();
                                soundAction.Sound  = int.Parse(actionsNode.Attributes["Sound"].Value);
                                soundAction.Volume = uint.Parse(actionsNode["Volume"].InnerText);

                                action = soundAction;
                            }
                            else if (actionsNode.Name == "MessageAction")
                            {
                                Actions.MessageAction messageAction = new Actions.MessageAction();
                                messageAction.Message = int.Parse(actionsNode.Attributes["Message"].Value);

                                action = messageAction;
                            }

                            if (action != null)
                            {
                                mcf.Actions.Add(action);
                            }
                        }
                    }
                }
            }
        }
Beispiel #27
0
        public static void MyUnknownElementHandler(object sender, XmlElementEventArgs e)
        {
            string type = e.ObjectBeingDeserialized.GetType().ToString();

            Console.WriteLine("\nUnknown element when deserializing " + type);
            Console.WriteLine("Line number: " + e.LineNumber);
            Console.WriteLine("Line position: " + e.LinePosition);
            Console.WriteLine("Element name: " + e.Element.Name);
            Console.WriteLine("Element XML: " + e.Element.OuterXml);
            Console.WriteLine("------------------------------------------------------------------");
        }
Beispiel #28
0
 void foundUnknownElement(Object sender, XmlElementEventArgs e)
 {
     if (e.ObjectBeingDeserialized != null)
     {
         MiniLogger.log(MethodBase.GetCurrentMethod(), e.ObjectBeingDeserialized.GetType().Name + " has child: " + e.Element.Name);
     }
     else
     {
         MiniLogger.log(MethodBase.GetCurrentMethod(), "node " + e.Element.Name + " expecting " + e.ExpectedElements);
     }
 }
        private static void OnUnknownElement(object sender, XmlElementEventArgs e)
        {
            if (!_customActionsInitialized)
            {
                InitializeCustomActions();
                _customActionsInitialized = true;
            }

            var element = e.Element;

            if (!_customActions.ContainsKey(element.Name))
            {
                _logger.Warn($"Unknown element in Settings: {element.Name}");
                return;
            }

            var actionInfo = _customActions[element.Name];
            var instance   = Activator.CreateInstance(actionInfo.Type);
            var type       = instance.GetType();

            foreach (XmlAttribute attribute in element.Attributes)
            {
                if (!actionInfo.Properties.ContainsKey(attribute.Name))
                {
                    _logger.Warn($"{element.Name} does not contain {attribute.Name}. Check docs!");
                    return;
                }

                var propertyInfo = actionInfo.Properties[attribute.Name];

                var value = default(object);
                if (propertyInfo.PropertyType.IsEnum)
                {
                    value = Enum.Parse(propertyInfo.PropertyType, attribute.Value);
                }
                else
                {
                    value = Convert.ChangeType(attribute.Value, propertyInfo.PropertyType);
                }

                propertyInfo.SetValue(instance, value);
            }

            var parent = (ActionBase)e.ObjectBeingDeserialized;

            if (parent == null)
            {
                _logger.Error("Invalid parent!");
                return;
            }

            parent.Actions.Add((IExecutableAction)instance);
            _logger.Debug($"Succcessfully processed {element.Name}");
        }
Beispiel #30
0
 private void SerializerUnknownElement(object sender, XmlElementEventArgs e)
 {
     STrace.Error(GetType().FullName, String.Format(
                      "UnknownElement, Name={0} InnerXml={1} LineNumber={2} LinePosition={3} ObjectBeingDeserialized={4} sender={5}",
                      e.Element.Name,
                      e.Element.InnerXml,
                      e.LineNumber,
                      e.LinePosition,
                      e.ObjectBeingDeserialized,
                      sender));
 }
Beispiel #31
0
 private void serializer_UnknownElement(object sender, XmlElementEventArgs e)
 {
     if (_receiveNotification != null)
     {
         _receiveNotification(string.Format("Ignored unknown element {0}", e.Element.Name));
     }
     else
     {
         _msg.DebugFormat("Ignored unknown element in config file {0}: {1}",
                          _deserializingXmlFile, e.Element.Name);
     }
 }
Beispiel #32
0
    private void Serializer_UnknownElement(object sender, XmlElementEventArgs e)
    {
        Console.WriteLine("Unknown Element");
        Console.WriteLine("\t" + e.Element.Name + " " + e.Element.InnerXml);
        Console.WriteLine("\t LineNumber: " + e.LineNumber);
        Console.WriteLine("\t LinePosition: " + e.LinePosition);

        Group x = (Group)e.ObjectBeingDeserialized;

        Console.WriteLine(x.GroupName);
        Console.WriteLine(sender.ToString());
    }
Beispiel #33
0
        private void serializer_UnknownElement(object sender, XmlElementEventArgs e)
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Unknown Element");
            sb.Append("\t" + e.Element.Name + " " + e.Element.InnerXml);
            sb.Append("\t LineNumber: " + e.LineNumber);
            sb.Append("\t LinePosition: " + e.LinePosition);
            errors.Add(sb.ToString());

            /*
             * T x  = (T) e.ObjectBeingDeserialized;
             */
        }
        internal static void OnUnknownElement(object sender, XmlElementEventArgs e)
        {
            if (!ValidateSettings(Asmx, TraceEventType.Warning))
            {
                return;
            }
            if (e.Element == null)
            {
                return;
            }
            string xml    = RuntimeUtils.ElementString(e.Element);
            string format = e.ExpectedElements == null ? Res.WebUnknownElement : e.ExpectedElements.Length == 0 ? Res.WebUnknownElement1 : Res.WebUnknownElement2;

            TraceEvent(TraceEventType.Warning, Res.GetString(format, xml, e.ExpectedElements));
        }
        void OnUnknownElement(object sender, XmlElementEventArgs e)
        {
            if (Thread.CurrentThread.GetHashCode() != this.currentThread)
            {
                return;
            }
            if (e.Element == null)
            {
                return;
            }
            SoapUnknownHeader header = new SoapUnknownHeader();

            header.Element = e.Element;
            unknownHeaders.Add(header);
        }
Beispiel #36
0
    public static void XmlSerializer_LoadLabAssistants(object sender, XmlElementEventArgs e)
    {
        var obj     = e.ObjectBeingDeserialized;
        var element = e.Element;

        if (obj is NPCs)
        {
            var          npcs = (NPCs)obj;
            string       name;
            LabAssistant assistant;
            if (LabAssistant.TryDeserializeFromXml(element, out name, out assistant))
            {
                npcs.LabAssistants[name] = assistant;
            }
        }
    }
Beispiel #37
0
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     // type
     ControlType type = ControlType.undefined;
     ReadAttributeValue(e, "type", ref type);
     if (type != m_type)
     {
         throw new Exception(string.Format("Unexpected type: {0}", type));
     }
     // other
     ReadAttributeValue(e, "position", ref m_position);
     ReadAttributeValue(e, "enabled", ref m_enabled);
     ReadAttributeValue(e, "display_install", ref m_display_install);
     ReadAttributeValue(e, "display_uninstall", ref m_display_uninstall);
     ReadAttributeValue(e, "check", ref m_check);
     ReadAttributeValue(e, "has_value_disabled", ref m_has_value_disabled);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "sourcefilepath", ref m_sourcefilepath);
     ReadAttributeValue(e, "targetfilepath", ref m_targetfilepath);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     // backwards compatible description < 1.8
     ReadAttributeValue(e, "description", ref m_display_name);
     ReadAttributeValue(e, "display_name", ref m_display_name);
     ReadAttributeValue(e, "uninstall_display_name", ref m_uninstall_display_name);
     ReadAttributeValue(e, "id", ref m_id);
     if (string.IsNullOrEmpty(m_id)) m_id = m_display_name;
     ReadAttributeValue(e, "installcompletemessage", ref m_installcompletemessage);
     ReadAttributeValue(e, "uninstallcompletemessage", ref m_uninstallcompletemessage);
     ReadAttributeValue(e, "mustreboot", ref m_mustreboot);
     ReadAttributeValue(e, "reboot_required", ref m_reboot_required);
     ReadAttributeValue(e, "must_reboot_required", ref m_must_reboot_required);
     ReadAttributeValue(e, "failed_exec_command_continue", ref m_failed_exec_command_continue);
     ReadAttributeValue(e, "allow_continue_on_error", ref m_allow_continue_on_error);
     ReadAttributeValue(e, "default_continue_on_error", ref m_default_continue_on_error);
     // required -> required_install and required_uninstall
     if (!ReadAttributeValue(e, "required_install", ref m_required_install))
         ReadAttributeValue(e, "required", ref m_required_install);
     if (!ReadAttributeValue(e, "required_uninstall", ref m_required_uninstall))
         m_required_uninstall = m_required_install;
     // selected -> selected_install & selected_uninstall
     if (!ReadAttributeValue(e, "selected_install", ref m_selected_install))
         ReadAttributeValue(e, "selected", ref m_selected_install);
     if (!ReadAttributeValue(e, "selected_uninstall", ref m_selected_uninstall))
         m_selected_uninstall = m_selected_install;
     // filters
     ReadAttributeValue(e, "os_filter", ref m_os_filter);
     ReadAttributeValue(e, "os_filter_lcid", ref m_os_filter_lcid);
     string os_filter_greater = string.Empty;
     if (ReadAttributeValue(e, "os_filter_greater", ref os_filter_greater) && !String.IsNullOrEmpty(os_filter_greater))
         m_os_filter_min = (OperatingSystem)(int.Parse(os_filter_greater) + 1);
     string os_filter_smaller = string.Empty;
     if (ReadAttributeValue(e, "os_filter_smaller", ref os_filter_smaller) && !String.IsNullOrEmpty(os_filter_smaller))
         m_os_filter_max = (OperatingSystem)(int.Parse(os_filter_smaller) - 1);
     ReadAttributeValue(e, "os_filter_min", ref m_os_filter_min);
     ReadAttributeValue(e, "os_filter_max", ref m_os_filter_max);
     ReadAttributeValue(e, "note", ref m_note);
     ReadAttributeValue(e, "processor_architecture_filter", ref m_processor_architecture_filter);
     ReadAttributeValue(e, "status_installed", ref m_status_installed);
     ReadAttributeValue(e, "status_notinstalled", ref m_status_notinstalled);
     ReadAttributeValue(e, "supports_install", ref m_supports_install);
     ReadAttributeValue(e, "supports_uninstall", ref m_supports_uninstall);
     // dialog options
     ReadAttributeValue(e, "show_progress_dialog", ref m_show_progress_dialog);
     ReadAttributeValue(e, "show_cab_dialog", ref m_show_cab_dialog);
     ReadAttributeValue(e, "hide_component_if_installed", ref m_hide_component_if_installed);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "type", ref m_type);
     ReadAttributeValue(e, "description", ref m_description);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "cancel_caption", ref m_cancel_caption);
     ReadAttributeValue(e, "dialog_bitmap", ref m_dialog_bitmap);
     ReadAttributeValue(e, "dialog_caption", ref m_dialog_caption);
     ReadAttributeValue(e, "dialog_message", ref m_dialog_message);
     ReadAttributeValue(e, "dialog_message_uninstall", ref m_dialog_message_uninstall);
     ReadAttributeValue(e, "failed_exec_command_continue", ref m_failed_exec_command_continue);
     ReadAttributeValue(e, "skip_caption", ref m_skip_caption);
     ReadAttributeValue(e, "install_caption", ref m_install_caption);
     ReadAttributeValue(e, "uninstall_caption", ref m_uninstall_caption);
     ReadAttributeValue(e, "installation_completed", ref m_installation_completed);
     if (! ReadAttributeValue(e, "uninstallation_completed", ref m_uninstallation_completed))
         m_uninstallation_completed = m_installation_completed;
     ReadAttributeValue(e, "installation_none", ref m_installation_none);
     ReadAttributeValue(e, "uninstallation_none", ref m_uninstallation_none);
     ReadAttributeValue(e, "installing_component_wait", ref m_installing_component_wait);
     if (! ReadAttributeValue(e, "uninstalling_component_wait", ref m_uninstalling_component_wait))
         m_uninstalling_component_wait = m_installing_component_wait;
     ReadAttributeValue(e, "reboot_required", ref m_reboot_required);
     ReadAttributeValue(e, "must_reboot_required", ref m_must_reboot_required);
     ReadAttributeValue(e, "status_installed", ref m_status_installed);
     ReadAttributeValue(e, "status_notinstalled", ref m_status_notinstalled);
     ReadAttributeValue(e, "dialog_otherinfo_caption", ref m_dialog_otherinfo_caption);
     ReadAttributeValue(e, "dialog_otherinfo_link", ref m_dialog_otherinfo_link);
     ReadAttributeValue(e, "complete_command", ref m_complete_command);
     ReadAttributeValue(e, "complete_command_silent", ref m_complete_command_silent);
     ReadAttributeValue(e, "complete_command_basic", ref m_complete_command_basic);
     ReadAttributeValue(e, "wait_for_complete_command", ref m_wait_for_complete_command);
     ReadAttributeValue(e, "auto_close_if_installed", ref m_auto_close_if_installed);
     ReadAttributeValue(e, "auto_close_on_error", ref m_auto_close_on_error);
     ReadAttributeValue(e, "reload_on_error", ref m_reload_on_error);
     ReadAttributeValue(e, "dialog_show_installed", ref m_dialog_show_installed);
     ReadAttributeValue(e, "dialog_show_uninstalled", ref m_dialog_show_uninstalled);
     ReadAttributeValue(e, "dialog_show_required", ref m_dialog_show_required);
     // message and caption to show during CAB extraction
     ReadAttributeValue(e, "cab_dialog_message", ref m_cab_dialog_message);
     ReadAttributeValue(e, "cab_cancelled_message", ref m_cab_cancelled_message);
     ReadAttributeValue(e, "cab_dialog_caption", ref m_cab_dialog_caption);
     // CAB path
     ReadAttributeValue(e, "cab_path", ref m_cab_path);
     ReadAttributeValue(e, "cab_path_autodelete", ref m_cab_path_autodelete);
     // dialog, message and button positions
     ReadAttributeValue(e, "dialog_default_button", ref m_dialog_default_button);
     ReadAttributeValue(e, "dialog_position", ref m_dialog_position);
     ReadAttributeValue(e, "dialog_components_list_position", ref m_dialog_components_list_position);
     ReadAttributeValue(e, "dialog_message_position", ref m_dialog_message_position);
     ReadAttributeValue(e, "dialog_bitmap_position", ref m_dialog_bitmap_position);
     ReadAttributeValue(e, "dialog_otherinfo_link_position", ref m_dialog_otherinfo_link_position);
     ReadAttributeValue(e, "dialog_osinfo_position", ref m_dialog_osinfo_position);
     ReadAttributeValue(e, "dialog_install_button_position", ref m_dialog_install_button_position);
     ReadAttributeValue(e, "dialog_cancel_button_position", ref m_dialog_cancel_button_position);
     ReadAttributeValue(e, "dialog_skip_button_position", ref m_dialog_skip_button_position);
     // auto start
     ReadAttributeValue(e, "auto_start", ref m_auto_start);
     // auto start on reboot
     ReadAttributeValue(e, "auto_continue_on_reboot", ref m_auto_continue_on_reboot);
     // additional reboot command
     ReadAttributeValue(e, "reboot_cmd", ref m_reboot_cmd);
     // dialog options
     ReadAttributeValue(e, "show_progress_dialog", ref m_show_progress_dialog);
     ReadAttributeValue(e, "show_cab_dialog", ref m_show_cab_dialog);
     ReadAttributeValue(e, "disable_wow64_fs_redirection", ref m_disable_wow64_fs_redirection);
     // administrator required
     ReadAttributeValue(e, "administrator_required", ref m_administrator_required);
     if (!ReadAttributeValue(e, "administrator_required_message", ref m_administrator_required_message))
     {
         // When upgrading set default message
         Template.Template_setupconfiguration tpl = Template.CurrentTemplate.setupConfiguration(m_application_name);
         m_administrator_required_message = tpl.administrator_required_message;
     }
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "path", ref m_path);
     ReadAttributeValue(e, "fieldname", ref m_fieldname);
     ReadAttributeValue(e, "fieldvalue", ref m_fieldvalue);
     ReadAttributeValue(e, "defaultvalue", ref m_defaultvalue);
     ReadAttributeValue(e, "fieldtype", ref m_fieldtype);
     ReadAttributeValue(e, "comparison", ref m_comparison);
     ReadAttributeValue(e, "rootkey", ref m_rootkey);
     ReadAttributeValue(e, "wowoption", ref m_wowoption);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "executable", ref m_executable);
     ReadAttributeValue(e, "executable_silent", ref m_executable_silent);
     ReadAttributeValue(e, "executable_basic", ref m_executable_basic);
     ReadAttributeValue(e, "install_directory", ref m_install_directory);
     ReadAttributeValue(e, "responsefile_source", ref m_responsefile_source);
     ReadAttributeValue(e, "responsefile_target", ref m_responsefile_target);
     ReadAttributeValue(e, "responsefile_format", ref m_responsefile_format);
     ReadAttributeValue(e, "uninstall_executable", ref m_uninstall_executable);
     ReadAttributeValue(e, "uninstall_executable_silent", ref m_uninstall_executable_silent);
     ReadAttributeValue(e, "uninstall_executable_basic", ref m_uninstall_executable_basic);
     ReadAttributeValue(e, "uninstall_responsefile_source", ref m_uninstall_responsefile_source);
     ReadAttributeValue(e, "uninstall_responsefile_target", ref m_uninstall_responsefile_target);
     ReadAttributeValue(e, "returncodes_success", ref m_returncodes_success);
     ReadAttributeValue(e, "returncodes_reboot", ref m_returncodes_reboot);
     ReadAttributeValue(e, "exeparameters", ref m_exeparameters);
     ReadAttributeValue(e, "exeparameters_basic", ref m_exeparameters_basic);
     ReadAttributeValue(e, "exeparameters_silent", ref m_exeparameters_silent);
     ReadAttributeValue(e, "uninstall_exeparameters", ref m_uninstall_exeparameters);
     ReadAttributeValue(e, "uninstall_exeparameters_basic", ref m_uninstall_exeparameters_basic);
     ReadAttributeValue(e, "uninstall_exeparameters_silent", ref m_uninstall_exeparameters_silent);
     ReadAttributeValue(e, "disable_wow64_fs_redirection", ref m_disable_wow64_fs_redirection);
     ReadAttributeValue(e, "execution_method", ref m_execution_method);
     base.OnXmlReadTag(e);
 }
Beispiel #44
0
        private void OnXmlReadTagLegacy(XmlElementEventArgs e)
        {
            // [legacy] auto-enable logging (convert from 1.6 and older)
            XmlNodeList configurations = e.XmlElement.SelectNodes("//configuration[@type='install']");
            foreach (XmlNode configuration in configurations)
            {
                XmlElementEventArgs configurationArgs = new XmlElementEventArgs((XmlElement)configuration);

                string log_file = string.Empty;
                if (ReadAttributeValue(configurationArgs, "log_file", ref log_file))
                    m_log_file = log_file;

                bool log_enabled = false;
                if (ReadAttributeValue(configurationArgs, "log_enabled", ref log_enabled))
                    m_log_enabled = log_enabled;

                break;
            }
        }
Beispiel #45
0
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     // lcid type
     ReadAttributeValue(e, "lcid_type", ref m_lcidtype);
     ReadAttributeValue(e, "show_language_selector", ref m_show_language_selector);
     ReadAttributeValue(e, "language_selector_title", ref m_language_selector_title);
     ReadAttributeValue(e, "language_selector_ok", ref m_language_selector_ok);
     ReadAttributeValue(e, "language_selector_cancel", ref m_language_selector_cancel);
     // processor and os filter architecture messages
     ReadAttributeValue(e, "configuration_no_match_message", ref m_configuration_no_match_message);
     // logging
     ReadAttributeValue(e, "log_enabled", ref m_log_enabled);
     ReadAttributeValue(e, "log_file", ref m_log_file);
     // legacy
     OnXmlReadTagLegacy(e);
     // ui level
     ReadAttributeValue<InstallUILevel>(e, "ui_level", ref m_ui_level);
     // backwards compatibility: silent_install
     bool silentInstall = false;
     if (ReadAttributeValue(e, "silent_install", ref silentInstall) && silentInstall)
     {
         m_ui_level = InstallUILevel.silent;
     }
     // version information
     ReadAttributeValue(e, "fileversion", ref m_fileversion);
     ReadAttributeValue(e, "productversion", ref m_productversion);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     if (ReadAttributeValue(e, "lcid", ref m_lcid_filter) || ReadAttributeValue(e, "lcid_filter", ref m_lcid_filter))
         OnLCIDChanged();
     ReadAttributeValue(e, "language", ref m_language);
     ReadAttributeValue(e, "language_id", ref m_language_id);
     ReadAttributeValue(e, "os_filter", ref m_os_filter);
     string os_filter_greater = string.Empty;
     if (ReadAttributeValue(e, "os_filter_greater", ref os_filter_greater) && !String.IsNullOrEmpty(os_filter_greater))
         m_os_filter_min = (OperatingSystem)(int.Parse(os_filter_greater) + 1);
     string os_filter_smaller = string.Empty;
     if (ReadAttributeValue(e, "os_filter_smaller", ref os_filter_smaller) && !String.IsNullOrEmpty(os_filter_smaller))
         m_os_filter_max = (OperatingSystem)(int.Parse(os_filter_smaller) - 1);
     ReadAttributeValue(e, "os_filter_min", ref m_os_filter_min);
     ReadAttributeValue(e, "os_filter_max", ref m_os_filter_max);
     ReadAttributeValue(e, "processor_architecture_filter", ref m_processor_architecture_filter);
     ReadAttributeValue(e, "supports_install", ref m_supports_install);
     ReadAttributeValue(e, "supports_uninstall", ref m_supports_uninstall);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "uri", ref m_uri);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "file", ref m_file);
     ReadAttributeValue(e, "disable_wow64_fs_redirection", ref m_disable_wow64_fs_redirection);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "name", ref m_name);
     ReadAttributeValue(e, "value", ref m_value);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "id", ref m_id);
     ReadAttributeValue(e, "hide_readonly", ref m_hide_readonly);
     ReadAttributeValue(e, "must_exist", ref m_must_exist);
     ReadAttributeValue(e, "folders_only", ref m_folders_only);
     ReadAttributeValue(e, "button_text", ref m_button_text);
     ReadAttributeValue(e, "filter", ref m_filter);
     ReadAttributeValue(e, "allow_edit", ref m_allow_edit);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "id", ref m_id);
     ReadAttributeValue(e, "id_type", ref m_id_type);
     ReadAttributeValue(e, "propertyname", ref m_propertyname);
     ReadAttributeValue(e, "propertyvalue", ref m_propertyvalue);
     ReadAttributeValue(e, "comparison", ref m_comparison);
     ReadAttributeValue(e, "defaultvalue", ref m_defaultvalue);
     base.OnXmlReadTag(e);
 }
Beispiel #53
0
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "version", ref m_loaded_version);
     ReadAttributeValue(e, "generator", ref m_generator);
 }
Beispiel #54
0
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "componentname", ref m_componentname);
     ReadAttributeValue(e, "destinationfilename", ref m_destinationfilename);
     ReadAttributeValue(e, "destinationpath", ref m_destinationpath);
     ReadAttributeValue(e, "sourceurl", ref m_sourceurl);
     ReadAttributeValue(e, "sourcepath", ref m_sourcepath);
     ReadAttributeValue(e, "alwaysdownload", ref m_alwaysdownload);
     ReadAttributeValue(e, "clear_cache", ref m_clear_cache);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "autostartdownload", ref m_autostartdownload);
     ReadAttributeValue(e, "buttoncancel_caption", ref m_buttoncancel_caption);
     ReadAttributeValue(e, "buttonstart_caption", ref m_buttonstart_caption);
     ReadAttributeValue(e, "dialog_caption", ref m_dialog_caption);
     ReadAttributeValue(e, "dialog_message", ref m_dialog_message);
     ReadAttributeValue(e, "dialog_message_downloading", ref m_dialog_message_downloading);
     ReadAttributeValue(e, "dialog_message_copying", ref m_dialog_message_copying);
     ReadAttributeValue(e, "dialog_message_connecting", ref m_dialog_message_connecting);
     ReadAttributeValue(e, "dialog_message_sendingrequest", ref m_dialog_message_sendingrequest);
     base.OnXmlReadTag(e);
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     if (ReadAttributeValue(e, "description", ref m_description)) OnDescriptionChanged();
 }
 protected override void OnXmlReadTag(XmlElementEventArgs e)
 {
     ReadAttributeValue(e, "command", ref m_command);
     ReadAttributeValue(e, "command_silent", ref m_command_silent);
     ReadAttributeValue(e, "command_basic", ref m_command_basic);
     ReadAttributeValue(e, "uninstall_command", ref m_uninstall_command);
     ReadAttributeValue(e, "uninstall_command_silent", ref m_uninstall_command_silent);
     ReadAttributeValue(e, "uninstall_command_basic", ref m_uninstall_command_basic);
     ReadAttributeValue(e, "working_directory", ref m_working_directory);
     ReadAttributeValue(e, "returncodes_success", ref m_returncodes_success);
     ReadAttributeValue(e, "returncodes_reboot", ref m_returncodes_reboot);
     ReadAttributeValue(e, "hide_window", ref m_hide_window);
     ReadAttributeValue(e, "disable_wow64_fs_redirection", ref m_disable_wow64_fs_redirection);
     ReadAttributeValue(e, "execution_method", ref m_execution_method);
     base.OnXmlReadTag(e);
 }