private void Main_Load(object sender, EventArgs e) { Init(); if (DBConnect() == false) { XtraMessageBox.Show(this, "센터 데이터베이스에 연결되지 않았습니다.", string.Empty); SetupSystem SetupSystem = new SetupSystem(); SetupSystem.ShowDialog(); XtraMessageBox.Show(this, "프로그램을 다시 실행해 주세요.", string.Empty); Application.Exit(); return; } LoadCode(); LoadIcon(); InitForm(); MakeLog("프로그램 시작."); this.Opacity = 100; }
private void btnMainMenu_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { if (e.Item.Equals(btnProgramExit)) { this.Close(); } else if (e.Item.Equals(btnManageCrossCamera)) { ManageCrossCamera ManageCrossCamera = new ManageCrossCamera(); ManageCrossCamera.ShowDialog(this); } else if (e.Item.Equals(btnManageCross)) { ManageCross ManageCross = new ManageCross(); ManageCross.ShowDialog(this); } else if (e.Item.Equals(btnManageUser)) { ManageUser ManageUser = new ManageUser(); ManageUser.ShowDialog(this); } else if (e.Item.Equals(btnManageUserGroup)) { ManageUserGroup ManageUserGroup = new ManageUserGroup(); ManageUserGroup.ShowDialog(this); } else if (e.Item.Equals(btnSetupSystem)) { SetupSystem SetupSystem = new SetupSystem(); SetupSystem.ShowDialog(this); } }
private void Awake() { _menuContext = MenuContext.GetMenuContext(); _services = UsableServices.SharedInstance; _services.Initialize(_menuContext); _setupSystem = new SetupSystem(_menuContext, _services); _menuSystem = new MenuSystem(_menuContext, _services, log); _setupSystem.Awake(); _menuSystem.Awake(); }
public void ShouldBeAbleToUse() { var connection = new Mock<IDbConnection>(); connection.Setup(x => x.Open()).Verifiable(); connection.Setup(x => x.Close()).Verifiable(); var connectionInstance = connection.Object; var setupSystemTables = new Mock<ISetupSystemTables>(); setupSystemTables.Setup(x => x.ValidateAndCreateDataTables(connectionInstance)).Verifiable(); var setupSystemData = new Mock<ISetupSystemData>(); setupSystemData.Setup(x => x.LoadAndValidateData(connectionInstance)).Verifiable(); var storageFactory = new Mock<IStorageFactory>(); storageFactory.Setup(x => x.CreateConnection()).Returns(connectionInstance).Verifiable(); var setupSystem = new SetupSystem(setupSystemTables.Object, setupSystemData.Object, storageFactory.Object); setupSystem.Initialize(); connection.VerifyAll(); storageFactory.VerifyAll(); setupSystemData.VerifyAll(); setupSystemTables.VerifyAll(); }
public async Task <ApiResult> Save(SetupSystem request) { return(await _mediator.Send(request)); }
public void SetupSystem() { SetupSystem setupSystem = new SetupSystem(this, _configSettings, _mediaResourceFactory, _messageBus, _documentStore); setupSystem.Execute(); }