Exemplo n.º 1
0
 private void Yate_PreviewKeyDown(object sender, KeyEventArgs e)
 {
     if (isCtrl())
     {
         switch (e.Key)
         {
             case Key.B:
                 Switch(bn_Bold);
                 break;
             case Key.I:
                 Switch(bn_Italic); 
                 break;
             case Key.U:
                 Switch(bn_Underline);
                 break;
             case Key.L:
                 CurrentAlign = bn_AlignLeft;
                 break;
             case Key.E:
                 CurrentAlign = bn_AlignCenter;
                 break;
             case Key.R:
                 CurrentAlign = bn_AlignRight;
                 break;
             case Key.J:
                 CurrentAlign = bn_AlignJustify;
                 break;
             case Key.Q:
                 tx_Search.Focus();
                 break;
         }
     }
     else if (isCtrlShift())
     {
         switch(e.Key)
         {
             case Key.L:
                 SwitchMarkerStyle(TextMarkerStyle.Disc);
                 break;
             case Key.N:
                 SwitchMarkerStyle(TextMarkerStyle.Decimal);
                 break;
         }
     
     }
 }
Exemplo n.º 2
0
        private void bn_AlignJustify_Click(object sender, RoutedEventArgs e)
        {
            yate.Focus();
            CurrentAlign = bn_AlignJustify;
            yate.cmdExecute(EditingCommands.AlignJustify);
 
        }
Exemplo n.º 3
0
 public void Switch(ButtonToggle bt)
 {
     bt.isChecked = !bt.isChecked;
 }
Exemplo n.º 4
0
 private void UpdateAlignState()
 {
     switch(yate.SelectionAligment)
     {
         case TextAlignment.Left: CurrentAlign = bn_AlignLeft; return;
         case TextAlignment.Center: CurrentAlign = bn_AlignCenter; return;
         case TextAlignment.Right: CurrentAlign = bn_AlignRight; return;
         case TextAlignment.Justify: CurrentAlign = bn_AlignJustify; return;
     }
 }