Esempio n. 1
0
            internal static void Search(RichEditBoxCore Core)
            {
                ApplicationDataContainer localSettings =
                    ApplicationData.Current.LocalSettings;
                string SelectionText = Core.Document.Selection.Text;
                string SearchEngine  = localSettings.Values["SearchEngine"].ToString();

                if ((SelectionText.StartsWith("http://") || SelectionText.StartsWith("https://")) && SelectionText.Contains("."))
                {
                    WebResources.Navigate(SelectionText);
                }
                else
                {
                    if (SearchEngine == "Bing")
                    {
                        WebResources.Navigate("https://www.bing.com/search?q=" + SelectionText);
                    }
                    else if (SearchEngine == "Google")
                    {
                        WebResources.Navigate("https://www.google.com/search?q=" + SelectionText);
                    }
                    else if (SearchEngine == "Yahoo")
                    {
                        WebResources.Navigate("https://search.yahoo.com/search?p=" + SelectionText);
                    }
                }
            }
Esempio n. 2
0
        public RichEditBoxPivotItem(Item listViewItem, RichEditBoxCore editBox)
        {
            listViewItem.PivotItem = this;
            _listViewItem          = listViewItem;

            Margin   = new Thickness(0, 0, 0, 0);
            Content  = editBox;
            _editBox = editBox;

            Padding = new Thickness(0, 0, 0, 0);
        }
Esempio n. 3
0
        public RichEditBoxPivotItem(TextBlock headerTextBlock, Item listViewItem, RichEditBoxCore editBox)
        {
            headerTextBlock.FontSize = 18;
            Header           = headerTextBlock;
            _headerTextBlock = headerTextBlock;

            headerTextBlock.CanDrag = true;

            listViewItem.PivotItem = this;
            _listViewItem          = listViewItem;

            Margin   = new Thickness(0, 0, 0, 0);
            Content  = editBox;
            _editBox = editBox;

            Padding = new Thickness(0, 0, 0, 0);
        }
Esempio n. 4
0
 public RichEditBoxCoreText(RichEditBoxCore core)
 {
     _core = core;
 }
Esempio n. 5
0
 public ICoreTextSelection(RichEditBoxCore core)
 {
     _core = core;
 }
Esempio n. 6
0
 public RichEditBoxCoreText(RichEditBoxCore core)
 {
     _core     = core;
     Selection = new ICoreTextSelection(_core);
 }
Esempio n. 7
0
 internal static void Lowercase(RichEditBoxCore Core)
 {
     Core.Document.Selection.ChangeCase(LetterCase.Lower);
 }
Esempio n. 8
0
 internal static void RemoveHighlight(RichEditBoxCore Core)
 {
     Core.Document.Selection.CharacterFormat.BackgroundColor =
         Colors.White;
 }
Esempio n. 9
0
 internal static void Highlight(RichEditBoxCore Core)
 {
     Core.Document.Selection.CharacterFormat.BackgroundColor =
         Colors.LimeGreen;
 }
Esempio n. 10
0
 internal static void SelectAll(RichEditBoxCore Core)
 {
     Core.CoreText.SelectAll();
 }
Esempio n. 11
0
 internal static void Paste(RichEditBoxCore Core)
 {
     Core.CoreText.Paste();
 }
Esempio n. 12
0
 internal static void Copy(RichEditBoxCore Core)
 {
     Core.CoreText.Copy();
 }
Esempio n. 13
0
 internal RichEditBoxMenuEvents(RichEditBoxCore Core)
 {
     _core = Core;
 }
Esempio n. 14
0
 internal static void Paste(RichEditBoxCore Core)
 {
     Core.Document.Selection.Paste(1);
 }
Esempio n. 15
0
 internal static void Copy(RichEditBoxCore Core)
 {
     Core.Document.Selection.Copy();
 }