diff --git a/ECTrainer2/Logger.h b/ECTrainer2/Logger.h
index cdcd495..6197433 100644
--- a/ECTrainer2/Logger.h
+++ b/ECTrainer2/Logger.h
@@ -41,6 +41,7 @@
void StartRecord(std::string subject, int visit);
void WriteRecord(Record& r);
void Stop();
+ std::wstring Filename() { return _logFileName; };
};
// 将来ログクラスを階層化する
diff --git a/ECTrainer2/Worker.cpp b/ECTrainer2/Worker.cpp
index 2b52d8e..3300504 100644
--- a/ECTrainer2/Worker.cpp
+++ b/ECTrainer2/Worker.cpp
@@ -240,6 +240,7 @@
_AppStatus = APP_STATUS::IDLE;
Ect()->PStimulus()->PostMsg((int)ECTMSG::EXP_STOP);
this->EventLog(_T("Experiment Stopped"));
+ this->LaunchResult();
}
break;
@@ -248,6 +249,7 @@
_AppStatus = APP_STATUS::IDLE;
Ect()->PStimulus()->PostMsg((int)ECTMSG::EXP_END);
this->EventLog(_T("Experiment Finished"));
+ this->LaunchResult();
}
break;
@@ -314,3 +316,20 @@
void Worker::FPS(double fps) {
nkc::wut::DebugPrintf(_T("[Worker] %.1f fps\n"), fps);
}
+
+// 結果表示ソフト起動
+void Worker::LaunchResult() {
+ PROCESS_INFORMATION pi = { 0 };
+ STARTUPINFO si = { sizeof(STARTUPINFO) };
+ TCHAR cmd[1024];
+ _stprintf_s(cmd, 1024, _T("EcomAnalysis.exe \"%s\""), _DataLog.Filename().c_str());
+ if (CreateProcess(
+ NULL,
+ //(LPWSTR)_DataLog.Filename().c_str(),
+ cmd,
+ NULL, NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi)) {
+ this->EventLog(_T("Launch analysis software OK\n"));
+ } else {
+ this->EventLog(_T("Launch analysis software failed\n"));
+ }
+}
diff --git a/ECTrainer2/Worker.h b/ECTrainer2/Worker.h
index cf01fc0..bb58b52 100644
--- a/ECTrainer2/Worker.h
+++ b/ECTrainer2/Worker.h
@@ -61,6 +61,8 @@
//void CloseDataLog();
// FPS表示
void FPS(double fps);
+ // 結果表示ソフト起動
+ void LaunchResult();
public:
// コンストラクタ
diff --git a/EcomAnalysis/EcomAnalysis.csproj b/EcomAnalysis/EcomAnalysis.csproj
index 6c3f74f..7d749b1 100644
--- a/EcomAnalysis/EcomAnalysis.csproj
+++ b/EcomAnalysis/EcomAnalysis.csproj
@@ -54,6 +54,9 @@
+
+ Form1.cs
+
ResXFileCodeGenerator
Resources.Designer.cs
diff --git a/EcomAnalysis/Form1.Designer.cs b/EcomAnalysis/Form1.Designer.cs
index 86bcd0f..a7aeb2b 100644
--- a/EcomAnalysis/Form1.Designer.cs
+++ b/EcomAnalysis/Form1.Designer.cs
@@ -24,13 +24,35 @@
/// コード エディターで変更しないでください。
///
private void InitializeComponent() {
- this.components = new System.ComponentModel.Container();
+ this.label1 = new System.Windows.Forms.Label();
+ this.SuspendLayout();
+ //
+ // label1
+ //
+ this.label1.AutoSize = true;
+ this.label1.Location = new System.Drawing.Point(61, 43);
+ this.label1.Name = "label1";
+ this.label1.Size = new System.Drawing.Size(35, 12);
+ this.label1.TabIndex = 0;
+ this.label1.Text = "label1";
+ //
+ // Form1
+ //
+ this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
- this.ClientSize = new System.Drawing.Size(800, 450);
+ this.ClientSize = new System.Drawing.Size(412, 235);
+ this.Controls.Add(this.label1);
+ this.Name = "Form1";
this.Text = "Form1";
+ this.Load += new System.EventHandler(this.Form1_Load);
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
}
#endregion
+
+ private System.Windows.Forms.Label label1;
}
}
diff --git a/EcomAnalysis/Form1.cs b/EcomAnalysis/Form1.cs
index 37574d1..a7ec09e 100644
--- a/EcomAnalysis/Form1.cs
+++ b/EcomAnalysis/Form1.cs
@@ -13,5 +13,10 @@
public Form1() {
InitializeComponent();
}
+
+ private void Form1_Load(object sender, EventArgs e) {
+ var args = Environment.GetCommandLineArgs();
+ label1.Text = args.Length > 1 ? args[1] : "no args";
+ }
}
}
diff --git a/EcomAnalysis/Form1.resx b/EcomAnalysis/Form1.resx
new file mode 100644
index 0000000..1af7de1
--- /dev/null
+++ b/EcomAnalysis/Form1.resx
@@ -0,0 +1,120 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
\ No newline at end of file
diff --git a/EcomAnalysis/Program.cs b/EcomAnalysis/Program.cs
index 8f612b8..af0ec60 100644
--- a/EcomAnalysis/Program.cs
+++ b/EcomAnalysis/Program.cs
@@ -12,10 +12,10 @@
///
[STAThread]
static void Main() {
- var args = Environment.GetCommandLineArgs();
- foreach (var a in args) {
- Debug.WriteLine(a);
- }
+ //var args = Environment.GetCommandLineArgs();
+ //foreach (var a in args) {
+ // Debug.WriteLine(a);
+ //}
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);