Exemplo n.º 1
0
        public void ToXml(XmlWriter writer)
        {
            writer.WriteStartDocument();
            writer.WriteStartElement(XmlNodeRoot);
            writer.WriteAttributeString(XmlNodeVersion,
                                        Assembly.GetExecutingAssembly().GetName().Version.ToString(2));
            {
                writer.WriteElementString(XmlNodeAutoStartServer,
                                          AutoStartServer.ToString());
                writer.WriteElementString(XmlNodeShowBalloonTips,
                                          ShowBalloonTips.ToString());
                writer.WriteElementString(XmlNodePort, Port.ToString());
                writer.WriteElementString(XmlNodeSsl, UseSSL.ToString());
                writer.WriteStartElement(XmlNodeAccounts);

                foreach (Account account in accounts.Values)
                {
                    account.ToXml(writer);
                }

                writer.WriteEndElement();
            }
            writer.WriteEndElement();
            writer.WriteEndDocument();
        }
Exemplo n.º 2
0
        public override string ToString()
        {
            StringBuilder sb = new StringBuilder();

            sb.Append("Server:").Append(Server.ToString()).Append("\n");
            sb.Append("Recipient:").Append(Recipient.ToString()).Append("\n");
            sb.Append("Subject:").Append(Subject.ToString()).Append("\n");
            sb.Append("UserName:"******"\n");
            sb.Append("Password:"******"\n");
            sb.Append("Port:").Append(Port.ToString()).Append("\n");
            sb.Append("UseSSL:").Append(UseSSL.ToString()).Append("\n");
            sb.Append("CompanyName:").Append(CompanyName.ToString()).Append("\n");
            sb.Append("TimeOut:").Append(TimeOut.ToString()).Append("\n");

            return(sb.ToString());
        }