Esempio n. 1
0
        private void ApplySettingsToForm(Logger logOptChosen)
        {
            if (logOptChosen.IsEnabled())
            {
                chkEnableLog.Checked = true;
            }

            txtLogFileName.Text = logOptChosen.GetFileName();
            txtLogName.Text     = logOptChosen.GetName();

            lstOptions.DataSource = logOptChosen.getOptions();

            List <Logger.LoggingOption> options = logOptChosen.getOptions();

            System.Collections.IEnumerator myEnumerator = options.GetEnumerator();

            while (myEnumerator.MoveNext())
            {
                Logger.LoggingOption option = (Logger.LoggingOption)(myEnumerator.Current);

                int idx  = lstOptions.Items.IndexOf(option);
                int idx2 = options.IndexOf(option);
                lstOptions.SetSelected(idx, options[idx2].enabled);
            }
        }
Esempio n. 2
0
        private void ApplySettingsToForm(Logger logOptChosen)
        {
            if (logOptChosen.IsEnabled())
            {
                chkEnableLog.Checked = true;
            }
            
            txtLogFileName.Text = logOptChosen.GetFileName();
            txtLogName.Text = logOptChosen.GetName();

            lstOptions.DataSource = logOptChosen.getOptions();

            List<Logger.LoggingOption> options = logOptChosen.getOptions();
            System.Collections.IEnumerator myEnumerator = options.GetEnumerator();

            while (myEnumerator.MoveNext())
            {
                Logger.LoggingOption option = (Logger.LoggingOption)(myEnumerator.Current);

                int idx = lstOptions.Items.IndexOf(option);
                int idx2 = options.IndexOf(option);
                lstOptions.SetSelected(idx, options[idx2].enabled);
            }

        }