public void MostrarProduccion(CoreProcess co)
        {
            EditorGUI.indentLevel++;

            EditorGUILayout.PropertyField(dbProperty);

            EditorGUI.indentLevel--;

            if (GUILayout.Button("Generar Chart"))
            {
                co.GenerarChart();
            }

            if (GUILayout.Button("Crear Foto"))
            {
                co.CrearFoto();
            }

            if (GUILayout.Button("Cargar Default"))
            {
                co.CargarDefault();
            }

            if (GUILayout.Button("Limpiar Template"))
            {
                co.Clear();
            }
        }
        static Thread GetCoreWatcherThread()
        {
            return(new Thread(() => {
                var StartInfo = new ProcessStartInfo {
                    UseShellExecute = false,
                    CreateNoWindow = true,
                    FileName = $"{CoreLocation.FullName}/bin/guitar_sniffer_core.bat",
                    Arguments = "foreground",

                    RedirectStandardOutput = true,
                    RedirectStandardError = true
                };

                CoreProcess = Process.Start(StartInfo);
                CoreProcess.OutputDataReceived += (object sender, DataReceivedEventArgs e) => {
                    // Trace.WriteLine(e.Data);
                    try {
                        MainWindow.Dispatcher.Invoke(() => MainWindow.AddToTextboxCore($"[stdout] {e.Data ?? string.Empty}"));
                    } catch (Exception ex) {
                        Debug.WriteLine(ex);
                    }
                };

                CoreProcess.ErrorDataReceived += (object sender, DataReceivedEventArgs e) => {
                    // Trace.WriteLine(e.Data);
                    try {
                        MainWindow.Dispatcher.Invoke(() => MainWindow.AddToTextboxCore($"[stderr] {e.Data ?? string.Empty}"));
                    } catch (Exception ex) {
                        Debug.WriteLine(ex);
                    }
                };
                CoreProcess.BeginOutputReadLine();
                CoreProcess.BeginErrorReadLine();
            }));
        }
 public void MostrarAyuda(CoreProcess co)
 {
     if (GUILayout.Button("Link Github"))
     {
         Application.OpenURL("https://github.com/CodeBackDoor/AnimeChart");
     }
 }
        public void OutputFile_MustHave_EightRows()
        {
            //Process data to check the output rows
            CoreProcess.Process();
            var result = FileService.GetOutputFileRows();

            Assert.IsTrue(result.Equals(8), "Result is wrong, output file must have 8 rows");
        }
        public override void OnInspectorGUI()
        {
            serializedObject.Update();

            CoreProcess core = (CoreProcess)target;

            tab = GUILayout.Toolbar(tab, new string[] { "Produccion", "Setup", "Ayuda" });
            switch (tab)
            {
            case 0:
                MostrarProduccion(core);
                break;

            case 1:
                MostrarSetup(core);
                break;

            case 2:
                MostrarAyuda(core);
                break;
            }

            serializedObject.ApplyModifiedProperties();
        }
Beispiel #6
0
 static void Main(string[] args)
 {
     CoreProcess.Process();
 }
        public void MostrarSetup(CoreProcess co)
        {
            EditorGUILayout.BeginVertical();

            EditorGUILayout.BeginHorizontal("box");
            EditorGUILayout.LabelField("Contenidos");
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();

            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(prefabTVProperty);
            EditorGUILayout.PropertyField(prefabOVAProperty);
            EditorGUILayout.PropertyField(prefabMOVIEProperty);
            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.BeginHorizontal("box");
            EditorGUILayout.LabelField("Linea 1");
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();

            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(txtTemporadaProperty);
            EditorGUILayout.PropertyField(txtAnoProperty);
            EditorGUILayout.PropertyField(txtNombreProperty);
            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.BeginHorizontal("box");
            EditorGUILayout.LabelField("Linea 2");
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();

            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(txtVersionProperty);
            EditorGUILayout.PropertyField(txtDateVersionProperty);
            EditorGUILayout.PropertyField(txtFirmaProperty);
            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.BeginHorizontal("box");
            EditorGUILayout.LabelField("Linea 3");
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();

            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(txtMesInicioProperty);
            EditorGUILayout.PropertyField(txtAnoInicioProperty);
            EditorGUILayout.PropertyField(txtMesFinalProperty);
            EditorGUILayout.PropertyField(txtAnoFinalProperty);
            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.BeginHorizontal("box");
            EditorGUILayout.LabelField("Linea 4");
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();

            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(txtSourceProperty);
            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.BeginHorizontal("box");
            EditorGUILayout.LabelField("Roots");
            EditorGUILayout.EndHorizontal();

            EditorGUILayout.Space();

            EditorGUI.indentLevel++;
            EditorGUILayout.PropertyField(rootTVProperty);
            EditorGUILayout.PropertyField(rootOVAProperty);
            EditorGUILayout.PropertyField(rootMOVIEProperty);
            EditorGUI.indentLevel--;

            EditorGUILayout.Space();

            EditorGUILayout.EndVertical();
        }