void worker_DoWorkExportAndProcess(object sender, DoWorkEventArgs e)
        {
            // export...
            MorphemeConnectExporter Exporter = new MorphemeConnectExporter();

            Exporter.ExportAll(sender);

            /// ...and process!
            MorphemeAssetProcessor Processor = new MorphemeAssetProcessor();

            Processor.ProcessAll(sender);

            // get the local logs from both and pass it as the Result
            List <LogItem> Log = new List <LogItem>(Exporter.Log);

            Log.AddRange(Processor.Log);

            e.Result = Log;
        }
Beispiel #2
0
        private void DataGridViewPlatformsValidate(int rowIndex)
        {
#if DEV_ENV_SUPPORT
            try
            {
                if (dataGridViewPlatforms.ColumnCount <= 1)
                {
                    return;
                }

                if (dataGridViewPlatforms[DataGridViewPlatformNames.AssetCompilerEXEPath, rowIndex].Value == null)
                {
                    return;
                }

                if (dataGridViewPlatforms[DataGridViewPlatformNames.AssetCompilerEXEPlatform, rowIndex].Value == null)
                {
                    return;
                }

                Array values = Enum.GetValues(typeof(MCN.AssetCompilerType));

                int columnIndex = DataGridViewPlatformNames.BuildButtonStartColumnIndex;
                foreach (MCN.AssetCompilerType val in values)
                {
                    Enum.GetName(typeof(MCN.AssetCompilerType), val);

                    string assetCompilerPath     = MacrosSystem.GetInstance().ExpandMacro(Settings.GetInstance().RuntimeSDKRoot);
                    string assetCompilerSubPath  = dataGridViewPlatforms[DataGridViewPlatformNames.AssetCompilerEXEPath, rowIndex].Value.ToString();
                    string assetCompilerType     = Enum.GetName(typeof(MCN.AssetCompilerType), val);
                    string assetCompilerPlatform = dataGridViewPlatforms[DataGridViewPlatformNames.AssetCompilerEXEPlatform, rowIndex].Value.ToString();

                    string assetCompilerExe = MorphemeAssetProcessor.ConstructAssetCompilerFile(assetCompilerPath,
                                                                                                assetCompilerSubPath,
                                                                                                assetCompilerType,
                                                                                                assetCompilerPlatform);

                    DataGridViewButtonCell button = dataGridViewPlatforms[columnIndex, rowIndex] as DataGridViewButtonCell;
                    button.Value = "build";

                    if (!File.Exists(assetCompilerExe))
                    {
                        Program.Logger.Log(LogSeverity.Info, "cannot find asset compiler: " + assetCompilerExe);

                        button.FlatStyle       = FlatStyle.Popup;
                        button.Style.BackColor = Logger.Color_Error;
                    }
                    else
                    {
                        button.FlatStyle       = FlatStyle.Popup;
                        button.Style.BackColor = Logger.Color_GoodNews;
                    }

                    columnIndex++;
                }
            }
            catch (System.Exception ex)
            {
                Program.Logger.Log(LogSeverity.Error, ex.ToString());
            }
#endif // #if DEV_ENV_SUPPORT
        }