Exemplo n.º 1
0
 private void CallBookmarkEvent(BLL.quran_data.bookmarkext Bookmark)
 {
     // Event will be null if there are no subscribers
     if (BookmarkSelectEvent != null)
     {
         BookmarkSelectEvent(Bookmark);
     }
 }
Exemplo n.º 2
0
        void CtlBookmark_BookmarkSelectEvent(BLL.quran_data.bookmarkext Bookmark)
        {
            CurrentState.Juz = Bookmark.juz;
            CurrentState.CtlSurah.LoadSurah(CurrentState.Juz);
            //setup expander juz
            var Jz = BLL.quran_data.getJuz(CurrentState.Juz);

            setExpanderTitle(ExpanderJuz, "Juzlbl", "Selected Juz: " + Jz.idx + ". " + Jz.name);
            //load surah and ayah
            LoadSpecificSurah(Bookmark.surah, Bookmark.ayah);
            CurrentState.CtlAyah.SetItemAyah(CurrentState.Ayah - 1, Brushes.Red, true, false);
        }
Exemplo n.º 3
0
        private void DelBtn_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult dialogResult = MessageBox.Show("Are you sure to delete this bookmark", "Delete Bookmark Confirmation",
                                                            MessageBoxButton.YesNo);

            if (dialogResult != MessageBoxResult.Yes)
            {
                return;
            }
            BLL.quran_data.bookmarkext seldata = (BLL.quran_data.bookmarkext)((Button)sender).DataContext;

            BLL.quran_data.DeleteBookmark(seldata);
            LoadBookmark();
        }
Exemplo n.º 4
0
        void AddBookmark(bool Prompt)
        {
            string Judul = DateTime.Now.ToString("dd-MMM-yy HH:mm");

            if (Prompt)
            {
                var    selSurah = BLL.quran_data.getSurah(CurrentState.Surah);
                string NewJudul = Microsoft.VisualBasic.Interaction.InputBox(string.Format("Please type bookmark title for {0} : {1}", selSurah.latin, CurrentState.Ayah), "Add Bookmark", Judul);
                if (string.IsNullOrEmpty(NewJudul))
                {
                    return;
                }
                Judul = NewJudul;
            }
            QFE.BLL.quran_data.bookmarkext item = new BLL.quran_data.bookmarkext()
            {
                juz   = CurrentState.Juz,
                surah = CurrentState.Surah,
                ayah  = CurrentState.Ayah,
                title = Judul
            };
            BLL.quran_data.InsertBookmark(item);
            CurrentState.CtlBookmark.LoadBookmark();
        }
Exemplo n.º 5
0
 void AddBookmark(bool Prompt)
 {
     string Judul = DateTime.Now.ToString("dd-MMM-yy HH:mm");
     if (Prompt)
     {
         var selSurah = BLL.quran_data.getSurah(CurrentState.Surah);
         string NewJudul = Microsoft.VisualBasic.Interaction.InputBox(string.Format("Please type bookmark title for {0} : {1}",selSurah.latin,CurrentState.Ayah), "Add Bookmark", Judul);
         if (string.IsNullOrEmpty(NewJudul)) return;
         Judul = NewJudul;
     }
     QFE.BLL.quran_data.bookmarkext item = new BLL.quran_data.bookmarkext(){
     juz = CurrentState.Juz,
     surah = CurrentState.Surah,
     ayah = CurrentState.Ayah,
     title = Judul};
     BLL.quran_data.InsertBookmark(item);
     CurrentState.CtlBookmark.LoadBookmark();
 }