Exemple #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;
         }
     
     }
 }
Exemple #2
0
        private void bn_AlignJustify_Click(object sender, RoutedEventArgs e)
        {
            yate.Focus();
            CurrentAlign = bn_AlignJustify;
            yate.cmdExecute(EditingCommands.AlignJustify);
 
        }
Exemple #3
0
 public void Switch(ButtonToggle bt)
 {
     bt.isChecked = !bt.isChecked;
 }
Exemple #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;
     }
 }