private void btnLuuThongTin_Click(object sender, EventArgs e) { //connectionString = string.Format("Data Source = {0}; Initial Catalog = {1}; ", txtTenServer.Text, cboDatabase.Text); //if (cboKieuXacThuc.SelectedIndex == 0) // connectionString += "Integrated Security = True; "; //else // connectionString += string.Format("User Id = {0}; Password = {1}; ", txtTenDangNhap.Text, txtMatKhau.Text); //GlobalSettings.ConnectionString = connectionString; //GlobalSettings.ServerName = txtTenServer.Text; //GlobalSettings.ServerCatalog = cboDatabase.Text; //GlobalSettings.SaveDatabaseConnection(); LuuLaiCauHinhFileConfig(); //luu lai duong dan cap nhat CDSL VERSION _version = VersionLogic.Select(); _version.AppLink = txtUpdateVersionLink.Text; if (VersionLogic.Update(_version)) { O2S_Common.Utilities.ThongBao.frmThongBao frmthongbao = new O2S_Common.Utilities.ThongBao.frmThongBao(Base.ThongBaoLable.CO_LOI_XAY_RA); frmthongbao.Show(); } }
public MainWindow(ILogger <MainWindow> logger, IFlightConnector flightConnector, MainViewModel viewModel, IOptionsMonitor <AppSettings> appSettings, DiscordRichPresentLogic discordRichPresentLogic, ATCServer atcServer, UserPreferencesLoader userPreferencesLoader, VersionLogic versionLogic, UdpBroadcastLogic udpBroadcastLogic) { InitializeComponent(); this.logger = logger; this.flightConnector = flightConnector; this.atcServer = atcServer; this.userPreferencesLoader = userPreferencesLoader; this.versionLogic = versionLogic; this.udpBroadcastLogic = udpBroadcastLogic; this.viewModel = viewModel; this.discordRichPresentLogic = discordRichPresentLogic; this.appSettings = appSettings.CurrentValue; this.lineSimplifier = new LineSimplifier(); flightConnector.AircraftStatusUpdated += FlightConnector_AircraftStatusUpdated; flightConnector.AircraftPositionChanged += FlightConnector_AircraftPositionChanged; flightConnector.AirportListReceived += FlightConnector_AirportListReceived; flightConnector.Error += FlightConnector_Error; DataContext = viewModel; }
public HttpResponseMessage CurrentVersion() { VersionLogic versionLogic = new VersionLogic(); jsonResult = versionLogic.CurrentVersion(); returnResult.Content = new StringContent(jsonResult, Encoding.UTF8, "application/json"); return(returnResult); }
private void LoadCauHinhUpdateVersion() { try { VERSION _version = VersionLogic.Select(); if (_version != null) { txtUpdateVersionLink.Text = _version.AppLink; } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }
private void KiemTraTonTaiVaInsertLinkVersion() { try { VERSION _version = VersionLogic.Select(); if (_version == null) { VERSION _versionInsert = new VERSION() { AppVersion = "1.0.0.0", //AppLink = txtUpdateVersionLink.Text, AppType = 0, }; VersionLogic.Insert(_version); } } catch (Exception ex) { O2S_Common.Logging.LogSystem.Warn(ex); } }
public VersionController() { _versionLogic = new VersionLogic(); }
private void AboutForm_Load(object sender, EventArgs e) { VersionLogic ver = (VersionLogic)ReferenceManager.GetSingleton(typeof(VersionLogic)); this.vsLabel1.Text = ver.ToString(); }