예제 #1
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="manager">JobManager</param>
        public JobManagerSettingPage(IJobManager manager)
        {
            InitializeComponent();
            m_manager = manager;

            string name = m_manager.GetCurrentEnvironment();
            List<string> envList = m_manager.GetEnvironmentList();
            foreach (string envname in envList)
            {
                int index = envComboBox.Items.Add(envname);
                if (name.Equals(envname))
                {
                    envComboBox.SelectedIndex = index;
                    Dictionary<string, object> propDic =
                        m_manager.GetEnvironmentProperty();
                    int conc = m_manager.GetDefaultConcurrency();
                    concTextBox.Text = conc.ToString();
                    envDataGridView.Rows.Clear();
                    foreach (string propName in propDic.Keys)
                    {
                        int i = envDataGridView.Rows.Add(
                            new object[] { propName, propDic[propName].ToString() });
                        envDataGridView.Rows[i].Tag = propDic[propName].GetType();
                    }
                }
            }
            this.Name = MessageResources.NameJobManage;
        }