Inheritance: System.Windows.Controls.Separator
コード例 #1
0
 public void InsertFileTest()
 {
     RecentFileList target = new RecentFileList(); // TODO: Initialize to an appropriate value
     while (target.RecentFiles.Count >0)
         target.RemoveFile(target.RecentFiles[0]);
     
     string filepath = "C:\\test.txt", filepath2 = "C:\\TesT.txt", filepath3 = "C:\\hallowelt.txt"; 
     target.InsertFile(filepath);
     Assert.AreEqual(1, target.BindableRecentFiles.Count());
     target.InsertFile(filepath2);
     Assert.AreEqual(1, target.BindableRecentFiles.Count());
     target.InsertFile(filepath3);
     Assert.AreEqual(2, target.BindableRecentFiles.Count());
 }
コード例 #2
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainWindow = ((WpfApp1.MainWindow)(target));

            #line 9 "..\..\MainWindow.xaml"
                this.mainWindow.Loaded += new System.Windows.RoutedEventHandler(this.TextEditLoad);

            #line default
            #line hidden
                return;

            case 2:
                this.RowDef1 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 3:
                this.RowDef2 = ((System.Windows.Controls.RowDefinition)(target));
                return;

            case 4:
                this.tabDynamic = ((System.Windows.Controls.TabControl)(target));

            #line 105 "..\..\MainWindow.xaml"
                this.tabDynamic.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.tabDynamic_SelectionChanged);

            #line default
            #line hidden
                return;

            case 6:
                this.Menu = ((System.Windows.Controls.Menu)(target));
                return;

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

            case 8:

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

            #line default
            #line hidden
                return;

            case 9:

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

            #line default
            #line hidden
                return;

            case 10:

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

            #line default
            #line hidden
                return;

            case 11:

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

            #line default
            #line hidden
                return;

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

            case 13:
                this.RecentFileList = ((Common.RecentFileList)(target));
                return;

            case 14:

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

            #line default
            #line hidden
                return;

            case 15:

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

            #line default
            #line hidden
                return;

            case 16:

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

            #line default
            #line hidden
                return;

            case 17:

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

            #line default
            #line hidden
                return;

            case 18:

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

            #line default
            #line hidden
                return;

            case 19:

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

            #line default
            #line hidden
                return;

            case 20:
                this.menuLanguage = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 21:
                this.ToolBarTray1 = ((System.Windows.Controls.ToolBarTray)(target));
                return;

            case 22:
                this.ToolBar1 = ((System.Windows.Controls.ToolBar)(target));
                return;

            case 23:
                this.But1 = ((System.Windows.Controls.Button)(target));

            #line 161 "..\..\MainWindow.xaml"
                this.But1.Click += new System.Windows.RoutedEventHandler(this.Open_Click);

            #line default
            #line hidden
                return;

            case 24:
                this.But2 = ((System.Windows.Controls.Button)(target));

            #line 166 "..\..\MainWindow.xaml"
                this.But2.Click += new System.Windows.RoutedEventHandler(this.Save_Click);

            #line default
            #line hidden
                return;

            case 25:
                this.But3 = ((System.Windows.Controls.Button)(target));

            #line 171 "..\..\MainWindow.xaml"
                this.But3.Click += new System.Windows.RoutedEventHandler(this.Print_Click);

            #line default
            #line hidden
                return;

            case 26:
                this.But4 = ((System.Windows.Controls.Button)(target));

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

            #line default
            #line hidden
                return;

            case 27:
                this.But5 = ((System.Windows.Controls.Button)(target));

            #line 181 "..\..\MainWindow.xaml"
                this.But5.Click += new System.Windows.RoutedEventHandler(this.Redo_Click);

            #line default
            #line hidden
                return;

            case 28:
                this.ToolBar2 = ((System.Windows.Controls.ToolBar)(target));
                return;

            case 29:
                this.ToolBar3 = ((System.Windows.Controls.ToolBar)(target));

            #line 196 "..\..\MainWindow.xaml"
                this.ToolBar3.AddHandler(System.Windows.Controls.Primitives.Selector.SelectionChangedEvent, new System.Windows.Controls.SelectionChangedEventHandler(this.ToolBar_SelectionChanged_1));

            #line default
            #line hidden
                return;

            case 30:
                this.fonts = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 31:
                this.fontSize = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 32:
                this.fontColor = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 33:
                this.fontColor2 = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 34:
                this.styleBox = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 35:
                this.styleCheck = ((System.Windows.Controls.CheckBox)(target));
                return;

            case 36:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: lhsail/Nitra
 private void RecentFileList_OnMenuClick(object sender, RecentFileList.MenuClickEventArgs e)
 {
     OpenSolution(e.Filepath);
 }
コード例 #4
0
        void System.Windows.Markup.IComponentConnector.Connect(int connectionId, object target)
        {
            switch (connectionId)
            {
            case 1:
                this.mainWindow = ((WpfApp1.MainWindow)(target));

            #line 8 "..\..\MainWindow.xaml"
                this.mainWindow.Loaded += new System.Windows.RoutedEventHandler(this.TextEditLoad);

            #line default
            #line hidden
                return;

            case 2:
                this.tabDynamic = ((System.Windows.Controls.TabControl)(target));

            #line 26 "..\..\MainWindow.xaml"
                this.tabDynamic.SelectionChanged += new System.Windows.Controls.SelectionChangedEventHandler(this.tabDynamic_SelectionChanged);

            #line default
            #line hidden
                return;

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

            case 5:

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

            #line default
            #line hidden
                return;

            case 6:

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

            #line default
            #line hidden
                return;

            case 7:

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

            #line default
            #line hidden
                return;

            case 8:

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

            #line default
            #line hidden
                return;

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

            case 10:
                this.RecentFileList = ((Common.RecentFileList)(target));
                return;

            case 11:

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

            #line default
            #line hidden
                return;

            case 12:

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

            #line default
            #line hidden
                return;

            case 13:

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

            #line default
            #line hidden
                return;

            case 14:

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

            #line default
            #line hidden
                return;

            case 15:

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

            #line default
            #line hidden
                return;

            case 16:

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

            #line default
            #line hidden
                return;

            case 17:
                this.menuLanguage = ((System.Windows.Controls.MenuItem)(target));
                return;

            case 18:

            #line 82 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Open_Click);

            #line default
            #line hidden
                return;

            case 19:

            #line 87 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Save_Click);

            #line default
            #line hidden
                return;

            case 20:

            #line 92 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Print_Click);

            #line default
            #line hidden
                return;

            case 21:

            #line 97 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Undo_Click);

            #line default
            #line hidden
                return;

            case 22:

            #line 102 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.Button)(target)).Click += new System.Windows.RoutedEventHandler(this.Redo_Click);

            #line default
            #line hidden
                return;

            case 23:

            #line 117 "..\..\MainWindow.xaml"
                ((System.Windows.Controls.ToolBar)(target)).AddHandler(System.Windows.Controls.Primitives.Selector.SelectionChangedEvent, new System.Windows.Controls.SelectionChangedEventHandler(this.ToolBar_SelectionChanged_1));

            #line default
            #line hidden
                return;

            case 24:
                this.fonts = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 25:
                this.fontSize = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 26:
                this.fontColor = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 27:
                this.fontColor2 = ((System.Windows.Controls.ComboBox)(target));
                return;

            case 28:
                this.label2 = ((System.Windows.Controls.Label)(target));
                return;
            }
            this._contentLoaded = true;
        }