You've already forked linux-packaging-mono
Imported Upstream version 5.2.0.175
Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
parent
4bdbaf4a88
commit
966bba02bb
@@ -105,22 +105,30 @@ namespace MonoTests.System.Windows.Forms
|
||||
f.Show ();
|
||||
|
||||
dgv.Columns.Add ("A1", "A1");
|
||||
Assert.AreEqual (0, dgv.Columns[0].Index, "A1");
|
||||
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B1");
|
||||
Assert.AreEqual (0, dgv.Columns[0].Index, "#1");
|
||||
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#2");
|
||||
Assert.AreEqual ("A1", dgv.Columns[0].Name, "#3");
|
||||
|
||||
|
||||
dgv.Columns.Add ("A2", "A2");
|
||||
Assert.AreEqual (0, dgv.Columns[0].Index, "A2");
|
||||
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B2");
|
||||
Assert.AreEqual (1, dgv.Columns[1].Index, "A3");
|
||||
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "B3");
|
||||
Assert.AreEqual (0, dgv.Columns[0].Index, "#10");
|
||||
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#11");
|
||||
Assert.AreEqual ("A1", dgv.Columns[0].Name, "#12");
|
||||
Assert.AreEqual (1, dgv.Columns[1].Index, "#13");
|
||||
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "#14");
|
||||
Assert.AreEqual ("A2", dgv.Columns[1].Name, "#15");
|
||||
|
||||
dgv.Columns.Insert (0, new DataGridViewTextBoxColumn ());
|
||||
Assert.AreEqual (0, dgv.Columns[0].Index, "A4");
|
||||
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "B4");
|
||||
Assert.AreEqual (1, dgv.Columns[1].Index, "A5");
|
||||
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "B5");
|
||||
Assert.AreEqual (2, dgv.Columns[2].Index, "A6");
|
||||
Assert.AreEqual (2, dgv.Columns[2].DisplayIndex, "B6");
|
||||
Assert.AreEqual (0, dgv.Columns[0].Index, "#20");
|
||||
Assert.AreEqual (0, dgv.Columns[0].DisplayIndex, "#21");
|
||||
Assert.AreEqual ("", dgv.Columns[0].Name, "#22");
|
||||
|
||||
Assert.AreEqual (1, dgv.Columns[1].Index, "#23");
|
||||
Assert.AreEqual (1, dgv.Columns[1].DisplayIndex, "#24");
|
||||
Assert.AreEqual ("A1", dgv.Columns[1].Name, "#25");
|
||||
Assert.AreEqual (2, dgv.Columns[2].Index, "#26");
|
||||
Assert.AreEqual (2, dgv.Columns[2].DisplayIndex, "#27");
|
||||
Assert.AreEqual ("A2", dgv.Columns[2].Name, "#28");
|
||||
|
||||
dgv.Columns.RemoveAt (1);
|
||||
Assert.AreEqual (0, dgv.Columns[0].Index, "A7");
|
||||
|
39
mcs/class/System.Windows.Forms/Test/simple/Program.cs
Normal file
39
mcs/class/System.Windows.Forms/Test/simple/Program.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// Program.cs
|
||||
//
|
||||
// Author:
|
||||
// Alexander Köplinger (alexander.koeplinger@xamarin.com)
|
||||
//
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining
|
||||
// a copy of this software and associated documentation files (the
|
||||
// "Software"), to deal in the Software without restriction, including
|
||||
// without limitation the rights to use, copy, modify, merge, publish,
|
||||
// distribute, sublicense, and/or sell copies of the Software, and to
|
||||
// permit persons to whom the Software is furnished to do so, subject to
|
||||
// the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be
|
||||
// included in all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
//
|
||||
|
||||
namespace SimpleTest {
|
||||
public static class Program {
|
||||
public static int Main ()
|
||||
{
|
||||
// use the simplest WinForms code that invokes the XplatUI
|
||||
// and causes the X connection to be established, if this fails
|
||||
// then something is seriously wrong
|
||||
System.Windows.Forms.Application.Idle += null;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user