예제 #1
0
        //----------------------------------------------------------------------------
        private void InitFromConfig(CTimosWebConfig config)
        {
            if (config == null)
            {
                return;
            }

            string strURL = config.URL;

            m_txtURL.Text = strURL;
            if (strURL != "")
            {
                try
                {
                    InitClientSoap(strURL);
                    m_actionEnCours = config.Action;
                    m_cmbSelectAction.SelectedValue = config.Action;
                    FillListeVariables(m_actionEnCours);
                }
                catch (Exception ex)
                {
                    m_txtOutput.Text += ex.Message + Environment.NewLine;
                }
            }
        }
예제 #2
0
        //----------------------------------------------------------------------------
        private void m_btnOpenConfig_Click(object sender, EventArgs e)
        {
            OpenFileDialog dlg = new OpenFileDialog();

            dlg.Filter = "Timos Web Config (*.twconfig)|*.twconfig|All files(*.*)|*.*";
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (CFormAlerte.Afficher(
                        "Current Web Service configuration will be replaced. Continue ?",
                        EFormAlerteType.Question) == DialogResult.No)
                {
                    return;
                }
                CTimosWebConfig config = new CTimosWebConfig();
                CResultAErreur  result = config.ReadFromFile(dlg.FileName);
                if (!result)
                {
                    CFormAlerte.Afficher(result);
                }
                else
                {
                    m_configEnCours = config;
                    InitFromConfig(config);
                }
            }
        }