public FrmMain() { InitializeComponent(); Config = new ConfigModel(); ConfigService.LoadConfig(ref Config); if (ConfigService.IsEmpty(ref Config)) { ShowTip(ToolTipIcon.Info, "欢迎使用SrLink", "检测到当前配置为空,请先到配置页面设置连接信息。", false); ConfigService.InitialConfig(ref Config); } _frmDebug = new FrmDebug(); //TMR_SrLink.Enabled = Config.AutoLink; Application.ApplicationExit += (sender, args) => { SrLinkService.DisconnectVpn(); _frmDebug.Dispose(); ConfigService.SaveConfig(ref Config); }; }
public SubFrmNormal(FrmDebug frmDebug) { InitializeComponent(); FrmDebug = frmDebug; }