Regarding the ‘Common.Base.Instance.IsApplicationRunning’ it is a boolean that (as you said) indicates the activity of the application. If it is running it is true and during ‘application closure’ it turns to false.
I would suggest to use a bool variable which at the startup of the application is true and during the termination turns to false. Depending of which (WPF/WinForm/Console) you are using.
页面底部评论有答复
不要用代码里面的(代码里的只是伪代码),他建议使用一个变量,如果程序启动就用true,程序关闭使用false