Пример #1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            if (Id.Text.Equals("") || Naziv.Text.Equals(""))
            {
                MessageBox.Show("Neophodno je popuniti Id i Naziv!");
                Id.Focus();
                return;
            }

            foreach (TipLokala tl in this.Window.TipoviLokala)
            {
                if (tl.Id.Equals(Id.Text))
                {
                    System.Media.SystemSounds.Beep.Play();
                    MessageBox.Show("Uneseni Id je vec u upotrebi");
                    Id.Focus();
                    return;
                }
            }

            TipLokala tLokala;

            try
            {
                tLokala = new TipLokala(Id.Text, Naziv.Text, Opis.Text, IconPath.Equals("") ? "../../Data/icon.png" : IconPath);
            }catch
            {
                System.Media.SystemSounds.Beep.Play();
                MessageBox.Show("Doslo je do greske pri unosu");
                return;
            }
            this.Window.TipoviLokala.Add(tLokala);
            FileIO.UpisiLokal("tipoviLokala.bin", this.Window.TipoviLokala);
            this.Close();
        }
        public bool Equals(DestinyDerivedItemDefinition input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     ItemHash == input.ItemHash ||
                     (ItemHash.Equals(input.ItemHash))
                     ) &&
                 (
                     ItemName == input.ItemName ||
                     (ItemName != null && ItemName.Equals(input.ItemName))
                 ) &&
                 (
                     ItemDetail == input.ItemDetail ||
                     (ItemDetail != null && ItemDetail.Equals(input.ItemDetail))
                 ) &&
                 (
                     ItemDescription == input.ItemDescription ||
                     (ItemDescription != null && ItemDescription.Equals(input.ItemDescription))
                 ) &&
                 (
                     IconPath == input.IconPath ||
                     (IconPath != null && IconPath.Equals(input.IconPath))
                 ) &&
                 (
                     VendorItemIndex == input.VendorItemIndex ||
                     (VendorItemIndex.Equals(input.VendorItemIndex))
                 ));
        }
Пример #3
0
        public bool Equals(DestinyPerkReference input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     PerkHash == input.PerkHash ||
                     (PerkHash.Equals(input.PerkHash))
                     ) &&
                 (
                     IconPath == input.IconPath ||
                     (IconPath != null && IconPath.Equals(input.IconPath))
                 ) &&
                 (
                     IsActive == input.IsActive ||
                     (IsActive != null && IsActive.Equals(input.IsActive))
                 ) &&
                 (
                     Visible == input.Visible ||
                     (Visible != null && Visible.Equals(input.Visible))
                 ));
        }
Пример #4
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            SluzenjeAlkohola sluzenje = this.Window.Items[this.itemIndex].StatusSluzenjaAlkohola;

            switch (StatusSluzenjaAlkohola.Text)
            {
            case "Ne sluzi":
                sluzenje = SluzenjeAlkohola.NE_SLUZI;
                break;

            case "Sluzi do 23":
                sluzenje = SluzenjeAlkohola.SLUZI_DO_23;
                break;

            case "Sluzi nocu":
                sluzenje = SluzenjeAlkohola.SLUZI_NOCU;
                break;
            }

            KategorijeCena kat = this.Window.Items[this.itemIndex].KategorijaCene;

            switch (KategorijaCene.Text)
            {
            case "Niske":
                kat = KategorijeCena.NISKE;
                break;

            case "Srednje":
                kat = KategorijeCena.SREDNJE;
                break;

            case "Visoke":
                kat = KategorijeCena.VISOKE;
                break;

            case "Izuzetno visoke":
                kat = KategorijeCena.IZUZETNO_VISOKE;
                break;
            }
            var item = this.Window.Items[this.itemIndex];

            item.Id    = Id.Text;
            item.Naziv = Naziv.Text;
            item.Tip   = Tip.SelectedItem as TipLokala;
            item.StatusSluzenjaAlkohola = sluzenje;
            item.Ikonica = IconPath.Equals("") ? this.Window.Items[this.itemIndex].Ikonica : IconPath;
            item.DostupanHendikepiranim = DostupnoHendikepiranim.IsChecked ?? false;
            item.DozvoljenoPusenje      = DozvoljenoPusenje.IsChecked ?? false;
            item.PrimaRezervacije       = PrimaRezervacije.IsChecked ?? false;
            item.KategorijaCene         = kat;
            item.Kapacitet      = Int32.Parse(Kapacitet.Text);
            item.DatumOtvaranja = DatumOtvaranja.SelectedDate.GetValueOrDefault(DateTime.Now);
            item.UcitajIkonicu();
            FileIO.UpisiLokal(this.ActiveMap.Split('.')[0] + ".bin", this.Window.Items);
            this.Window.renderMap();
            this.Window.lvDataBinding.ItemsSource = this.Window.Items;
            this.Close();
        }
