Exemple #1
0
 public FormAgentConfig()
 {
     InitializeComponent();
     tips = new ToolTip();
     tips.ShowAlways = true;
     config = loadCurrentConfig();
     this.FormClosed += new FormClosedEventHandler(FormAgentConfig_FormClosed);
     //    tips.SetToolTip(textBoxDCS, "This is the URL of the FGSMS Data Collector Service");
     //    tips.SetToolTip(textBoxPCS, "This is the URL of the FGSMS Policy Configuration Service");
     /*  tips.SetToolTip(textBoxPWT, @"Is the amount of time in milliseconds that the agent message" + Environment.NewLine +
                                       "processor will wait before sending data to the collector." + Environment.NewLine +
                                       "Use this to tweak performance.");
       tips.SetToolTip(radioButtonMutualCert, "Use this for when FGSMS Agents need to authenticate to a DCS or PCS");
       //tips.SetToolTip(radioButtonTransportOnly, "Use for this when FGSMS Agents do NOT need to authenticate to a DCS or PCS");
       tips.SetToolTip(buttonDCSTest, "This will open a browser to this URL");
       tips.SetToolTip(buttonPCStest, "This will open a browser to this URL");
       tips.SetToolTip(textBoxDNSEndpointDCS, "The DNS Endpoint identity is used to resolve uses within the WCF Framework" + Environment.NewLine +
           "Typically, this should be the Subject name of this service's certificate." + Environment.NewLine + Environment.NewLine +
           "Example: Service Certification Issued to: CN=WCFQuickStartServer" + Environment.NewLine +
           "DNS Endpoint Identity: WCFQuickStartServer");
       tips.SetToolTip(textBoxDNSEndpointPCS, "The DNS Endpoint identity is used to resolve uses within the WCF Framework" + Environment.NewLine +
           "Typically, this should be the Subject name of this service's certificate." + Environment.NewLine + Environment.NewLine +
           "Example: Service Certification Issued to: CN=WCFQuickStartServer" + Environment.NewLine +
           "DNS Endpoint Identity: WCFQuickStartServer");
       tips.SetToolTip(label7, "The DNS Endpoint identity is used to resolve uses within the WCF Framework" + Environment.NewLine +
           "Typically, this should be the Subject name of this service's certificate." + Environment.NewLine + Environment.NewLine +
           "Example: Service Certification Issued to: CN=WCFQuickStartServer" + Environment.NewLine +
           "DNS Endpoint Identity: WCFQuickStartServer");
       tips.SetToolTip(label8, "The DNS Endpoint identity is used to resolve uses within the WCF Framework" + Environment.NewLine +
           "Typically, this should be the Subject name of this service's certificate." + Environment.NewLine + Environment.NewLine +
           "Example: Service Certification Issued to: CN=WCFQuickStartServer" + Environment.NewLine +
           "DNS Endpoint Identity: WCFQuickStartServer");*/
 }
Exemple #2
0
 public FormAgentConfig()
 {
     InitializeComponent();
     tips             = new ToolTip();
     tips.ShowAlways  = true;
     config           = loadCurrentConfig();
     this.FormClosed += new FormClosedEventHandler(FormAgentConfig_FormClosed);
 }
Exemple #3
0
        private CompleteConfig loadCurrentConfig()
        {
            try
            {
                CompleteConfig ret = new CompleteConfig();
                XmlDocument    doc = new XmlDocument();
                doc.LoadXml(File.ReadAllText("current.config"));
                XmlNodeList list = doc.GetElementsByTagName("appSettings");
                XmlNode     servicemodelsection = null;
                if (list.Count == 1)
                {
                    servicemodelsection = list[0];
                }

                IEnumerator it = servicemodelsection.ChildNodes.GetEnumerator();
                while (it.MoveNext())
                {
                    XmlNode temp = (XmlNode)it.Current;
                    if (temp.Name.Equals("add", StringComparison.CurrentCultureIgnoreCase))
                    {
                        container    c = new container();
                        XmlAttribute a = temp.Attributes["key"];
                        XmlAttribute v = temp.Attributes["value"];
                        if (a != null && v != null)
                        {
                            c.key   = a.Value;
                            c.value = v.Value;
                            ret.items.Add(c);
                        }
                    }
                }
                return(ret);
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error loading config! check for current.config file " + ex.Message);
            }
            return(null);
        }
Exemple #4
0
        private CompleteConfig loadCurrentConfig()
        {
            CompleteConfig ret = new CompleteConfig();
            XmlDocument doc = new XmlDocument();
            doc.LoadXml(File.ReadAllText( workingDirectory + "current.config"));
            XmlNodeList list = doc.GetElementsByTagName("appSettings");
            XmlNode servicemodelsection = null;
            if (list.Count == 1)
                servicemodelsection = list[0];

            IEnumerator it = servicemodelsection.ChildNodes.GetEnumerator();
            while (it.MoveNext())
            {
                XmlNode temp = (XmlNode)it.Current;
                if (temp.Name.Equals("add", StringComparison.CurrentCultureIgnoreCase))
                {

                    container c = new container();
                    XmlAttribute a = temp.Attributes["key"];
                    XmlAttribute v = temp.Attributes["value"];
                    if (a != null && v != null)
                    {
                        c.key = a.Value;
                        c.value = v.Value;
                        ret.items.Add(c);
                    }
                }
            }
            return ret;
        }