public ConnectionProfile(AuthenticationProfile authentication, RegionProfile region, string user, string password) { Authentication = authentication; Region = region; User = user; Password = password; }
public SquareRoom(int ox, int oz, int index, int w, int h, RegionProfile profile) : base(ox, oz, index, profile) { this.width = w; this.height = h; base.centerX = base.originX + (w / 2); base.centerZ = base.originZ + (h / 2); for (int x = base.originX; x <= base.originX + w; x++) { for (int z = base.originZ; z <= base.originZ + h; z++) { Tile t = Grid.Get(x, z); t.SetIndex(base.index); t.SetStatus(TileStatus.Vacant); base.tiles.Add(t); if (x == base.originX || x == base.originX + w || z == base.originZ || z == base.originZ + h) { base.edges.Add(t); } } } }
public Region(RegionProfile profile) { this.tiles = new List <Tile>(); this.edges = new List <Tile>(); this.profile = profile; }
public Room(int ox, int oz, int index, RegionProfile profile) : base(profile) { this.originX = ox; this.originZ = oz; this.index = index; }
public ConnectionProfile(AuthenticationProfile authentication, RegionProfile region, ProxyProfile proxy, string user, string password) { Authentication = authentication; Region = region; Proxy = proxy; User = user; Password = password; }
public CircleRoom(int ox, int oz, int index, int r, RegionProfile profile) : base(ox, oz, index, profile) { this.radius = r; Tile c = Grid.Get(ox, oz); for (int x = ox - r; x <= ox + r + 1; x++) { for (int z = oz - r; z <= oz + r + 1; z++) { if (x < 0 || x > Grid.size - 1 || z < 0 || z > Grid.size - 1 || Vector3.Distance(c.position, Grid.Get(x, z).position) > r) { continue; } base.tiles.Add(Grid.Get(x, z)); } } }
/// <summary> /// [지역 선택] 상위지역 선택 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbboxRegionLevel1_SelectedIndexChanged(object sender, EventArgs e) { this.cmbboxRegionLevel2.Items.Clear(); this.cmbboxRegionLevel2.ResetText(); this.cmbboxRegionLevel2.Enabled = false; ComboBox cmbbox = sender as ComboBox; if (cmbbox == null) { return; } RegionProfile currentRegion = cmbbox.SelectedItem as RegionProfile; if (currentRegion == null) { return; } this.cmbboxRegionLevel2.Items.Add(entireRegion2); if (currentRegion == this.entireRegion1 || string.IsNullOrEmpty(currentRegion.Code)) { this.cmbboxRegionLevel2.Enabled = false; this.cmbboxRegionLevel2.SelectedIndex = 0; } else { this.cmbboxRegionLevel2.Enabled = true; foreach (RegionProfile subRegion in currentRegion.LstSubRegion.Values) { int index = this.cmbboxRegionLevel2.Items.Add(subRegion); } } if (this.cmbboxRegionLevel2.Items.Count > 0) { this.cmbboxRegionLevel2.SelectedIndex = 0; } this.filter.Region1Code = currentRegion.Code; this.filter.Region2Code = string.Empty; }
/// <summary> /// [지역 선택] 하위지역 선택 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void cmbboxRegionLevel2_SelectedIndexChanged(object sender, EventArgs e) { ComboBox cmbbox = sender as ComboBox; if (cmbbox == null) { return; } RegionProfile currentRegion = cmbbox.SelectedItem as RegionProfile; if (currentRegion == null) { return; } if (cmbbox.Focused) { this.filter.Region2Code = currentRegion.Code; } }
static void Main(string[] arguments) { Configuration configuration; try { Serialiser <Configuration> serialiser = new Serialiser <Configuration>(ConfigurationFile); configuration = serialiser.Load(); } catch (System.IO.FileNotFoundException) { Console.WriteLine("Unable to load configuration file \"" + ConfigurationFile + "\""); return; } catch (System.InvalidOperationException) { Console.WriteLine("Malformed configuration file"); return; } if (arguments.Length != 3) { Console.WriteLine("Usage:"); Console.WriteLine(Environment.GetCommandLineArgs()[0] + " <server> <user> <password>"); Console.Write("Servers available:"); foreach (ServerProfile profile in configuration.ServerProfiles) { Console.Write(" " + profile.Abbreviation); } Console.WriteLine(""); return; } string server = arguments[0]; string user = arguments[1]; string password = arguments[2]; ServerProfile chosenProfile = null; foreach (ServerProfile profile in configuration.ServerProfiles) { if (profile.Abbreviation.ToLower() == server.ToLower()) { chosenProfile = profile; break; } } if (chosenProfile == null) { Console.WriteLine("Unable to find server profile \"" + server + "\""); return; } RegionProfile regionData = new RegionProfile(chosenProfile.LoginQueueURL, chosenProfile.RPCURL); ConnectionProfile connectionData = new ConnectionProfile(configuration.Authentication, regionData, configuration.Proxy, user, password); LegendaryPrompt prompt = new LegendaryPrompt(configuration, connectionData); prompt.Run(); }