Process::Start( String::Concat(pstrStartupPathOn , patrOnlineExe) );
来源:互联网 发布:国家税务局网络 编辑:程序博客网 时间:2024/05/29 14:03
private: System::Void menuItemInformation_Click(System::Object * sender, System::EventArgs * e)
{
ms->ShowDialog();
}
private: System::Void HOCMNUFormMENU_Load(System::Object * sender, System::EventArgs * e)
{
this->ms=new HOCMNUFormINFO();
patrOfflineExe = S"HVSOffline.exe";
patrOnlineExe = S"HVSOnline.exe";
pstrMN0101001_W = S"アプリケーションを終了して、よろしいですか?";
pstrStartupPathOff = String::Concat(Application::StartupPath, S"\\OFF\\");
pstrStartupPathOn = String::Concat(Application::StartupPath, S"\\ONL\\");
pstrMN0101002_W = S"オンラインは動作中です。";
pstrMN0101003_W = S"オフラインは動作中です。";
}
private: System::Void buttonOffline_Click(System::Object * sender, System::EventArgs * e)
{
//オンライン画面が開いているかどうか?
bRequestInitialOwnershipOn = true;
pMutexOn = new Mutex(bRequestInitialOwnershipOn,
"HVSOnlineJSMutex",
&bMutexWasCreatedOn);
if (!(bRequestInitialOwnershipOn && bMutexWasCreatedOn))
{
pMutexOn->Close();
MessageBox::Show(pstrMN0101002_W,
S"HVS",
MessageBoxButtons::OK,
MessageBoxIcon::Warning);
return ;
}
pMutexOn->ReleaseMutex();
pMutexOn->Close();
try
{
Process::Start( String::Concat(pstrStartupPathOff , patrOfflineExe) );
}
catch(Exception * e)
{
MessageBox::Show(e->Message, S"HVS");
}
}
private: System::Void buttonOnline_Click(System::Object * sender, System::EventArgs * e)
{
//オフライン画面が開いているかどうか?
bRequestInitialOwnershipOff = true;
pMutexOff = new Mutex(bRequestInitialOwnershipOff,
"HVSOfflineJSMutex",
&bMutexWasCreatedOff);
if (!(bRequestInitialOwnershipOff && bMutexWasCreatedOff))
{
pMutexOff->Close();
MessageBox::Show(pstrMN0101003_W,
S"HVS",
MessageBoxButtons::OK,
MessageBoxIcon::Warning);
return ;
}
pMutexOff->ReleaseMutex();
pMutexOff->Close();
try
{
Process::Start( String::Concat(pstrStartupPathOn , patrOnlineExe) );
}
catch( Exception * e)
{
MessageBox::Show(e->Message, S"HVS");
}
}
private: System::Void HOCMNUFormMENU_Closing(System::Object * sender, System::ComponentModel::CancelEventArgs * e)
{
String* caption = S"HVS";
MessageBoxButtons buttons = MessageBoxButtons::YesNo;
System::Windows::Forms::DialogResult result;
///確認メッセージを出力する。(メッセージID:-W)
///「キャンセル」の場合、画面へ戻る。
result = MessageBox::Show(this,
pstrMN0101001_W,
caption,
buttons,
//EDIT BY FANG 20060304 START
//MessageBoxIcon::Question,
MessageBoxIcon::Warning,
//EDIT BY FANG 20060304 END
MessageBoxDefaultButton::Button1 );
///「OK」の場合、終了する。
if (result == DialogResult::No)
{
e->Cancel = true;
}
else
{
//オンライン画面が開いているかどうか?
bRequestInitialOwnershipOn = true;
pMutexOn = new Mutex(bRequestInitialOwnershipOn,
"HVSOnlineJSMutex",
&bMutexWasCreatedOn);
if (!(bRequestInitialOwnershipOn && bMutexWasCreatedOn))
{
pMutexOn->Close();
MessageBox::Show(pstrMN0101002_W,
S"HVS",
MessageBoxButtons::OK,
MessageBoxIcon::Warning);
e->Cancel = true;
return ;
}
pMutexOn->ReleaseMutex();
pMutexOn->Close();
//オフライン画面が開いているかどうか?
bRequestInitialOwnershipOff = true;
pMutexOff = new Mutex(bRequestInitialOwnershipOff,
"HVSOfflineJSMutex",
&bMutexWasCreatedOff);
if (!(bRequestInitialOwnershipOff && bMutexWasCreatedOff))
{
pMutexOff->Close();
MessageBox::Show(pstrMN0101003_W,
S"HVS",
MessageBoxButtons::OK,
MessageBoxIcon::Warning);
e->Cancel = true;
return ;
}
pMutexOff->ReleaseMutex();
pMutexOff->Close();
}
}
private: System::Void menuItemClose_Click(System::Object * sender, System::EventArgs * e)
{
this->Close();
}
- Process::Start( String::Concat(pstrStartupPathOn , patrOnlineExe) );
- string.concat
- Process.Start()
- String.Concat 方法
- string.Concat的使用
- String.Concat 使用方法简介
- String.Concat 方法
- String.concat连接字符串
- System.Diagnostics.Process.Start
- android start new process
- System.Diagnostics.Process.Start()
- ARM Kernel Start Process
- Process.Start 方法
- 3-Openwrt start process
- java.lang.String +concat(s1: String): String
- Java:concat 方法(String)
- Process.Start()方法详解_System.Diagnostics.Process.Start()的用法
- oracle之字符链接 concat(String,String)
- ActiveX的MFC设计之旅-第2步 .
- IEnumerable IListIList,ICollection,IEnumerable
- poj 2773 Happy 2006
- 用PHP实现mysql锁表
- ActiveX控件的MFC设计之旅-第3步 .
- Process::Start( String::Concat(pstrStartupPathOn , patrOnlineExe) );
- ContentProvider的简单实现 + ContentObserver加听数据库
- ActiveX控件的MFC设计之旅-第4步
- android AIDL的基本知识
- ActiveX控件的MFC设计之旅-第5步 .
- 谈谈数据加密的处理--提供各种算法处理
- 动态添加的ActiveX控件如何响应事件 .
- ActiveX控件中全局变量的一种用法 .
- Eclipse快捷键大全(转载)