コード例 #1
0
        /// <summary>
        /// Constructor which loads a known Bible version <c>XDocument</c> and sets metadata about it.
        /// </summary>
        /// <param name="fileName">The Bible version file name wanted to load.</param>
        public BibleVersion(string fileName)
        {
            FileName   = fileName;
            m_filePath = Path.Combine(Package.Current.InstalledLocation.Path, BibleLoader.BIBLE_PATH + "/" + fileName);

            // Set information from XML
            Language     = XDocument.Root.Element(Zefania.NDE_INFO).Element(Zefania.NDE_LANG).Value;
            Title        = XDocument.Root.Element(Zefania.NDE_INFO).Element(Zefania.NDE_TITLE).Value;
            Abbreviation = XDocument.Root.Element(Zefania.NDE_INFO).Element(Zefania.VERSION_ABBR).Value;

            // Find the book names in XML
            foreach (XElement element in XDocument.Descendants(Zefania.NDE_BIBLEBOOK))
            {
                BookNames.Add(element.Attribute(Zefania.ATTR_BOOKNAME).Value);
            }

            // Find the book short names in XML
            foreach (XElement element in XDocument.Descendants(Zefania.NDE_BIBLEBOOK))
            {
                BookAbbreviations.Add(element.Attribute(Zefania.ATTR_BOOKSHORTNAME).Value);
            }

            // Find the book numbers in XML
            foreach (XElement element in XDocument.Descendants(Zefania.NDE_BIBLEBOOK))
            {
                BookNumbers.Add(int.Parse(element.Attribute(Zefania.ATTR_BOOKNUM).Value));
            }
        }
コード例 #2
0
        public override async Task OnNavigatedToAsync(object parameter, NavigationMode mode, IDictionary <string, object> state)
        {
            //gets the requested character
            string url    = (string)parameter;
            var    client = new GoTService();

            CurrentCharacter = await client.GetCharacterByUrlAsync(url);

            //First we need to check if the father data exists, if yes, the app makes a new call to the API to get the father's name
            if (CurrentCharacter.Father != "")
            {
                Character father = await client.GetCharacterByUrlAsync(CurrentCharacter.Father);

                FatherName = father.Name;
            }

            if (CurrentCharacter.Mother != "")
            {
                Character mother = await client.GetCharacterByUrlAsync(CurrentCharacter.Mother);

                MotherName = mother.Name;
            }

            if (CurrentCharacter.Spouse != "")
            {
                Character spouse = await client.GetCharacterByUrlAsync(CurrentCharacter.Spouse);

                SpouseName = spouse.Name;
            }

            foreach (var house in CurrentCharacter.Allegiances)
            {
                House h = await client.GetHouseByUrlAsync(house);

                //types are needed for navigation
                _allegiances.Add(h);
                //name is shown on the UI
                Allegiances.Add(h.Name);
            }

            foreach (var bookName in CurrentCharacter.Books)
            {
                Book b = await client.GetBookByUrlAsync(bookName);

                _books.Add(b);
                BookNames.Add(b.Name);
            }

            foreach (var povBookName in CurrentCharacter.PovBooks)
            {
                Book b = await client.GetBookByUrlAsync(povBookName);

                _povBooks.Add(b);
                PovBookNames.Add(b.Name);
            }

            await base.OnNavigatedToAsync(parameter, mode, state);
        }
コード例 #3
0
        internal ObservableCollection <BookInfo> GetBookInfo()
        {
            var bookInfo = new ObservableCollection <BookInfo>();

            for (int i = 0; i < BookNames.Count(); i++)
            {
                var book = new BookInfo()
                {
                    BookName = BookNames[i], BookDescription = BookDescriptions[i]
                };
                bookInfo.Add(book);
            }
            return(bookInfo);
        }
コード例 #4
0
        public PostavkeKnjizenjaPregledForm(BookNames knjiga)
        {
            InitializeComponent();
            _postavkeKnjizenja.Knjiga = knjiga.ToString();
            switch (knjiga)
            {
            case BookNames.Ura_odobrenje:
                PopulateComboBoxStupac(new KnjigaUra());
                break;

            case BookNames.Ura_trošak:
                PopulateComboBoxStupac(new KnjigaUra());
                break;

            case BookNames.Ura_repro:
                PopulateComboBoxStupac(new PrimkaRepro());
                break;

            case BookNames.Ura_primka:
                PopulateComboBoxStupac(new Primka());
                break;

            case BookNames.Ira:
                PopulateComboBoxStupac(new KnjigaIra());
                break;

            case BookNames.Place:
                PopulateComboBoxStupac(new Placa());
                break;

            case BookNames.Dodaci:
                PopulateComboBoxStupac(new Dodatak());
                break;

            case BookNames.Amortizacija:
                PopulateComboBoxStupac(new OsnovnoSredstvo());
                break;

            case BookNames.Vat:
                PopulateComboBoxStupac(new PdvStavke());
                break;

            default:
                break;
            }
            LoadDatagrid();
        }
