commit 32f6b7ddb122653c57559c66656e8fa8922d6601
parent 31dfee2b0b94a6b8bec7a13c4fd16f1e4bb7d8e3
Author: Minerva_juppiter <94231606+minerva-jupiter@users.noreply.github.com>
Date: Thu, 20 Jan 2022 21:37:58 +0900
プロジェクト ファイルを追加します。
Diffstat:
7 files changed, 351 insertions(+), 0 deletions(-)
diff --git a/Form1.Designer.cs b/Form1.Designer.cs
@@ -0,0 +1,122 @@
+namespace NEUTRINO_GUIs
+{
+ partial class Form1
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Windows Form Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.RUN = new System.Windows.Forms.Button();
+ this.musicFileSelect = new System.Windows.Forms.Button();
+ this.scorefile = new System.Windows.Forms.Label();
+ this.runFileSellect = new System.Windows.Forms.Button();
+ this.whereRunfile = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // RUN
+ //
+ this.RUN.BackColor = System.Drawing.SystemColors.Control;
+ this.RUN.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
+ this.RUN.Location = new System.Drawing.Point(354, 357);
+ this.RUN.Name = "RUN";
+ this.RUN.Size = new System.Drawing.Size(100, 30);
+ this.RUN.TabIndex = 0;
+ this.RUN.Text = "RUN";
+ this.RUN.UseVisualStyleBackColor = false;
+ this.RUN.Click += new System.EventHandler(this.RUN_Click);
+ //
+ // musicFileSelect
+ //
+ this.musicFileSelect.BackColor = System.Drawing.SystemColors.Control;
+ this.musicFileSelect.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
+ this.musicFileSelect.Location = new System.Drawing.Point(339, 145);
+ this.musicFileSelect.Name = "musicFileSelect";
+ this.musicFileSelect.Size = new System.Drawing.Size(130, 30);
+ this.musicFileSelect.TabIndex = 1;
+ this.musicFileSelect.Text = "楽譜ファイルを選択";
+ this.musicFileSelect.UseVisualStyleBackColor = false;
+ this.musicFileSelect.Click += new System.EventHandler(this.楽譜ファイル選択_Click);
+ //
+ // scorefile
+ //
+ this.scorefile.AutoSize = true;
+ this.scorefile.Font = new System.Drawing.Font("Consolas", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
+ this.scorefile.ForeColor = System.Drawing.SystemColors.Control;
+ this.scorefile.Location = new System.Drawing.Point(142, 128);
+ this.scorefile.Name = "scorefile";
+ this.scorefile.Size = new System.Drawing.Size(532, 14);
+ this.scorefile.TabIndex = 2;
+ this.scorefile.Text = "C:\\Program Files\\NEUTRINO\\NEUTRINO-Windows_v0.510\\NEUTRINO\\score\\musicxml¥1\r\n";
+ //
+ // runFileSellect
+ //
+ this.runFileSellect.BackColor = System.Drawing.SystemColors.Control;
+ this.runFileSellect.ForeColor = System.Drawing.SystemColors.ActiveCaptionText;
+ this.runFileSellect.Location = new System.Drawing.Point(339, 293);
+ this.runFileSellect.Name = "runFileSellect";
+ this.runFileSellect.Size = new System.Drawing.Size(130, 30);
+ this.runFileSellect.TabIndex = 3;
+ this.runFileSellect.Text = "Runファイルを選択";
+ this.runFileSellect.UseVisualStyleBackColor = false;
+ this.runFileSellect.Click += new System.EventHandler(this.runFileSellect_Click);
+ //
+ // whereRunfile
+ //
+ this.whereRunfile.AutoSize = true;
+ this.whereRunfile.ForeColor = System.Drawing.SystemColors.Control;
+ this.whereRunfile.Location = new System.Drawing.Point(233, 275);
+ this.whereRunfile.Name = "whereRunfile";
+ this.whereRunfile.Size = new System.Drawing.Size(359, 15);
+ this.whereRunfile.TabIndex = 4;
+ this.whereRunfile.Text = "C:\\Program Files\\NEUTRINO\\NEUTRINO-Widnows_v0.500¥Run.bat\r\n";
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+ this.BackColor = System.Drawing.SystemColors.ControlText;
+ this.ClientSize = new System.Drawing.Size(800, 450);
+ this.Controls.Add(this.whereRunfile);
+ this.Controls.Add(this.runFileSellect);
+ this.Controls.Add(this.scorefile);
+ this.Controls.Add(this.musicFileSelect);
+ this.Controls.Add(this.RUN);
+ this.Name = "Form1";
+ this.Text = "NEUTRINO_GUIs";
+ this.Load += new System.EventHandler(this.Form1_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ private Button RUN;
+ private Button musicFileSelect;
+ private Label scorefile;
+ private Button runFileSellect;
+ private Label whereRunfile;
+ }
+}+
\ No newline at end of file
diff --git a/Form1.cs b/Form1.cs
@@ -0,0 +1,101 @@
+using System.Diagnostics;
+
+namespace NEUTRINO_GUIs
+{
+ public partial class Form1 : Form
+ {
+ public void Command(string command)
+ {
+ //
+ ProcessStartInfo processStartInfo = new ProcessStartInfo(command);
+
+ //V^ułȂ悤ɐݒB
+ processStartInfo.CreateNoWindow = true;
+
+ //Wo͂擾B
+ processStartInfo.RedirectStandardOutput = true;
+
+ //s
+ Process process = Process.Start(processStartInfo);
+
+ //I҂ĕB
+ process.WaitForExit();
+ process.Close();
+
+ MessageBox.Show("Done");
+ }
+ public Form1()
+ {
+ InitializeComponent();
+ }
+
+ private void Form1_Load(object sender, EventArgs e)
+ {
+
+ }
+
+ private void RUN_Click(object sender, EventArgs e)
+ {
+ string fileNameR = whereRunfile.Text;
+ //et@CɈړ
+ Command(fileNameR);
+
+
+ }
+
+ private void yt@CI_Click(object sender, EventArgs e)
+ {
+ var openFileDialog = new OpenFileDialog();
+ openFileDialog.Filter = "musicxml (*.musicxml)|*.musicxml|All files (*.*)|*.*";
+ openFileDialog.FilterIndex = 1;
+ openFileDialog.Title = "yt@CI";
+ openFileDialog.RestoreDirectory = true;
+ openFileDialog.FileName = "sample1.musicxml";
+ if (openFileDialog.ShowDialog() == DialogResult.OK)
+ {
+ Console.WriteLine(openFileDialog.FileName);
+ }
+
+ //zɑ
+ string[] lines = File.ReadAllLines("../Run.bat");
+ //Runt@C
+ bool streamWriterOption = false;
+ string fileName = openFileDialog.FileName;
+ StreamWriter sw = new StreamWriter(fileName, streamWriterOption);
+ for (int a = 0; a < 5; a++)
+ {
+ sw.WriteLine(lines[a]);
+ }
+ //BASENAME̍s
+ sw.WriteLine("set BASENAME = " + openFileDialog);
+
+ //c̍s
+ for (int b = 6; b < lines.Length; b++)
+ {
+ sw.WriteLine(lines[b]);
+ }
+ sw.Close();
+
+ scorefile.Text = fileName;
+ MessageBox.Show("t@CI܂B");
+ }
+
+ private void runFileSellect_Click(object sender, EventArgs e)
+ {
+ var openFileDialog1 = new OpenFileDialog();
+ openFileDialog1.Filter = "ob`t@C(*.bat)|*.bat|All files (*.*)|*.*";
+ openFileDialog1.FilterIndex = 2;
+ openFileDialog1.Title = "Runt@CI";
+ openFileDialog1.RestoreDirectory = true;
+ openFileDialog1.FileName = "sample1.musicxml";
+ if (openFileDialog1.ShowDialog() == DialogResult.OK)
+ {
+ Console.WriteLine(openFileDialog1.FileName);
+ }
+
+ whereRunfile.Text = openFileDialog1.FileName;
+ MessageBox.Show("t@CI܂B");
+ }
+
+ }
+}+
\ No newline at end of file
diff --git a/Form1.resx b/Form1.resx
@@ -0,0 +1,60 @@
+<root>
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+</root>+
\ No newline at end of file
diff --git a/NEUTRINO_GUIs.csproj b/NEUTRINO_GUIs.csproj
@@ -0,0 +1,11 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>WinExe</OutputType>
+ <TargetFramework>net6.0-windows</TargetFramework>
+ <Nullable>enable</Nullable>
+ <UseWindowsForms>true</UseWindowsForms>
+ <ImplicitUsings>enable</ImplicitUsings>
+ </PropertyGroup>
+
+</Project>+
\ No newline at end of file
diff --git a/NEUTRINO_GUIs.sln b/NEUTRINO_GUIs.sln
@@ -0,0 +1,25 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 17
+VisualStudioVersion = 17.0.32112.339
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NEUTRINO_GUIs", "NEUTRINO_GUIs.csproj", "{F1F212A2-3D30-4C9A-8CD3-752A89C50079}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {F1F212A2-3D30-4C9A-8CD3-752A89C50079}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F1F212A2-3D30-4C9A-8CD3-752A89C50079}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F1F212A2-3D30-4C9A-8CD3-752A89C50079}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F1F212A2-3D30-4C9A-8CD3-752A89C50079}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {8DAAA9DB-B7DF-49C5-8D86-73569CBF9AB3}
+ EndGlobalSection
+EndGlobal
diff --git a/Program.cs b/Program.cs
@@ -0,0 +1,17 @@
+namespace NEUTRINO_GUIs
+{
+ internal static class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ // To customize application configuration such as set high DPI settings or default font,
+ // see https://aka.ms/applicationconfiguration.
+ ApplicationConfiguration.Initialize();
+ Application.Run(new Form1());
+ }
+ }
+}+
\ No newline at end of file
diff --git a/Properties/launchSettings.json b/Properties/launchSettings.json
@@ -0,0 +1,9 @@
+{
+ "profiles": {
+ "NEUTRINO_GUIs": {
+ "commandName": "Project",
+ "remoteDebugEnabled": false,
+ "nativeDebugging": true
+ }
+ }
+}+
\ No newline at end of file