Beispiel #1
0
        /// <summary>
        /// Constructor for the Configurator object
        /// </summary>
        public Configurator(string configFile, bool showDialog)
        {
            if (!string.IsNullOrEmpty(configFile))
                configName = configFile;

            //make sure the JXTA_HOME directory is present.  Defensive programming
            //ot make sure we dont' go forward while our directories aren't setup.
            Directory.CreateDirectory(SXTA_HOME);

            Load();
            //if (source == null || IsReconf())
            if (showDialog)
            {
                try
                {
                    ConfigDialog dialog = new ConfigDialog(ref source);

                    dialog.UntilDone();
                }
                catch (Exception t)
                {
                    if (log.IsWarnEnabled)
                    {
                        log.Warn("Could not initialize graphical config dialog" + t.Message);

                        log.Warn("The window-based configurator does not seem to be usable.");
                        log.Warn("Try to edit the current configuration by hand");
                    }
                }
            }

            // Save that config.
            Save();
        }
Beispiel #2
0
        /// <summary>
        /// Constructor for the Configurator object
        /// </summary>
        public Configurator(string configFile, bool showDialog)
        {
            if (!string.IsNullOrEmpty(configFile))
            {
                configName = configFile;
            }

            //make sure the JXTA_HOME directory is present.  Defensive programming
            //ot make sure we dont' go forward while our directories aren't setup.
            Directory.CreateDirectory(SXTA_HOME);

            Load();
            //if (source == null || IsReconf())
            if (showDialog)
            {
                try
                {
                    ConfigDialog dialog = new ConfigDialog(ref source);

                    dialog.UntilDone();
                }
                catch (Exception t)
                {
                    if (log.IsWarnEnabled)
                    {
                        log.Warn("Could not initialize graphical config dialog" + t.Message);

                        log.Warn("The window-based configurator does not seem to be usable.");
                        log.Warn("Try to edit the current configuration by hand");
                    }
                }
            }

            // Save that config.
            Save();
        }