コード例 #5
0
        internal ObservableCollection <ListViewBookInfo> GetBookInfo()
        {
            var bookInfo = new ObservableCollection <ListViewBookInfo>();

            for (int i = 0; i < BookNames.Count(); i++)
            {
                var book = new ListViewBookInfo()
                {
                    BookName        = BookNames[i],
                    BookDescription = BookDescriptions[i],
                    BookAuthor      = BookAuthers[i],
                    AuthorImage     = "Book" + i + ".png"
                };
                bookInfo.Add(book);
            }
            return(bookInfo);
        }
コード例 #6
0
        internal ObservableCollection <BookInfo> GenerateBookInfo()
        {
            var bookInfo = new ObservableCollection <BookInfo>();

            for (int i = 0; i < BookNames.Count(); i++)
            {
                var book = new BookInfo()
                {
                    BookName        = BookNames[i],
                    BookDescription = BookDescriptions[i],
                    BookAuthor      = BookAuthers[i],
                    AuthorImage     = ImageSource.FromResource("SfListViewSample.Images.Image" + i + ".png")
                };
                bookInfo.Add(book);
            }
            return(bookInfo);
        }
コード例 #7
0
 internal IEnumerable <BookInfo> GetBookInfo()
 {
     realm.Write(() =>
     {
         for (int i = 0; i < BookNames.Count(); i++)
         {
             var book = new BookInfo()
             {
                 BookName        = BookNames[i],
                 BookDescription = BookDescriptions[i],
                 BookAuthor      = BookAuthers[i],
             };
             realm.Add(book);
         }
     });
     return(realm.All <BookInfo>().AsRealmCollection());
 }
コード例 #8
0
        internal List <PostavkeKnjizenja> GetPostavkeKnjizenjaList(BookNames book)
        {
            List <DataRow> row = new DbDataGet()
                                 .GetTable(this, $"Knjiga='{book}'")
                                 .AsEnumerable()
                                 .ToList();

            return((from DataRow dRow in row
                    select new PostavkeKnjizenja()
            {
                Id = int.Parse(dRow["Id"].ToString()),
                Knjiga = dRow["Knjiga"].ToString(),
                Naziv_stupca = dRow["Naziv_stupca"].ToString(),
                Konto = dRow["Konto"].ToString(),
                Strana = dRow["Strana"].ToString(),
                Mijenja_predznak = dRow["Mijenja_predznak"].ToString() == "True"
            }).ToList());
        }
        internal ObservableCollection <ListViewBookInfo> GetBookInfo()
        {
            var bookInfo = new ObservableCollection <ListViewBookInfo>();

            var random = new Random();

            for (int i = 0; i < 20; i++)
            {
                var book = new ListViewBookInfo()
                {
                    BookName        = BookNames[random.Next(0, BookNames.Count() - 1)],
                    BookNumber      = i + 1,
                    BookDescription = BookDescriptions[random.Next(0, BookDescriptions.Count() - 1)],
                };
                bookInfo.Add(book);
            }
            return(bookInfo);
        }
コード例 #10
0
        internal ObservableCollection <ListViewBookInfo> GetBookInfo()
        {
            var bookInfo = new ObservableCollection <ListViewBookInfo>();

            var random = new Random();

            for (int i = 0; i < 500; i++)
            {
                var book = new ListViewBookInfo()
                {
                    BookName        = BookNames[random.Next(0, BookNames.Count() - 1)],
                    BookNumber      = i,
                    BookDescription = BookDescriptions[random.Next(0, BookDescriptions.Count() - 1)],
                    AuthorImage     = ImageSource.FromResource("AutoFitSample.Autofit.Image" + random.Next(0, BookNames.Count() - 1) + ".png")
                };
                bookInfo.Add(book);
            }
            return(bookInfo);
        }
        internal ObservableCollection <BookInfo> GetBookInfo()
        {
            var bookInfo = new ObservableCollection <BookInfo>();

            for (int i = 0; i < BookNames.Count(); i++)
            {
                var book = new BookInfo()
                {
                    BookName        = BookNames[i],
                    BookDescription = BookDescriptions[i],
                    BookAuthor      = BookAuthers[i],
                    AuthorImage     = ImageSource.FromResource("ListViewXamarin.Images.Image" + i + ".png"),
                };
                book.Tranformations.Add(new BlurredTransformation()
                {
                    Radius = 20
                });
                bookInfo.Add(book);
            }
            return(bookInfo);
        }
