/// <summary> /// Returns true if DuplicateEquipmentViewModel instances are equal /// </summary> /// <param name="other">Instance of DuplicateEquipmentViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(DuplicateEquipmentViewModel other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Id == other.Id || Id.Equals(other.Id) ) && ( DistrictName == other.DistrictName || DistrictName != null && DistrictName.Equals(other.DistrictName) ) && ( SerialNumber == other.SerialNumber || SerialNumber != null && SerialNumber.Equals(other.SerialNumber) ) && ( DuplicateEquipment == other.DuplicateEquipment || DuplicateEquipment != null && DuplicateEquipment.Equals(other.DuplicateEquipment) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + Id.GetHashCode(); if (DistrictName != null) { hash = hash * 59 + DistrictName.GetHashCode(); } if (SerialNumber != null) { hash = hash * 59 + SerialNumber.GetHashCode(); } if (DuplicateEquipment != null) { hash = hash * 59 + DuplicateEquipment.GetHashCode(); } return(hash); } }
private void HandleUpdateSourceDistrictMessage(UpdateSourceDistrictMessage obj) { BindingExpression bd = DistrictName.GetBindingExpression(SfTextBoxExt.TextProperty); bd.UpdateSource(); //BindingExpression br = RegionCombo.GetBindingExpression(ComboBoxAdv.DisplayMemberPathProperty); //br.UpdateSource(); }
/// <summary> /// GetHashCode /// </summary> /// <returns></returns> public override int GetHashCode() { unchecked { var hash = 17; hash = hash * 23 + DistrictName.GetHashCode(); return(hash); } }
/// <summary> /// GetHashCode /// </summary> /// <returns></returns> public override int GetHashCode() { unchecked { var hash = 17; hash = hash * 23 + CityName.GetHashCode(); hash = hash * 23 + DistrictName.GetHashCode(); hash = hash * 23 + CountyName.GetHashCode(); hash = hash * 23 + ProvinceName.GetHashCode(); hash = hash * 23 + CityDivisionCode.GetHashCode(); return(hash); } }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { unchecked // Overflow is fine, just wrap { var hashCode = 41; // Suitable nullity checks etc, of course :) if (Address != null) { hashCode = hashCode * 59 + Address.GetHashCode(); } if (AdditionalInfo != null) { hashCode = hashCode * 59 + AdditionalInfo.GetHashCode(); } if (DistrictName != null) { hashCode = hashCode * 59 + DistrictName.GetHashCode(); } if (TownName != null) { hashCode = hashCode * 59 + TownName.GetHashCode(); } if (IbgeCode != null) { hashCode = hashCode * 59 + IbgeCode.GetHashCode(); } if (CountrySubDivision != null) { hashCode = hashCode * 59 + CountrySubDivision.GetHashCode(); } if (PostCode != null) { hashCode = hashCode * 59 + PostCode.GetHashCode(); } if (Country != null) { hashCode = hashCode * 59 + Country.GetHashCode(); } if (CountryCode != null) { hashCode = hashCode * 59 + CountryCode.GetHashCode(); } if (GeographicCoordinates != null) { hashCode = hashCode * 59 + GeographicCoordinates.GetHashCode(); } return(hashCode); } }
public DataCollector( DataCollectorId id, DateTimeOffset lastActive, RegionName region, DistrictName district, Location location, Sex sex) { Id = id; LastActive = lastActive; Region = region; District = district; Location = location; Sex = sex; }
/// <summary> /// Returns true if OwnerVerificationPdfViewModel instances are equal /// </summary> /// <param name="other">Instance of OwnerVerificationPdfViewModel to be compared</param> /// <returns>Boolean</returns> public bool Equals(OwnerVerificationPdfViewModel other) { if (other is null) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( ReportDate == other.ReportDate || ReportDate.Equals(other.ReportDate) ) && ( Title == other.Title || Title.Equals(other.Title) ) && ( DistrictId == other.DistrictId || DistrictId.Equals(other.DistrictId) ) && ( MinistryDistrictId == other.MinistryDistrictId || MinistryDistrictId.Equals(other.MinistryDistrictId) ) && ( DistrictName == other.DistrictName || DistrictName.Equals(other.DistrictName) ) && ( DistrictAddress == other.DistrictAddress || DistrictAddress.Equals(other.DistrictAddress) ) && ( DistrictContact == other.DistrictContact || DistrictContact.Equals(other.DistrictContact) ) && ( Owners == other.Owners || Owners.Equals(other.Owners) )); }
/// <summary> /// Gets the hash code /// </summary> /// <returns>Hash code</returns> public override int GetHashCode() { // credit: http://stackoverflow.com/a/263416/677735 unchecked // Overflow is fine, just wrap { int hash = 41; // Suitable nullity checks hash = hash * 59 + ReportDate.GetHashCode(); hash = hash * 59 + Title.GetHashCode(); hash = hash * 59 + DistrictId.GetHashCode(); hash = hash * 59 + MinistryDistrictId.GetHashCode(); hash = hash * 59 + DistrictName.GetHashCode(); hash = hash * 59 + DistrictAddress.GetHashCode(); hash = hash * 59 + DistrictContact.GetHashCode(); hash = hash * 59 + Owners.GetHashCode(); return(hash); } }
protected override void OnModelCreating(ModelBuilder modelBuilder) { //Composite Key modelBuilder.Entity <PassengerRegistration>() .HasKey(o => new { o.ID, o.PassengerID }); modelBuilder.Entity <DriverRegistration>() .HasKey(o => new { o.ID, o.DriverID }); CountryName countryName = new CountryName(); countryName.CountryNameData(modelBuilder); StateName stateName = new StateName(); stateName.StateNameData(modelBuilder); DistrictName districtName = new DistrictName(); districtName.DistrictNameData(modelBuilder); }
/// <summary> /// Returns true if SharedAutomatedTellerMachinesPostalAddress instances are equal /// </summary> /// <param name="other">Instance of SharedAutomatedTellerMachinesPostalAddress to be compared</param> /// <returns>Boolean</returns> public bool Equals(SharedAutomatedTellerMachinesPostalAddress other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return (( Address == other.Address || Address != null && Address.Equals(other.Address) ) && ( AdditionalInfo == other.AdditionalInfo || AdditionalInfo != null && AdditionalInfo.Equals(other.AdditionalInfo) ) && ( DistrictName == other.DistrictName || DistrictName != null && DistrictName.Equals(other.DistrictName) ) && ( TownName == other.TownName || TownName != null && TownName.Equals(other.TownName) ) && ( IbgeCode == other.IbgeCode || IbgeCode != null && IbgeCode.Equals(other.IbgeCode) ) && ( CountrySubDivision == other.CountrySubDivision || CountrySubDivision != null && CountrySubDivision.Equals(other.CountrySubDivision) ) && ( PostCode == other.PostCode || PostCode != null && PostCode.Equals(other.PostCode) ) && ( Country == other.Country || Country != null && Country.Equals(other.Country) ) && ( CountryCode == other.CountryCode || CountryCode != null && CountryCode.Equals(other.CountryCode) ) && ( GeographicCoordinates == other.GeographicCoordinates || GeographicCoordinates != null && GeographicCoordinates.Equals(other.GeographicCoordinates) )); }
public MSDistrictScreen(DistrictName district, MoodSwing game) : base(game.Content.Load<Texture2D>("districtmap"), 0, 0, 0, 0, game.SpriteBatch, game) { gameTime = 0; lastTotalRunTime = 0; this.name = district; String filename = ""; if (district == DistrictName.FEAR) { filename = @"Content\smallMap.txt"; districtName = "small"; ultiGoal = 3; } else if (district == DistrictName.SADNESS) { filename = @"Content\mediumMap.txt"; districtName = "medium"; ultiGoal = 6; } else if (district == DistrictName.ANGER) { filename = @"Content\largeMap.txt"; districtName = "large"; ultiGoal = 8; } map = new MSMap(filename); MSCamera.initialize((game as MoodSwing).GraphicsDevice.Viewport, MSDistrictHall.getInstance().Position, MSDistrictHall.getInstance().Rotation); //citizensList = new List<MSCitizen>(); unitHandler = MSUnitHandler.Restart(); moodManager = MSMoodManager.GetInstance(); MSMoodManager.Reset(); resourceManager = MSResourceManager.GetInstance(); MSResourceManager.instantiate(1000, map.InitialVolunteerCenters); foreach (MS3DTile tile in map.MapArray) { tile.LightSource = map.LightSource; } blackOutPanel = new MSPanel ( game.Content.Load<Texture2D>("BlackOut"), BoundingRectangle, null, Shape.RECTANGULAR, spriteBatch, game ); blackOutPanel.Visible = false; AddComponent(blackOutPanel); MSToolTip idleVolunteersToolTip = new MSToolTip ( null, new Rectangle(52, 25, 50, 14), SpriteBatch, Game ); MSPanel idleVolunteersPanel = new MSPanel ( null, new Rectangle(52, 25, 50, 14), idleVolunteersToolTip, Shape.RECTANGULAR, SpriteBatch, Game ); idleVolunteers = new MSTextField ( "0", new Rectangle(82, 25, 20, 14), null, null, 4, game.Content.Load<SpriteFont>("TopPanel"), Color.White, spriteBatch, game ); idleVolunteersPanel.AddComponent(idleVolunteers); idleVolunteersToolTip.AddComponent(new MSWrappingLabel ( new Point(82, 39), "Idle Volunteers", Game.Content.Load<SpriteFont>("ToolTipFont"), Color.White, Game.Content.Load<Texture2D>("BlackOut"), 3, 3, 3, 3, null, null, SpriteBatch, Game )); MSToolTip totalVolunteersToolTip = new MSToolTip ( null, new Rectangle(152, 25, 80, 14), SpriteBatch, Game ); MSPanel totalVolunteersPanel = new MSPanel ( null, new Rectangle(152, 25, 80, 14), totalVolunteersToolTip, Shape.RECTANGULAR, SpriteBatch, Game ); totalVolunteers = new MSTextField( "0/0", new Rectangle(192, 34, 40, 14), null, null, 9, game.Content.Load<SpriteFont>("TopPanel"), Color.White, spriteBatch, game); totalVolunteersPanel.AddComponent(totalVolunteers); totalVolunteersToolTip.AddComponent(new MSWrappingLabel ( new Point(192, 48), "Total Volunteers/Volunteer Limit", Game.Content.Load<SpriteFont>("ToolTipFont"), Color.White, Game.Content.Load<Texture2D>("BlackOut"), 3, 3, 3, 3, null, null, SpriteBatch, Game )); MSToolTip fundsToolTip = new MSToolTip ( null, new Rectangle(262, 44, 150, 20), SpriteBatch, Game ); MSPanel fundsPanel = new MSPanel ( null, new Rectangle(262, 44, 150, 20), fundsToolTip, Shape.RECTANGULAR, SpriteBatch, Game ); funds = new MSTextField ( "0", new Rectangle(332, 44, 80, 20), null, null, 8, game.Content.Load<SpriteFont>("TopPanel"), Color.White, spriteBatch, game ); fundsPanel.AddComponent(funds); fundsToolTip.AddComponent(new MSWrappingLabel ( new Point(332, 64), "Funds", Game.Content.Load<SpriteFont>("ToolTipFont"), Color.White, Game.Content.Load<Texture2D>("BlackOut"), 3, 3, 3, 3, null, null, SpriteBatch, Game )); MSPanel topPanelBack = new MSPanel ( Game.Content.Load<Texture2D>("GamePanel/WhiteBG"), new Rectangle(0, 0, 1024, 91), null, Shape.AMORPHOUS, SpriteBatch, Game ); AddComponent(topPanelBack, Alignment.TOP_CENTER); MSPanel topPanel = new MSPanel ( Game.Content.Load<Texture2D>("GamePanel/TopPanel"), new Rectangle(0, 0, 1024, 91), null, Shape.AMORPHOUS, SpriteBatch, Game ); topPanel.AddComponent(idleVolunteersPanel); topPanel.AddComponent(totalVolunteersPanel); topPanel.AddComponent(fundsPanel); AddComponent(topPanel, Alignment.TOP_CENTER); mainMenuButton = new MSButton( null, new OpenExitConfirmation(OpenExitConfirmation.ExitType.ToMainMenu), new Rectangle(403, 92, 226, 57), game.Content.Load<Texture2D>("GamePanel/MainMenu"), game.Content.Load<Texture2D>("GamePanel/mainmenuclicked"), game.Content.Load<Texture2D>("GamePanel/mainmenuhovered"), null, Shape.AMORPHOUS, spriteBatch, game); optionsButton = new MSButton( null, OpenOptionsScreen.GetInstance(), new Rectangle(431, 151, 237, 57), game.Content.Load<Texture2D>("GamePanel/Options"), game.Content.Load<Texture2D>("GamePanel/optionsclicked"), game.Content.Load<Texture2D>("GamePanel/optionshovered"), null, Shape.AMORPHOUS, spriteBatch, game); exitButton = new MSButton( null, new OpenExitConfirmation(OpenExitConfirmation.ExitType.ToWindows), new Rectangle(460, 210, 277, 57), game.Content.Load<Texture2D>("GamePanel/quit"), game.Content.Load<Texture2D>("GamePanel/quitclicked"), game.Content.Load<Texture2D>("GamePanel/quithovered"), null, Shape.AMORPHOUS, spriteBatch, game); AddComponent(mainMenuButton); AddComponent(optionsButton); AddComponent(exitButton); mainMenuButton.Visible = false; optionsButton.Visible = false; exitButton.Visible = false; openInGameMenu = new MSAnimatingButton( null, new OpenInGameMenu(), new Rectangle(465, 25, 111, 110), game.Content.Load<Texture2D>("GamePanel/Logo"), game.Content.Load<Texture2D>("GamePanel/LogoClicked"), game.Content.Load<Texture2D>("GamePanel/LogoHovered"), Color.White, null, Shape.CIRCULAR, SpriteBatch, Game); openInGameMenu.UnclickPosition = new SwingButtonOpenMovement(); openInGameMenu.UnclickTimerLimit = 12; closeInGameMenu = new MSAnimatingButton( null, new CloseInGameMenu(), new Rectangle(639, 235, 111, 110), game.Content.Load<Texture2D>("GamePanel/Logo"), game.Content.Load<Texture2D>("GamePanel/LogoClicked"), game.Content.Load<Texture2D>("GamePanel/LogoHovered"), Color.White, null, Shape.CIRCULAR, SpriteBatch, Game); closeInGameMenu.UnclickPosition = new SwingButtonCloseMovement(); closeInGameMenu.UnclickTimerLimit = 12; closeInGameMenu.Visible = false; AddComponent(closeInGameMenu); AddComponent(openInGameMenu); AddComponent(moodManager.PovertyProgressBar); AddComponent(moodManager.EducationProgressBar); AddComponent(moodManager.GenderEqualityProgressBar); AddComponent(moodManager.ChildHealthProgressBar); AddComponent(moodManager.MaternalHealthProgressBar); AddComponent(moodManager.HivAidsProgressBar); AddComponent(moodManager.EnvironmentProgressBar); AddComponent(moodManager.GlobalPartnershipProgressBar); MSImageHolder translucentOverlay = new MSImageHolder ( new Rectangle(0, 0, 1024, 91), Game.Content.Load<Texture2D>("GamePanel/translucent"), SpriteBatch, Game ); AddComponent(translucentOverlay); Paused = false; MSStory.Init(district); load(); }