Ejemplo n.º 1
0
 protected override void OnKeyDown(KeyEventArgs e)
 {
     if (e.KeyCode == Keys.Delete)
     {
         VirtualPaper.Clear();
     }
 }
Ejemplo n.º 2
0
        //Menu functions
        private void MenuItem_Open(object sender, RoutedEventArgs e)
        {
            Microsoft.Win32.OpenFileDialog OpenDialog = new Microsoft.Win32.OpenFileDialog();
            OpenDialog.DefaultExt = ".txt";
            OpenDialog.Filter     = notpad.Properties.Resources.FiletypeFilter;

            bool?result = OpenDialog.ShowDialog();

            if (result == true)
            {
                Paper.Clear();
                documentFilename = OpenDialog.FileName;
                ReadFromFile(documentFilename);
                Title = notpad.Properties.Resources.MainWIndowTitle + documentFilename;
            }
        }
Ejemplo n.º 3
0
 private void MenuItem_Close(object sender, RoutedEventArgs e)
 {
     Paper.Clear();
     documentFilename = notpad.Properties.Resources.NewTextFile;
     Title            = notpad.Properties.Resources.MainWIndowTitle + documentFilename;
 }