コード例 #12
0
        internal ObservableCollection <ListViewBookInfo> GetBookInfo()
        {
            var      bookInfo = new ObservableCollection <ListViewBookInfo>();
            Assembly assembly = typeof(AutoFitContent).GetTypeInfo().Assembly;

            for (int i = 0; i < BookNames.Count(); i++)
            {
                var book = new ListViewBookInfo()
                {
                    BookName        = BookNames[i],
                    BookDescription = BookDescriptions[i],
                    BookAuthor      = BookAuthers[i],
#if COMMONSB
                    AuthorImage = ImageSource.FromResource("SampleBrowser.Icons.Autofit.Image" + i + ".png", assembly)
#else
                    AuthorImage = ImageSource.FromResource("SampleBrowser.SfListView.Icons.Autofit.Image" + i + ".png", assembly)
#endif
                };
                bookInfo.Add(book);
            }
            return(bookInfo);
        }

        #endregion

        #region BookInfo

        string[] BookNames = new string[] {
            "Neural Networks Using C#",
            "C# Code Contracts",
            "Machine Learning Using C#",
            "Object-Oriented Programming in C#",
            "Visual Studio Code",
            "Android Programming",
            "iOS Succinctly",
            "Visual Studio 2015",
            "Xamarin.Forms",
            "Windows Store Apps",
            ".NET Core Succinctly",
            "Assembly Language",
            "SQL Server for C# Developers",
            "Entity Framework Code First",
            "Localization for .NET",
            "Developing Windows Services",
            "Data Structures",
            "Objective-C",
            "SciPy Programming",
            "Visual Studio 2017"
        };

        string[] BookDescriptions = new string[] {
            "Neural networks are an exciting field of software development used to calculate outputs from input data.",
            "Code Contracts provide a way to convey code assumptions in your .NET applications. In C# Code Contracts Succinctly, author Dirk Strauss explains how to use Code Contracts to validate logical correctness in code, how they can be integrated with abstract classes and interfaces, and even how they can be used to make writing documentation less painful.",
            "In Machine Learning Using C# Succinctly, you’ll learn several different approaches to applying machine learning to data analysis and prediction problems.",
            "Object-oriented programming is the de facto programming paradigm for many programming languages. Object-Oriented Programming in C# Succinctly provides an introduction to OOP for C# developers.",
            "Visual Studio Code is a powerful tool for editing code and serves as a complete environment for end-to-end programming. Alessandro Del Sole Visual Studio Code Succinctly will guide readers to mastery of this valuable tool so that they can make full use of its features.",
            "Ryan Hodson provides a useful overview of the Android application lifecycle.",
            "iOS Succinctly is for developers looking to step into the sometimes frightening world of iPhone and iPad app development. Written as the companion to Objective-C Succinctly, this e-book guides you from creating a simple, single page application to managing assets in a complex, multi-scene application.",
            "Microsoft Visual Studio 2015 is the new version of the widely-used integrated development environment for building modern, high-quality applications for a number of platforms such as Windows, the web, the cloud, and mobile devices.",
            "With the fragmented landscape of mobile device platforms, tools for creating cross-platform apps have sprung up as varied and numerous as apps themselves.",
            "Windows Store apps present a radical shift in Windows development.",
            "With .NET Core, cross-platform develop is easier and backward compatibility is no problem. Author Giancarlo Lelli guides you through the fundamentals of .NET Core in his latest book, .NET Core Succinctly. Within its pages you will learn to harness this open-source, cloud-optimized port of the .NET Framework for modern apps. ",
            "Assembly language is as close to writing machine code as you can get without writing in pure hexadecimal.",
            "Developers of C# applications with a SQL Server database can learn to connect to a database using classic ADO.NET and look at different methods of developing databases using the Entity Framework.",
            "Follow author Ricardo Peres as he introduces the newest development mode for Entity Framework, Code First.",
            "Learn to write applications that support different languages and cultures, with an emphasis on .NET development. With the help of author Jonas Gauffin, Localization for .NET Succinctly will help you become an effective developer in the global community. ",
            "Learn the basics of Windows Services and how to develop and deploy basic apps.",
            "Data Structures is your concise guide to skip lists, hash tables, heaps, priority queues, AVL trees, and B-trees.",
            "Objective-C Succinctly is the only book you need for getting started with Objective-C—the primary language beneath all Mac, iPad, and iPhone apps.",
            "James McCaffrey’s SciPy Programming Succinctly offers readers a quick, thorough grounding in knowledge of the Python open source extension SciPy. The SciPy library, accompanied by its interdependent NumPy, offers Python programmers advanced functions that work with arrays and matrices. Each section presents a complete sample program for programmers to experiment with, carefully chosen examples to best illustrate each function, and resources for further learning.",
            "The release of Visual Studio 2017 is another critical element in Microsoft’s pivot to the “any developer, any platform, any device”."
        };

        string[] BookAuthers = new string[] {
            "James McCaffrey",
            "Dirk Strauss",
            "James McCaffrey",
            "Sander Rossel",
            "Alessandro Del Sole",
            "Ryan Hodson",
            "Ryan Hodson",
            "Alessandro Del Sole",
            "Derek Jensen",
            "John Garland",
            "Ray Bradbury",
            "Nathaniel Hawthorne",
            "Joseph Conrad",
            "Mark Twain",
            "Pete Waite",
            "Mark Twain",
            "Joseph Heller",
            "Ernest Hemingway",
            "Mark Twain",
            "Neil Gaiman"
        };

        #endregion
    }
コード例 #13
0
 public KontoParovi(BookNames bookName)
 {
     Knjiga = bookName.ToString();
 }