コード例 #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);
                    }
                }
            }
コード例 #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);
        }
コード例 #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);
        }
コード例 #4
0
 public RichEditBoxCoreText(RichEditBoxCore core)
 {
     _core = core;
 }
コード例 #5
0
 public ICoreTextSelection(RichEditBoxCore core)
 {
     _core = core;
 }
コード例 #6
0
 public RichEditBoxCoreText(RichEditBoxCore core)
 {
     _core     = core;
     Selection = new ICoreTextSelection(_core);
 }
コード例 #7
0
 internal static void Lowercase(RichEditBoxCore Core)
 {
     Core.Document.Selection.ChangeCase(LetterCase.Lower);
 }
コード例 #8
0
 internal static void RemoveHighlight(RichEditBoxCore Core)
 {
     Core.Document.Selection.CharacterFormat.BackgroundColor =
         Colors.White;
 }
コード例 #9
0
 internal static void Highlight(RichEditBoxCore Core)
 {
     Core.Document.Selection.CharacterFormat.BackgroundColor =
         Colors.LimeGreen;
 }
コード例 #10
0
 internal static void SelectAll(RichEditBoxCore Core)
 {
     Core.CoreText.SelectAll();
 }
コード例 #11
0
 internal static void Paste(RichEditBoxCore Core)
 {
     Core.CoreText.Paste();
 }
コード例 #12
0
 internal static void Copy(RichEditBoxCore Core)
 {
     Core.CoreText.Copy();
 }
コード例 #13
0
 internal RichEditBoxMenuEvents(RichEditBoxCore Core)
 {
     _core = Core;
 }
コード例 #14
0
ファイル: RichEditBoxMenu.cs プロジェクト: Deltaecho1/textie
 internal static void Paste(RichEditBoxCore Core)
 {
     Core.Document.Selection.Paste(1);
 }
コード例 #15
0
ファイル: RichEditBoxMenu.cs プロジェクト: Deltaecho1/textie
 internal static void Copy(RichEditBoxCore Core)
 {
     Core.Document.Selection.Copy();
 }