private void logosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                frmConfig child = new frmConfig();

                var result = child.ShowDialog();

                if (result == System.Windows.Forms.DialogResult.OK || result == System.Windows.Forms.DialogResult.Cancel)
                {
                    // obtiene logo
                    Modelos.Logo logo = this._responsivasNegocio.obtieneLogo("fondo");

                    this.permisos();

                    this.ayudaToolStripMenuItem.Enabled = true;

                    if (logo != null)
                    {
                        this.BackgroundImage = Modelos.Utilerias.ByteToImage(logo.logo);
                    }
                    else
                    {
                        this.BackgroundImage = null;
                    }
                }
            }
            catch (Exception Ex)
            {
                MessageBox.Show(Ex.Message, "Activos", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
        }
Пример #2
0
 private void  务器配置ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     b = true;
     SqlFile.frmConfig frmConfig1 = new frmConfig();
     frmConfig1.sServer = "sqlConfig";
     frmConfig1.ShowDialog(this);
 }
Пример #3
0
        private void btnSetup_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmConfig frm = new frmConfig();

            frm.ShowDialog();
            this.Show();
        }
Пример #4
0
        private void button6_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmConfig frm = new frmConfig();

            frm.ShowDialog();
            Show();
        }
Пример #5
0
        private void BtnConfig_Click(object sender, EventArgs e)
        {
            this.Hide();

            frmConfig frm = new frmConfig();

            //frm.ProcessRegistry();
            frm.StartPosition = FormStartPosition.CenterScreen;

            frm.ShowDialog();

            this.Show();
        }
Пример #6
0
        private void menuConfig_Click(object sender, RoutedEventArgs e)
        {
            frmConfig config = new frmConfig();

            config.Config = PluginSystem.SoundSystemConfig.FromXML(App.GetConfigPath());
            Nullable <bool> ret = config.ShowDialog();

            if (ret == true)
            {
                cmdStop_Click(sender, e);

                PluginSystem.SoundSystemConfig.ToXML(config.Config, App.GetConfigPath());
                m_current.Plugin.Destroy();
                if (m_current.Plugin.Create(config.Config) == false)
                {
                    frmMessageBox.ShowDialog("Sound System kann nicht erstellt werden. Bitte versuchen Sie eine" +
                                             " andere Configuration.", "Ramona Audio Player");
                }
            }
        }
Пример #7
0
        private void cmsiConfig_Click(object sender, EventArgs e)
        {
            frmConfig frm = new frmConfig();

            frm.ShowDialog();
        }
Пример #8
0
        /// <summary>系统设置</summary>
        private void menuMain_System_Config_Click(object sender, EventArgs e)
        {
            frmConfig objfrmConfig = new frmConfig();

            objfrmConfig.ShowDialog();
        }
Пример #9
0
        private void btnDataBase_Click(object sender, EventArgs e)
        {
            frmConfig frmCfg = new frmConfig();

            frmCfg.ShowDialog(this);
        }
Пример #10
0
        public void Configure()
        {
            frmConfig frm = new frmConfig();

            frm.ShowDialog();
        }
Пример #11
0
 private void ConfigurationToolStripMenuItem_Click(object sender, EventArgs e)
 {
     using (var frm = new frmConfig()) frm.ShowDialog();
 }
Пример #12
0
        static void Main(string[] args)
        {
            PlanetGenerator gen = new PlanetGenerator();

            bool     nogui      = false;
            string   outputName = String.Empty;
            XElement presetRoot = null;

            foreach (string arg in args)
            {
                if (arg.ToLower().Equals("--help") || arg.ToLower().Equals("-h"))
                {
                    Console.WriteLine($"\nPlanetGenerator {FileVersionInfo.GetVersionInfo( Assembly.GetEntryAssembly().Location ).FileVersion} by Marc D.");
                    Console.WriteLine("This highly configurable tool will generate procedural planet surfaces. Please keep in mind that this is unfinished software.");
                    Console.WriteLine("\n" + Properties.Resources.HelpText.Replace("\\n", Environment.NewLine).Replace("\\t", "\t") + "\n");
                    Console.WriteLine("Parameters:");

                    foreach (var fieldInfo in gen.GetType().GetFields().Where(f => f.Attributes.HasFlag(FieldAttributes.Public) &&
                                                                              f.CustomAttributes.Any(a => a.AttributeType == typeof(ConfigAttribute))).OrderBy(n => n.Name))
                    {
                        string fieldName        = fieldInfo.Name;
                        string fieldDescription = fieldInfo.GetCustomAttribute <ConfigAttribute>().Description;
                        string fieldType        = "null";
                        if (fieldInfo.FieldType == typeof(Int32))
                        {
                            fieldType = "Int32";
                        }
                        else if (fieldInfo.FieldType == typeof(Boolean))
                        {
                            fieldType = "Boolean";
                        }
                        else if (fieldInfo.FieldType == typeof(Single))
                        {
                            fieldType = "Float";
                        }
                        else if (fieldInfo.FieldType == typeof(NoiseType))
                        {
                            fieldType = "EnumNoiseType";
                        }

                        Console.WriteLine($"{fieldName} ({fieldType}): {fieldDescription}");
                    }

                    Environment.Exit(1);
                }

                if (arg.ToLower().Equals("--generate") || arg.ToLower().Equals("-g"))
                {
                    nogui = true;
                    continue;
                }
                if (arg.ToLower().StartsWith("--output") || arg.ToLower().StartsWith("-o"))
                {
                    outputName = arg.Split(':')[1];
                    continue;
                }
                if (arg.ToLower().StartsWith("--preset") || arg.ToLower().StartsWith("-p"))
                {
                    presetRoot = XElement.Load(arg.Split(':')[1]);
                    continue;
                }

                var    split = arg.Split(':');
                string name  = split[0].TrimStart('-', '+');
                string value = split[1];

                Type t     = gen.GetType();
                var  field = t.GetField(name);
                if (field == null)
                {
                    continue;
                }
                if (field.FieldType == typeof(int))
                {
                    field.SetValue(gen, Int32.Parse(value));
                }
                else if (field.FieldType == typeof(float))
                {
                    field.SetValue(gen, Single.Parse(value));
                }
                else if (field.FieldType == typeof(bool))
                {
                    field.SetValue(gen, Boolean.Parse(value));
                }
                else if (field.FieldType == typeof(FastNoise.NoiseType))
                {
                    field.SetValue(gen, Enum.Parse(typeof(FastNoise.NoiseType), value));
                }
            }

            if (presetRoot != null)
            {
                gen.LoadSettings(presetRoot);
            }

            if (!nogui)
            {
                frmConfig cfg = new frmConfig(gen);
                cfg.ShowDialog();
            }
            else
            {
                if (String.IsNullOrEmpty(outputName) || String.IsNullOrWhiteSpace(outputName))
                {
                    gen.GeneratePlanet(Path.Combine(Environment.CurrentDirectory, "result"));
                }
                else
                {
                    gen.GeneratePlanet(Path.Combine(Environment.CurrentDirectory, outputName));
                }
            }
        }