Exemple #1
0
            public Letter(
                RichTextEdit InParent,
                Char InValue)
                : base(InParent)
            {
                Label = new TextBlock();

                Item = Label;

                Label.VerticalAlignment = VerticalAlignment.Top;
                Label.HorizontalAlignment = HorizontalAlignment.Left;
                Label.Margin = new Thickness(0, 0, 0, 0);

                Value = InValue;

                Label.FontFamily = InParent.FontFamily;
                Label.FontStyle = InParent.FontStyle;
                Label.FontWeight = InParent.FontWeight;
                FontSize = InParent.FontSize;
                Alignment = InParent.TextAlignment;
                Foreground = InParent.FontForeground;
                Background = InParent.FontBackground;

                Label.Text = new String(Value, 1);
                IsSpace = Char.IsSeparator(Value);
                TextAttributes = InParent.TextAttributes;
            }
Exemple #2
0
            public LineItem(RichTextEdit InParent)
            {
                HorizontalAlignment = HorizontalAlignment.Left;
                VerticalAlignment = VerticalAlignment.Top;
                Margin = new Thickness(0, 0, 0, 0);

                ReadState();

                m_RichText = InParent;
                SizeChanged += new SizeChangedEventHandler(LineItem_SizeChanged);
                TextAttributes = InParent.TextAttributes;

                Foreground = InParent.FontForeground;
                Background = InParent.FontBackground;

                InternalUpdateSelection();
            }
Exemple #3
0
            public LineItem(
                RichTextEdit InParent,
                ControlCode InCode)
                : this(InParent)
            {
                Code = InCode;

                if (Code == ControlCode.Item)
                {
                    Item = EnumIcon.CreateImage();
                }
                else
                    Height = 20;
            }
Exemple #4
0
 public void InitializeComponent() {
     if (_contentLoaded) {
         return;
     }
     _contentLoaded = true;
     System.Windows.Application.LoadComponent(this, new System.Uri("/RichText;component/Page.xaml", System.UriKind.Relative));
     this.LayoutRoot = ((System.Windows.Controls.Grid)(this.FindName("LayoutRoot")));
     this.LIST_Weight = ((System.Windows.Controls.ListBox)(this.FindName("LIST_Weight")));
     this.LIST_Align = ((System.Windows.Controls.ListBox)(this.FindName("LIST_Align")));
     this.LIST_Border = ((System.Windows.Controls.ListBox)(this.FindName("LIST_Border")));
     this.LIST_Size = ((System.Windows.Controls.ListBox)(this.FindName("LIST_Size")));
     this.List_Family = ((System.Windows.Controls.ListBox)(this.FindName("List_Family")));
     this.LIST_Stretch = ((System.Windows.Controls.ListBox)(this.FindName("LIST_Stretch")));
     this.LIST_Color = ((System.Windows.Controls.ListBox)(this.FindName("LIST_Color")));
     this.RBN_SelBack = ((System.Windows.Controls.RadioButton)(this.FindName("RBN_SelBack")));
     this.RBN_SelFore = ((System.Windows.Controls.RadioButton)(this.FindName("RBN_SelFore")));
     this.RBN_TextFore = ((System.Windows.Controls.RadioButton)(this.FindName("RBN_TextFore")));
     this.RBN_CurFore = ((System.Windows.Controls.RadioButton)(this.FindName("RBN_CurFore")));
     this.RBN_TextBack = ((System.Windows.Controls.RadioButton)(this.FindName("RBN_TextBack")));
     this.LABEL_Binary = ((System.Windows.Controls.TextBlock)(this.FindName("LABEL_Binary")));
     this.BTN_Replace = ((System.Windows.Controls.Button)(this.FindName("BTN_Replace")));
     this.BTN_Deserialize = ((System.Windows.Controls.Button)(this.FindName("BTN_Deserialize")));
     this.BTN_Close = ((System.Windows.Controls.Button)(this.FindName("BTN_Close")));
     this.BTN_Serialize = ((System.Windows.Controls.Button)(this.FindName("BTN_Serialize")));
     this.EDIT_Find = ((System.Windows.Controls.TextBox)(this.FindName("EDIT_Find")));
     this.BTN_FindNext = ((System.Windows.Controls.Button)(this.FindName("BTN_FindNext")));
     this.BTN_Item = ((System.Windows.Controls.Button)(this.FindName("BTN_Item")));
     this.BTN_Enter = ((System.Windows.Controls.Button)(this.FindName("BTN_Enter")));
     this.BTN_Indent = ((System.Windows.Controls.Button)(this.FindName("BTN_Indent")));
     this.CHK_Sup = ((System.Windows.Controls.CheckBox)(this.FindName("CHK_Sup")));
     this.CHK_Sub = ((System.Windows.Controls.CheckBox)(this.FindName("CHK_Sub")));
     this.CHK_Italic = ((System.Windows.Controls.CheckBox)(this.FindName("CHK_Italic")));
     this.CHK_Underlined = ((System.Windows.Controls.CheckBox)(this.FindName("CHK_Underlined")));
     this.BTN_Find = ((System.Windows.Controls.Button)(this.FindName("BTN_Find")));
     this.BTN_Paste = ((System.Windows.Controls.Button)(this.FindName("BTN_Paste")));
     this.BTN_Insert_TextBox = ((System.Windows.Controls.Button)(this.FindName("BTN_Insert_TextBox")));
     this.BTN_Copy = ((System.Windows.Controls.Button)(this.FindName("BTN_Copy")));
     this.BTN_Insert_Button = ((System.Windows.Controls.Button)(this.FindName("BTN_Insert_Button")));
     this.BTN_Insert_CheckBox = ((System.Windows.Controls.Button)(this.FindName("BTN_Insert_CheckBox")));
     this.BTN_Insert_Link = ((System.Windows.Controls.Button)(this.FindName("BTN_Insert_Link")));
     this.EDIT_Replace = ((System.Windows.Controls.TextBox)(this.FindName("EDIT_Replace")));
     this.CHK_ReadOnly = ((System.Windows.Controls.CheckBox)(this.FindName("CHK_ReadOnly")));
     this.BTN_Insert_RTO = ((System.Windows.Controls.Button)(this.FindName("BTN_Insert_RTO")));
     this.RichEdit = ((System.Windows.Controls.RichTextEdit)(this.FindName("RichEdit")));
 }
 public static void Apply(RichTextEdit InEdit)
 {
     for (int i = 0; i < RepList.Length; i++)
     {
         for (int x = 0; x < RepList[i].Macros.Length; x++)
         {
             InEdit.AddMacro(RepList[i].Macros[x], new Icon(i));
         }
     }
 }