public void ValidFromData() { var address = "0000012345"; var code = new LocationCode(address); Assert.AreEqual("LK0000012345", code.Code); }
public void ValidFromString() { var codeString = "LK0000012345"; var code = new LocationCode(codeString); Assert.AreEqual("0000012345", code.Address); Assert.AreEqual(codeString, code.Code); }
public Activity( string shortname, string activityType, string location, string description, string statusType = STATUS_BLANK) { ShortName = shortname; Act = (ActivityType)Enum.Parse(typeof(ActivityType), activityType.ToUpper()); Loc = (LocationCode)Int32.Parse(location); Status = (StatusType)Enum.Parse(typeof(StatusType), statusType.ToUpper()); Description = description; }
public void OnSimpleUI(LocationCode locationCode) { if (!isSimpleActive) { isSimpleActive = true; simpleNameText.text = locationCode.ToString(); //simpleExplainText.text = ; //simpleImageSprite = Resources.Load(""); nextLocation = locationCode; simpleUI.SetActive(isSimpleActive); } }
IEnumerator CheckDecideReason() //decide start reason or not { bool reasonStart = false; ButtonSetting(0, "", "추리 시작!"); ButtonSetting(1, "", "지금은 아닌것 같다."); yield return(StartCoroutine(waitChoice())); if (choice0.gameObject.GetComponentInChildren <Choicebutton>().clk) { reasonStart = true; } else if (choice1.gameObject.GetComponentInChildren <Choicebutton>().clk) { reasonStart = false; } yield return(new WaitForSeconds(0.1f)); if (reasonStart) { GameManager.inst.MainCamera.GetComponent <AudioSource>().clip = TutorialManager.inst.BGM[1]; GameManager.inst.MainCamera.GetComponent <AudioSource>().Play(); errorText.gameObject.SetActive(true); errorText.GetComponentInChildren <Text>().text = "추리를 시작 하자!"; yield return(new WaitForSeconds(0.5f)); errorText.gameObject.SetActive(false); currentLocation = GameManager.inst.ReturnLocation(); switch (currentLocation) { case LocationCode.PartyHall: ReasonFirst(); CharacterUI.inst.AddExplain(0, "결백이 증명되었다. 용궁 태자의 부탁으로 용왕을 죽인 범인을 찾아주기로 했다."); break; default: break; } } else { } yield return(null); }
/// <summary> /// Location이 변경되면 해당 location에 맞는 gameobject 매핑 /// </summary> /// <param name="locationCode"></param> public void CurrentLocationMapping(LocationCode locationCode) { currentLocation = location[(int)locationCode]; int viewCount = currentLocation.GetComponent <LocationBase>().GetViewCount(); // currentLocation의 viewCount views = new GameObject[viewCount]; for (int i = 0; i < viewCount; i++) { views[i] = currentLocation.transform.Find("View" + i.ToString()).gameObject; views[i].SetActive(false); } // location 변경 이후 첫 시점은 View0 currentViewNum = 0; SetView(currentViewNum); Debug.Log("Location Mapping Complete"); }
/// <summary> /// 플레이어의 맵 이동 /// </summary> public void ChangeLocation(LocationCode nextLocation) { LocationBase nextLocationScript = LocationManager.inst.locationScript[(int)nextLocation]; LocationManager.inst.OffLocationUI(currentLocation); currentLocation = nextLocation; LocationManager.inst.CurrentLocationMapping(currentLocation); LocationManager.inst.OnLocationUI(currentLocation); Debug.Log("Change Location: " + currentLocation); // 처음 방문 시 location의 isActive(방문 유무) true if (nextLocationScript.GetActive() == false) { nextLocationScript.SetActive(); } }
public IQueryable <Vehicle> Filter(IQueryable <Vehicle> query) { //if (Manufacturer.NotNullOrEmpty()) //{ // query = query.Where(v => Manufacturer.Any(m => m == v.VehicleModel.Manufacturer)); //} if (Manufacturer.NotNullOrEmpty()) { query = query.Where(v => v.VehicleModel.Manufacturer == Manufacturer); } if (VehicleModelId.NotNullOrLessThanOne()) { query = query.Where(v => v.VehicleModel.Id == VehicleModelId); } if (LocationCode.NotNullOrEmpty()) { query = query.Where(v => v.LocationCode == LocationCode); } if (ChassisCode.NotNullOrEmpty()) { query = query.Where(v => v.ChassisCode == ChassisCode); } if (MinBookingDays != null && MinBookingDays > 0) { query = query.Where(v => (v.InspectionValidUntil - DateTime.UtcNow).Days > MinBookingDays); } if (Enum.TryParse(Status, out VehicleStatus status)) { query = query.Where(v => v.Status == status); } return(query); }
public Task HistogramCommandAsync(string imageName, LocationCode location, Tier tier) => GenerateHistogramAsync(null, tier, imageName, location);
public Task HistogramCommandAsync(LocationCode location, Tier tier) => GenerateHistogramAsync(null, tier, null, location);
public Task HistogramCommandAsync(string imageName, LocationCode location, DivisionWithCategory div) => GenerateHistogramAsync(div, null, imageName, location);
public Task HistogramCommandAsync([Summary("The location (either two-letter postal code or three-letter country code, in all caps) to filter the analysis to.")] LocationCode location) => GenerateHistogramAsync(ScoreboardFilterInfo.NoFilter, null, location);
/// <summary> /// A button click event to perform robot move to a selected location code of selected slot of selected station /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void MoveBTN_Click(object sender, EventArgs e) { if (connection.isConnected()) { string rbt = RobotCB.Text; string hand = RbtHandCB.Text; string lp = LoadPortCB.Text; string slot = LPSlotCB.Text; string locationCode = locationCodeCB.Text; if (String.IsNullOrEmpty(locationCode)) { MessageBox.Show("Please select Location Code"); } if (String.IsNullOrEmpty(rbt)) { MessageBox.Show("Please select Robot"); } if (String.IsNullOrEmpty(lp)) { MessageBox.Show("Please select a Load Port"); } if (String.IsNullOrEmpty(hand)) { MessageBox.Show("Please select a Load Port"); } /*Get selected robot hand in type of RobotArm enum */ RobotArm Hand = new RobotArm(); switch (hand) { case "H1": Hand = RobotArm.ARM_1; break; case "H2": Hand = RobotArm.ARM_2; break; } /*Get selected location code in type of LocationCode enum */ LocationCode LC = new LocationCode(); switch (locationCode) { case "pbx": LC = LocationCode.pbx; break; case "gbx": LC = LocationCode.gbx; break; } /*Construct and send the command to server accordingly */ string cmd = ""; switch (lp) { case "Load Port1": ULTMServices.sendCommand(R1.Move(Hand, LP1, (LoadPortSlot)Convert.ToInt32(slot), LC)); break; case "Load Port2": ULTMServices.sendCommand(R1.Move(Hand, LP1, (LoadPortSlot)Convert.ToInt32(slot), LC)); break; } this.TerminalRTB.Invoke(new MethodInvoker(delegate() { TerminalRTB.AppendText(Environment.NewLine + Environment.NewLine + "Client>>Server:Move"); })); } else { errorLogger.Log("Robot is not connected"); } }
public void OnLocationUI(LocationCode locationCode) { location[(int)locationCode].SetActive(true); SearchUIChange(); }
public Task GetLocationLeaderboardAsync(LocationCode location, int pageNumber = 1) => GetLocationLeaderboardImplementationAsync(location, ScoreboardFilterInfo.NoFilter, pageNumber);
public Task GetLeaderboardAsync(LocationCode location, Tier tier, int pageNumber = 1) => GetLeaderboardImplementationAsync(location, null, null, tier, pageNumber);
public Task GetLeaderboardAsync(LocationCode location, DivisionWithCategory division, int pageNumber = 1) => GetLeaderboardImplementationAsync(location, division.Category, division.Division, null, pageNumber);
public Task GetTeamWithRankCommandAsync( [Summary("The placement to display. The team at this placement will be displayed. Must be inclusively between 1 and the number of teams.")] int rank, [Summary("If provided, the location within which ranking should be calculated."), AlterParameterDisplay(DisplayAsOptional = true)] LocationCode location, [Summary("If provided, the division (and optionally category) within which ranking should be calculated."), AlterParameterDisplay(DisplayAsOptional = true)] DivisionWithCategory division, [Summary("If provided, the tier within which ranking should be calculated."), AlterParameterDisplay(DisplayAsOptional = true, SubordinateTo = "division")] Tier tier) => GetTeamWithRankAsync(rank, location, division, tier);
public Task GetTeamWithRankCommandAsync(int rank, LocationCode location, DivisionWithCategory division) => GetTeamWithRankAsync(rank, location, division, null);
public Task GetTeamWithRankCommandAsync(int rank, LocationCode location) => GetTeamWithRankAsync(rank, location, null, null);
public Task GetLocationLeaderboardAsync(LocationCode location, Division division, Tier tier, int pageNumber = 1) => GetLocationLeaderboardImplementationAsync(location, new ScoreboardFilterInfo(division, tier), pageNumber);
public Task HistogramCommandAsync(LocationCode location, DivisionWithCategory div, Tier tier) => GenerateHistogramAsync(div, tier, null, location);
public Task HistogramCommandAsync( [Summary("The exact name of the image for which scores should be retrieved. If unspecified, total scores will be used. Only supported on offline score parameters. See the `datasource` command."), AlterParameterDisplay(DisplayAsOptional = true)] string imageName, [Summary("The location (either two-letter postal code or three-letter country code, in all caps) to filter the analysis to, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] LocationCode location, [Summary("The division (and optionally category) to filter the analysis to, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] DivisionWithCategory div, [Summary("The tier to filter the analysis to, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] Tier tier ) => GenerateHistogramAsync(div, tier, imageName, location);
public Task GetImageLeaderboardAsync(string imageName, LocationCode location, DivisionWithCategory division, int pageNumber = 1) => GetImageLeaderboardImplementationAsync(imageName, location, division.Category, division.Division, null, pageNumber);
/// <summary> /// Not implemented. /// </summary> /// <param name="code"></param> /// <param name="data"></param> public void SendCommandToController(LocationCode code, byte data) { ThrowIfNotConnected(); throw new NotImplementedException(); }
public Task GetImageLeaderboardAsync(string imageName, LocationCode location, Tier tier, int pageNumber = 1) => GetImageLeaderboardImplementationAsync(imageName, location, null, null, tier, pageNumber);
public void OffLocationUI(LocationCode locationCode) { location[(int)locationCode].SetActive(false); }
public Task GetImageLeaderboardAsync( [Summary("The image for which information should be retrieved. The name must be an exact match.")] string imageName, [Summary("The location to which scoreboard display should be filtered, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] LocationCode location, [Summary("The division (and optionally category) to which scoreboard display should be filtered, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] DivisionWithCategory division, [Summary("The tier to which scoreboard display should be filtered, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] Tier tier, int pageNumber = 1) => GetImageLeaderboardImplementationAsync(imageName, location, division.Category, division.Division, tier, pageNumber);
public Task GetLeaderboardAsync( [Summary("The location to which scoreboard display should be filtered, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] LocationCode location, [Summary("The division (and optionally category) to which scoreboard display should be filtered, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] DivisionWithCategory division, [Summary("The tier to which scoreboard display should be filtered, if provided."), AlterParameterDisplay(DisplayAsOptional = true)] Tier tier, int pageNumber = 1) => GetLeaderboardImplementationAsync(location, division.Category, division.Division, tier, pageNumber);
public Task HistogramCommandAsync([Summary("The location (either two-letter postal code or three-letter country code, in all caps) to filter the analysis to.")] LocationCode location, Division div, Tier tier) => GenerateHistogramAsync(new ScoreboardFilterInfo(div, tier), null, location);