add webtestversion

This commit is contained in:
backuppc
2025-07-09 17:40:50 +09:00
parent 99b1c3ff8e
commit b4183e8283
30 changed files with 4801 additions and 2827 deletions

View File

@@ -18,7 +18,8 @@ namespace Project
{
string SearchKey = string.Empty;
ServiceHost host;
private IDisposable webApp;
bool webok = false;
public fMain()
@@ -79,6 +80,7 @@ namespace Project
private void __Closing(object sender, FormClosingEventArgs e)
{
webApp?.Dispose();
MessageWindow.CloseAll();
if (closeforce == false)
{
@@ -148,47 +150,37 @@ namespace Project
tmDisplay.Start(); //display timer
Func_Login();
Update_Site();
UpdateControls();
//사용기록추적
Pub.CheckNRegister3(Application.ProductName, "chi", Application.ProductVersion);
// Start OWIN host
try
{
WebApp.Start<OWIN.Startup>(url: "http://127.0.0.1:9000");
var options = new StartOptions("http://127.0.0.1:9000");
webApp = WebApp.Start<OWIN.Startup>(options);
Console.WriteLine("start webapp");
Pub.log.AddI("웹지원 서버 준비 완료");
webok = true;
}
catch (Exception ex)
{
//Util.MsgE("Web Interface Error\r\n" + ex.Message)/;
Console.WriteLine(ex.Message);
Pub.log.AddE("웹지원오류" + ex.Message);
webok = false;
}
Func_Login();
//// Address
//string address = "net.tcp://localhost:57900/eetgw";
///즐겨찾기 목록 갱신
Update_FavoriteSite();
//// Binding : TCP 사용
//NetTcpBinding binding = new NetTcpBinding();
UpdateControls();
//// Service Host 만들기
//host = new ServiceHost(typeof(MyService));
//사용기록추적
Pub.CheckNRegister3(Application.ProductName, "chi", Application.ProductVersion);
//// End Point 추가
//host.AddServiceEndpoint(typeof(IMyContract), binding, address);
//// Service Host 시작
//host.Open();
}
void Update_Site()
void Update_FavoriteSite()
{
//즐겨찾기 없데이트 g=17
//타입
@@ -212,9 +204,19 @@ namespace Project
void Func_Login()
{
using (Dialog.fLogin flogIn = new Dialog.fLogin())
if (flogIn.ShowDialog() != System.Windows.Forms.DialogResult.OK)
Application.ExitThread();
if (this.webok)
{
using (var flogIn = new Dialog.fLogin_WB())
if (flogIn.ShowDialog() != System.Windows.Forms.DialogResult.OK)
Application.ExitThread();
}
else
{
using (var flogIn = new Dialog.fLogin())
if (flogIn.ShowDialog() != System.Windows.Forms.DialogResult.OK)
Application.ExitThread();
}
this.mn_purchase.Visible = FCOMMON.Util.getBit(FCOMMON.info.Login.gpermission, (int)FCOMMON.eGroupPermission.menu_purchase);
this.mn_project.Visible = FCOMMON.Util.getBit(FCOMMON.info.Login.gpermission, (int)FCOMMON.eGroupPermission.menu_project);