コード例 #1
0
 private void New_Click(object sender, RoutedEventArgs e)
 {
     MainWindow newwindow = new MainWindow();
     newwindow.Show();
 }
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.App = ((NotePad.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.App.Closing += new System.ComponentModel.CancelEventHandler(this.App_Closing);

            #line default
            #line hidden

            #line 8 "..\..\MainWindow.xaml"
                this.App.KeyDown += new System.Windows.Input.KeyEventHandler(this.App_KeyDown);

            #line default
            #line hidden
                return;

            case 2:
                this.NewButton = ((System.Windows.Controls.MenuItem)(target));

            #line 14 "..\..\MainWindow.xaml"
                this.NewButton.Click += new System.Windows.RoutedEventHandler(this.NewButton_Click);

            #line default
            #line hidden
                return;

            case 3:
                this.OpenButton = ((System.Windows.Controls.MenuItem)(target));

            #line 15 "..\..\MainWindow.xaml"
                this.OpenButton.Click += new System.Windows.RoutedEventHandler(this.OpenButton_Click);

            #line default
            #line hidden
                return;

            case 4:
                this.SaveButton = ((System.Windows.Controls.MenuItem)(target));

            #line 16 "..\..\MainWindow.xaml"
                this.SaveButton.Click += new System.Windows.RoutedEventHandler(this.SaveButton_Click);

            #line default
            #line hidden
                return;

            case 5:
                this.SaveAsButton = ((System.Windows.Controls.MenuItem)(target));

            #line 17 "..\..\MainWindow.xaml"
                this.SaveAsButton.Click += new System.Windows.RoutedEventHandler(this.SaveAsButton_Click);

            #line default
            #line hidden
                return;

            case 6:
                this.ExitButton = ((System.Windows.Controls.MenuItem)(target));

            #line 19 "..\..\MainWindow.xaml"
                this.ExitButton.Click += new System.Windows.RoutedEventHandler(this.ExitButton_Click);

            #line default
            #line hidden
                return;

            case 7:
                this.UndoButton = ((System.Windows.Controls.MenuItem)(target));

            #line 23 "..\..\MainWindow.xaml"
                this.UndoButton.Click += new System.Windows.RoutedEventHandler(this.Undo_Click);

            #line default
            #line hidden
                return;

            case 8:
                this.CutButton = ((System.Windows.Controls.MenuItem)(target));

            #line 25 "..\..\MainWindow.xaml"
                this.CutButton.Click += new System.Windows.RoutedEventHandler(this.Cut_Click);

            #line default
            #line hidden
                return;

            case 9:
                this.CopyButton = ((System.Windows.Controls.MenuItem)(target));

            #line 26 "..\..\MainWindow.xaml"
                this.CopyButton.Click += new System.Windows.RoutedEventHandler(this.Copy_Click);

            #line default
            #line hidden
                return;

            case 10:
                this.PasteButton = ((System.Windows.Controls.MenuItem)(target));

            #line 27 "..\..\MainWindow.xaml"
                this.PasteButton.Click += new System.Windows.RoutedEventHandler(this.Paste_Click);

            #line default
            #line hidden
                return;

            case 11:
                this.DeleteButton = ((System.Windows.Controls.MenuItem)(target));

            #line 28 "..\..\MainWindow.xaml"
                this.DeleteButton.Click += new System.Windows.RoutedEventHandler(this.Delete_Click);

            #line default
            #line hidden
                return;

            case 12:
                this.SelectAllButton = ((System.Windows.Controls.MenuItem)(target));

            #line 29 "..\..\MainWindow.xaml"
                this.SelectAllButton.Click += new System.Windows.RoutedEventHandler(this.SelectAll_Click);

            #line default
            #line hidden
                return;

            case 13:
                this.wordwrapbutton = ((System.Windows.Controls.MenuItem)(target));

            #line 33 "..\..\MainWindow.xaml"
                this.wordwrapbutton.Click += new System.Windows.RoutedEventHandler(this.WordWrap_Click);

            #line default
            #line hidden
                return;

            case 14:

            #line 34 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Font_Click);

            #line default
            #line hidden
                return;

            case 15:
                this.SttsButton = ((System.Windows.Controls.MenuItem)(target));

            #line 37 "..\..\MainWindow.xaml"
                this.SttsButton.Click += new System.Windows.RoutedEventHandler(this.Status_Click);

            #line default
            #line hidden
                return;

            case 16:

            #line 39 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.MenuItem)(target)).Click += new System.Windows.RoutedEventHandler(this.Help_Click);

            #line default
            #line hidden
                return;

            case 17:
                this.SttsWindow = ((System.Windows.Controls.TextBlock)(target));
                return;

            case 18:
                this.scrll = ((System.Windows.Controls.ScrollViewer)(target));
                return;

            case 19:
                this.textbox = ((System.Windows.Controls.TextBox)(target));

            #line 47 "..\..\MainWindow.xaml"
                this.textbox.SelectionChanged += new System.Windows.RoutedEventHandler(this.textbox_SelectionChanged);

            #line default
            #line hidden
                return;
            }
            this._contentLoaded = true;
        }