Пример #5
0
        public bool Equals(FireteamUserInfoCard input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     FireteamDisplayName == input.FireteamDisplayName ||
                     (FireteamDisplayName != null && FireteamDisplayName.Equals(input.FireteamDisplayName))
                     ) &&
                 (
                     FireteamMembershipType == input.FireteamMembershipType ||
                     (FireteamMembershipType != null && FireteamMembershipType.Equals(input.FireteamMembershipType))
                 ) &&
                 (
                     SupplementalDisplayName == input.SupplementalDisplayName ||
                     (SupplementalDisplayName != null && SupplementalDisplayName.Equals(input.SupplementalDisplayName))
                 ) &&
                 (
                     IconPath == input.IconPath ||
                     (IconPath != null && IconPath.Equals(input.IconPath))
                 ) &&
                 (
                     CrossSaveOverride == input.CrossSaveOverride ||
                     (CrossSaveOverride != null && CrossSaveOverride.Equals(input.CrossSaveOverride))
                 ) &&
                 (
                     ApplicableMembershipTypes == input.ApplicableMembershipTypes ||
                     (ApplicableMembershipTypes != null && ApplicableMembershipTypes.SequenceEqual(input.ApplicableMembershipTypes))
                 ) &&
                 (
                     IsPublic == input.IsPublic ||
                     (IsPublic != null && IsPublic.Equals(input.IsPublic))
                 ) &&
                 (
                     MembershipType == input.MembershipType ||
                     (MembershipType != null && MembershipType.Equals(input.MembershipType))
                 ) &&
                 (
                     MembershipId == input.MembershipId ||
                     (MembershipId.Equals(input.MembershipId))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayName == input.BungieGlobalDisplayName ||
                     (BungieGlobalDisplayName != null && BungieGlobalDisplayName.Equals(input.BungieGlobalDisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayNameCode == input.BungieGlobalDisplayNameCode ||
                     (BungieGlobalDisplayNameCode.Equals(input.BungieGlobalDisplayNameCode))
                 ));
        }
Пример #6
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            TipLokala lo = this.Id.SelectedItem as TipLokala;

            if (lo == null)
            {
                MessageBox.Show("Neophodno je odabrati postojeci tip!");
                return;
            }

            lo.Naziv   = Naziv.Text;
            lo.Opis    = Opis.Text;
            lo.Ikonica = IconPath.Equals("") ? lo.Ikonica : IconPath;
            FileIO.UpisiLokal("tipoviLokala.bin", this.Window.TipoviLokala);
            Window.ucitaj_ikonice();
            Window.renderMap();
            this.Close();
        }
