Ejemplo n.º 1
0
        private void Compile()
        {
            // No project so nothing to compile
            if (!m_projectService.Active)
            {
                SledOutDevice.OutLine(
                    SledMessageType.Info,
                    Localization.SledLuaCompilerErrorNoActiveProject);

                return;
            }

            // Find a Lua compiler configuration
            var configType = FindSelectedCompileConfiguration(m_luaCompileSettings.Configurations);

            if (configType == null)
            {
                // Show message indicating the user needs to select a compiler configuration
                MessageBox.Show(
                    m_mainForm,
                    Localization.SledLuaCompilerNotifySelectConfiguration,
                    Localization.SledLuaCompiler,
                    MessageBoxButtons.OK);

                // Show select/add-new configuration dialog
                using (var form = new SledLuaCompilerConfigurationsForm())
                {
                    form.AddConfigurations(m_luaCompileSettings.Configurations);
                    form.ShowDialog();

                    // Save any configuration additions/modifications/deletions
                    m_projectService.SaveSettings();
                }

                // Find the newly selected item (if any)
                configType = FindSelectedCompileConfiguration(m_luaCompileSettings.Configurations);

                if (configType == null)
                {
                    // Show message box saying can't compile due to no compile configuration being set
                    MessageBox.Show(
                        m_mainForm,
                        Localization.SledLuaCompilerNotifySelectConfigurationError,
                        Localization.SledLuaCompiler,
                        MessageBoxButtons.OK);

                    return;
                }
            }

            // Compile w/ selected configuration
            Compile(configType);
        }
Ejemplo n.º 2
0
        private void ShowSettings()
        {
            using (var form = new SledLuaCompilerConfigurationsForm())
            {
                if (m_luaCompileSettings != null)
                {
                    form.AddConfigurations(m_luaCompileSettings.Configurations);
                }

                form.ShowDialog(m_mainForm);

                // Save any configuration additions/modifications/deletions
                m_projectService.SaveSettings();
            }
        }
Ejemplo n.º 3
0
        private void ShowSettings()
        {
            using (var form = new SledLuaCompilerConfigurationsForm())
            {
                if (m_luaCompileSettings != null)
                    form.AddConfigurations(m_luaCompileSettings.Configurations);

                form.ShowDialog(m_mainForm);

                // Save any configuration additions/modifications/deletions
                m_projectService.SaveSettings();
            }
        }
Ejemplo n.º 4
0
        private void Compile()
        {
            // No project so nothing to compile
            if (!m_projectService.Active)
            {
                SledOutDevice.OutLine(
                    SledMessageType.Info,
                    Localization.SledLuaCompilerErrorNoActiveProject);

                return;
            }

            // Find a Lua compiler configuration
            var configType = FindSelectedCompileConfiguration(m_luaCompileSettings.Configurations);
            if (configType == null)
            {
                // Show message indicating the user needs to select a compiler configuration
                MessageBox.Show(
                    m_mainForm,
                    Localization.SledLuaCompilerNotifySelectConfiguration,
                    Localization.SledLuaCompiler,
                    MessageBoxButtons.OK);

                // Show select/add-new configuration dialog
                using (var form = new SledLuaCompilerConfigurationsForm())
                {
                    form.AddConfigurations(m_luaCompileSettings.Configurations);
                    form.ShowDialog();

                    // Save any configuration additions/modifications/deletions
                    m_projectService.SaveSettings();
                }

                // Find the newly selected item (if any)
                configType = FindSelectedCompileConfiguration(m_luaCompileSettings.Configurations);

                if (configType == null)
                {
                    // Show message box saying can't compile due to no compile configuration being set
                    MessageBox.Show(
                        m_mainForm,
                        Localization.SledLuaCompilerNotifySelectConfigurationError,
                        Localization.SledLuaCompiler,
                        MessageBoxButtons.OK);

                    return;
                }
            }

            // Compile w/ selected configuration
            Compile(configType);
        }