public MainForm(MainLibrary library) { InitializeComponent(); this.library = library; this.library.SetAppTextBoxCallBack(this.textBoxBarCode, this); this.EnterProcessing = false; }
void Start() { try { mainLibrary = GameObject.FindGameObjectWithTag("MainLibrary").GetComponent <MainLibrary>(); string[] ids = mainLibrary.boardLibrary.Keys.ToArray(); int i = 0; //for (int i = 0; i < ids.Length; i++) foreach (string id in ids) { //string id = ids[i]; BoardElement element; if (mainLibrary.boardLibrary.TryGetValue(id, out element)) { GameObject tmp = GameObject.Instantiate(libraryObjectPrefab, new Vector3(.9f, -0.5f * i), new Quaternion(), libraryListParent.transform); tmp.GetComponent <BoardLibraryObject>().LoadBoard(element.image, id, element.version, element.author, coordinator); i++; } else { Debug.Log($"FAILED TO LOAD: {id}"); } } cameraSlider.AfterLibraryLoaded(ids.Length); } catch (Exception e) { Debug.LogError($"Loading scene without library? : {e}"); cameraSlider.AfterLibraryLoaded(0); } }
public WashForm(MainLibrary library, bool readOnly) { InitializeComponent(); this.library = library; this.library.SetAppTextBoxCallBack(this.textBoxBarCode, this); this.offers = this.library.GetAllOffers(); this.readOnly = readOnly; }
static void Main() { String ipAddress = ConfigurationSettings.AppSettings["mssqlIpAddress"].ToString(); String dbName = ConfigurationSettings.AppSettings["mssqlDbName"].ToString(); String comPort = ConfigurationSettings.AppSettings["comPort"].ToString(); MainLibrary library = new MainLibrary("AquaAdmin.log", ipAddress, dbName, comPort); Application.EnableVisualStyles(); Application.Run(new MainForm(library)); }
public async Task <MessageResponse> UserLogin(LoginRequest user) { MainLibrary core = new MainLibrary(); var msg = await core.UserLogin(_repo, user.UserName, TestData.COUNTRY); var response = new MessageResponse { Message = msg }; return(response); }
public async Task <MessageResponse> LeaveGroup(UserGroupDataModel action) { MainLibrary core = new MainLibrary(); var msg = await core.LeaveGroup(_repo, action.User, action.Group); var response = new MessageResponse { Message = msg }; return(response); }
static void Main() { String ipAddress = ConfigurationSettings.AppSettings["mssqlIpAddress"].ToString(); String dbName = ConfigurationSettings.AppSettings["mssqlDbName"].ToString(); String comPort = ConfigurationSettings.AppSettings["comPort"].ToString(); String value = ConfigurationSettings.AppSettings["readOnly"].ToString(); bool readOnly = Convert.ToBoolean(ConfigurationSettings.AppSettings["readOnly"].ToString()); MainLibrary library = new MainLibrary("AquaAdmin.log", ipAddress, dbName, comPort); Application.EnableVisualStyles(); Application.Run(new WashForm(library, readOnly)); }
private void Start() { try { mainLibrary = GameObject.FindGameObjectWithTag("MainLibrary").GetComponent <MainLibrary>(); selectedElementID = ""; detailsTab.SetActive(false); } catch (Exception e) { Debug.LogError($"Loading scene without library? : {e}"); } }
public async Task <IEnumerable <GroupVM> > GetAllGroups(string game) { MainLibrary core = new MainLibrary(); var result = await core.GetGameGroupsAsync(_repo, TestData.GAME); IEnumerable <GroupVM> groups = from res in result select new GroupVM { Name = res.Name, Owner = res.Owner, Game = res.Game }; return(groups); }
public void StartAfterCoordinator() { gameData = GameObject.FindGameObjectWithTag("LoadGameData").GetComponent <LoadGameData>(); mainLibrary = GameObject.FindGameObjectWithTag("MainLibrary").GetComponent <MainLibrary>(); LoadBoardFromLibrary(gameData.boardID); GameObject.Destroy(gameData.gameObject); PlayerInfoCoordinator playerCoordinator = playerInterface.GetComponent <PlayerInfoCoordinator>(); foreach (PlayerInfo player in playerList) { playerCoordinator.AddPlayer(player); } RenderBoard(); }
public async Task <IEnumerable <MessageVM> > GetGroupMessages(string g) { MainLibrary core = new MainLibrary(); var result = await core.GetGroupMessagesAsync(_repo, g); IEnumerable <MessageVM> messages = from res in result select new MessageVM { SenderName = res.SenderName, GroupName = res.GroupName, Content = res.Content, MessageDT = res.MessageDT }; return(messages); }
public async Task <UserVM> GetUserGroups(string user) { MainLibrary core = new MainLibrary(); var userObj = await core.GetUserGroupsAsync(_repo, TestData.GAME, user); UserVM userGroups = new UserVM { UserName = userObj.UserName, Game = userObj.Game, UserGroups = from ug in userObj.UserGroups select new GroupNameVM { Id = ug.Id, Name = ug.Name }, OtherGroups = from og in userObj.OtherGroups select new GroupNameVM { Id = og.Id, Name = og.Name }, }; return(userGroups); }
public async Task <MessageResponse> CreateGroup(GroupVM group) { MainLibrary core = new MainLibrary(); DomainLibrary.Models.GroupDataModel g = new DomainLibrary.Models.GroupDataModel { Game = TestData.GAME, Name = group.Name, Owner = group.Owner }; var msg = await core.CreateGroup(_repo, g); var response = new MessageResponse { Message = msg }; return(response); }
public async Task <MsgResponse> SendToGroup(MessageVM message) { MainLibrary core = new MainLibrary(); DomainLibrary.Models.MessageDataModel m = new DomainLibrary.Models.MessageDataModel { SenderName = message.SenderName, GroupName = message.GroupName, Content = message.Content, MessageDT = DateTime.Now, id = message.GroupName + DateTime.Now.ToString("yyyyMMddhhMIss") }; var msg = await core.SendMessageToGroupAsync(_repo, m); var response = new MsgResponse { Message = msg }; return(response); }
void Start() { try { mainLibrary = GameObject.FindGameObjectWithTag("MainLibrary").GetComponent <MainLibrary>(); string[] ids = mainLibrary.pieceLibrary.Keys.ToArray(); int i = 0; //for (int i = 0; i < ids.Length; i++) foreach (string id in ids) { //string id = ids[i]; PieceElement element; if (mainLibrary.pieceLibrary.TryGetValue(id, out element)) { Sprite image; element.sprites.TryGetValue("default", out image); GameObject tmp = GameObject.Instantiate(libraryObjectPrefab, new Vector3(1.0f, -0.5f * i), new Quaternion(), libraryListParent.transform); tmp.GetComponent <PieceLibraryObject>().LoadPiece(id, image, element.name, element.version, element.author, coordinator); i++; } else { Debug.Log($"FAILED TO LOAD: {i}"); } } cameraSlider.AfterLibraryLoaded(ids.Length); } catch { Debug.LogError("Loading scene without library!"); cameraSlider.AfterLibraryLoaded(0); } }
void Start() { playerInfoList = new List <GameConfigurationController>(); library = GameObject.FindGameObjectWithTag("MainLibrary").GetComponent <MainLibrary>(); Hide(); }