Пример #7
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            foreach (Lokal lok in Window.Mapa1)
            {
                if (lok.Id.Equals(Id.Text))
                {
                    System.Media.SystemSounds.Beep.Play();
                    MessageBox.Show("Uneseni id je vec u upotrebi na Mapi1");
                    Id.Focus();
                    return;
                }
            }
            foreach (Lokal lok in Window.Mapa2)
            {
                if (lok.Id.Equals(Id.Text))
                {
                    System.Media.SystemSounds.Beep.Play();
                    MessageBox.Show("Uneseni id je vec u upotrebi na Mapi2");
                    Id.Focus();
                    return;
                }
            }
            foreach (Lokal lok in Window.Mapa3)
            {
                if (lok.Id.Equals(Id.Text))
                {
                    System.Media.SystemSounds.Beep.Play();
                    MessageBox.Show("Uneseni id je vec u upotrebi na Mapi3");
                    Id.Focus();
                    return;
                }
            }
            foreach (Lokal lok in Window.Mapa4)
            {
                if (lok.Id.Equals(Id.Text))
                {
                    System.Media.SystemSounds.Beep.Play();
                    MessageBox.Show("Uneseni id je vec u upotrebi na Mapi4");
                    Id.Focus();
                    return;
                }
            }
            SluzenjeAlkohola sluzenje = SluzenjeAlkohola.NE_SLUZI;

            switch (StatusSluzenjaAlkohola.Text)
            {
            case "Ne sluzi":
                sluzenje = SluzenjeAlkohola.NE_SLUZI;
                break;

            case "Sluzi do 23h":
                sluzenje = SluzenjeAlkohola.SLUZI_DO_23;
                break;

            case "Sluzi celu noc":
                sluzenje = SluzenjeAlkohola.SLUZI_NOCU;
                break;
            }

            KategorijeCena kat = KategorijeCena.NISKE;

            switch (KategorijaCene.Text)
            {
            case "Niske":
                kat = KategorijeCena.NISKE;
                break;

            case "Srednje":
                kat = KategorijeCena.SREDNJE;
                break;

            case "Visoke":
                kat = KategorijeCena.VISOKE;
                break;

            case "Veoma visoke":
                kat = KategorijeCena.IZUZETNO_VISOKE;
                break;
            }
            TipLokala tLokala = Tip.SelectedItem as TipLokala;
            Lokal     l       = null;

            try
            {
                l = new Lokal(Id.Text, Naziv.Text, tLokala, sluzenje, IconPath.Equals("") ? "" : IconPath, DostupnoHendikepiranim.IsChecked ?? false, DozvoljenoPusenje.IsChecked ?? false, PrimaRezervacije.IsChecked ?? false, kat, Int32.Parse(Kapacitet.Text), DatumOtvaranja.SelectedDate.GetValueOrDefault(DateTime.Now));
            }
            catch
            {
                System.Media.SystemSounds.Beep.Play();
                MessageBox.Show("Neke vrednosti nisu bile dobro unete");
                return;
            }
            l.Etikete = this.OdabraneEtikete;
            l.UcitajIkonicu();
            this.Items.Insert(0, l);
            FileIO.UpisiLokal(this.ActiveMap.Split('.')[0] + ".bin", this.Items);
            this.Close();
        }
Пример #8
0
        public bool Equals(DestinyProfileUserInfoCard input)
        {
            if (input == null)
            {
                return(false);
            }

            return
                ((
                     DateLastPlayed == input.DateLastPlayed ||
                     (DateLastPlayed != null && DateLastPlayed.Equals(input.DateLastPlayed))
                     ) &&
                 (
                     IsOverridden == input.IsOverridden ||
                     (IsOverridden != null && IsOverridden.Equals(input.IsOverridden))
                 ) &&
                 (
                     IsCrossSavePrimary == input.IsCrossSavePrimary ||
                     (IsCrossSavePrimary != null && IsCrossSavePrimary.Equals(input.IsCrossSavePrimary))
                 ) &&
                 (
                     PlatformSilver == input.PlatformSilver ||
                     (PlatformSilver != null && PlatformSilver.Equals(input.PlatformSilver))
                 ) &&
                 (
                     UnpairedGameVersions == input.UnpairedGameVersions ||
                     (UnpairedGameVersions.Equals(input.UnpairedGameVersions))
                 ) &&
                 (
                     SupplementalDisplayName == input.SupplementalDisplayName ||
                     (SupplementalDisplayName != null && SupplementalDisplayName.Equals(input.SupplementalDisplayName))
                 ) &&
                 (
                     IconPath == input.IconPath ||
                     (IconPath != null && IconPath.Equals(input.IconPath))
                 ) &&
                 (
                     CrossSaveOverride == input.CrossSaveOverride ||
                     (CrossSaveOverride != null && CrossSaveOverride.Equals(input.CrossSaveOverride))
                 ) &&
                 (
                     ApplicableMembershipTypes == input.ApplicableMembershipTypes ||
                     (ApplicableMembershipTypes != null && ApplicableMembershipTypes.SequenceEqual(input.ApplicableMembershipTypes))
                 ) &&
                 (
                     IsPublic == input.IsPublic ||
                     (IsPublic != null && IsPublic.Equals(input.IsPublic))
                 ) &&
                 (
                     MembershipType == input.MembershipType ||
                     (MembershipType != null && MembershipType.Equals(input.MembershipType))
                 ) &&
                 (
                     MembershipId == input.MembershipId ||
                     (MembershipId.Equals(input.MembershipId))
                 ) &&
                 (
                     DisplayName == input.DisplayName ||
                     (DisplayName != null && DisplayName.Equals(input.DisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayName == input.BungieGlobalDisplayName ||
                     (BungieGlobalDisplayName != null && BungieGlobalDisplayName.Equals(input.BungieGlobalDisplayName))
                 ) &&
                 (
                     BungieGlobalDisplayNameCode == input.BungieGlobalDisplayNameCode ||
                     (BungieGlobalDisplayNameCode.Equals(input.BungieGlobalDisplayNameCode))
                 ));
        }