Browse Source

Form.Visible property now loaded/generated in python forms designer.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3847 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 17 years ago
parent
commit
fcaaf311f8
  1. 3
      src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonControlDefaultPropertyValues.cs
  2. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateAccessibleRoleFormTestFixture.cs
  3. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateAutoScaleModeFormTestFixture.cs
  4. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateAutoScrollFormTestFixture.cs
  5. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateCursorFormTestFixture.cs
  6. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateSimpleFormTestFixture.cs
  7. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GeneratorMergeFindsInitializeComponentsTestFixture.cs
  8. 17
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/IsDefaultPropertyValueTests.cs
  9. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/MergeFormTestFixture.cs
  10. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/NoNewLineAfterInitializeComponentTestFixture.cs
  11. 1
      src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/TextEditorIndentPassedToGeneratorTestFixture.cs

3
src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonControlDefaultPropertyValues.cs

@ -26,6 +26,7 @@ namespace ICSharpCode.PythonBinding @@ -26,6 +26,7 @@ namespace ICSharpCode.PythonBinding
defaultPropertyValues.Add("Text", new PythonControlTextProperty());
defaultPropertyValues.Add("AutoValidate", new PythonControlAutoValidateProperty());
defaultPropertyValues.Add("Enabled", new PythonControlBooleanProperty(true));
defaultPropertyValues.Add("Visible", new PythonControlBooleanProperty(true));
defaultPropertyValues.Add("AutoScaleMode", new PythonControlAutoScaleModeProperty());
defaultPropertyValues.Add("DoubleBuffered", new PythonControlBooleanProperty(false));
defaultPropertyValues.Add("ImeMode", new PythonControlImeModeProperty());
@ -93,8 +94,6 @@ namespace ICSharpCode.PythonBinding @@ -93,8 +94,6 @@ namespace ICSharpCode.PythonBinding
if (propertyInfo.Name == "BackColor") {
// Default is Control.DefaultBackColor
return true;
} else if (propertyInfo.Name == "Visible") {
return true;
} else if (propertyInfo.Name == "Icon") {
return true;
} else if (propertyInfo.Name == "Location") {

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateAccessibleRoleFormTestFixture.cs

@ -44,6 +44,7 @@ namespace PythonBinding.Tests.Designer @@ -44,6 +44,7 @@ namespace PythonBinding.Tests.Designer
" self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
" self.AccessibleRole = System.Windows.Forms.AccessibleRole.None\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Visible = False\r\n" +
" self.ResumeLayout(False)\r\n" +
" self.PerformLayout()\r\n";

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateAutoScaleModeFormTestFixture.cs

@ -56,6 +56,7 @@ namespace PythonBinding.Tests.Designer @@ -56,6 +56,7 @@ namespace PythonBinding.Tests.Designer
" self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
" self.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Visible = False\r\n" +
" self.ResumeLayout(False)\r\n" +
" self.PerformLayout()\r\n";

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateAutoScrollFormTestFixture.cs

@ -44,6 +44,7 @@ namespace PythonBinding.Tests.Designer @@ -44,6 +44,7 @@ namespace PythonBinding.Tests.Designer
" self.AutoScroll = True\r\n" +
" self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Visible = False\r\n" +
" self.ResumeLayout(False)\r\n" +
" self.PerformLayout()\r\n";

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateCursorFormTestFixture.cs

@ -44,6 +44,7 @@ namespace PythonBinding.Tests.Designer @@ -44,6 +44,7 @@ namespace PythonBinding.Tests.Designer
" self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
" self.Cursor = System.Windows.Forms.Cursors.Help\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Visible = False\r\n" +
" self.ResumeLayout(False)\r\n" +
" self.PerformLayout()\r\n";

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GenerateSimpleFormTestFixture.cs

@ -42,6 +42,7 @@ namespace PythonBinding.Tests.Designer @@ -42,6 +42,7 @@ namespace PythonBinding.Tests.Designer
" # \r\n" +
" self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Visible = False\r\n" +
" self.ResumeLayout(False)\r\n" +
" self.PerformLayout()\r\n";

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/GeneratorMergeFindsInitializeComponentsTestFixture.cs

@ -96,6 +96,7 @@ namespace PythonBinding.Tests.Designer @@ -96,6 +96,7 @@ namespace PythonBinding.Tests.Designer
"\t\t# \r\n" +
"\t\tself.ClientSize = System.Drawing.Size(499, 309)\r\n" +
"\t\tself.Name = \"MainForm\"\r\n" +
"\t\tself.Visible = False\r\n" +
"\t\tself.ResumeLayout(False)\r\n" +
"\t\tself.PerformLayout()\r\n";

17
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/IsDefaultPropertyValueTests.cs

@ -124,5 +124,22 @@ namespace PythonBinding.Tests.Designer @@ -124,5 +124,22 @@ namespace PythonBinding.Tests.Designer
form.Cursor = Cursors.Help;
Assert.IsFalse(defaultPropertyValues.IsDefaultValue("Cursor", form));
}
[Test]
public void VisiblePropertyDefaultIsTrue()
{
PropertyDescriptorCollection descriptors = TypeDescriptor.GetProperties(form);
PropertyDescriptor namePropertyDescriptor = descriptors.Find("Visible", false);
namePropertyDescriptor.SetValue(form, true);
Assert.IsTrue(defaultPropertyValues.IsDefaultValue("Visible", form));
}
[Test]
public void VisiblePropertyIsFalse()
{
form.Visible = false;
Assert.IsFalse(defaultPropertyValues.IsDefaultValue("Visible", form));
}
}
}

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/MergeFormTestFixture.cs

@ -75,6 +75,7 @@ namespace PythonBinding.Tests.Designer @@ -75,6 +75,7 @@ namespace PythonBinding.Tests.Designer
"\t\t# \r\n" +
"\t\tself.ClientSize = System.Drawing.Size(499, 309)\r\n" +
"\t\tself.Name = \"MainForm\"\r\n" +
"\t\tself.Visible = False\r\n" +
"\t\tself.ResumeLayout(False)\r\n" +
"\t\tself.PerformLayout()\r\n";
}

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/NoNewLineAfterInitializeComponentTestFixture.cs

@ -63,6 +63,7 @@ namespace PythonBinding.Tests.Designer @@ -63,6 +63,7 @@ namespace PythonBinding.Tests.Designer
"\t\t# \r\n" +
"\t\tself.ClientSize = System.Drawing.Size(499, 309)\r\n" +
"\t\tself.Name = \"MainForm\"\r\n" +
"\t\tself.Visible = False\r\n" +
"\t\tself.ResumeLayout(False)\r\n" +
"\t\tself.PerformLayout()\r\n";

1
src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/TextEditorIndentPassedToGeneratorTestFixture.cs

@ -77,6 +77,7 @@ namespace PythonBinding.Tests.Designer @@ -77,6 +77,7 @@ namespace PythonBinding.Tests.Designer
" # \r\n" +
" self.ClientSize = System.Drawing.Size(284, 264)\r\n" +
" self.Name = \"MainForm\"\r\n" +
" self.Visible = False\r\n" +
" self.ResumeLayout(False)\r\n" +
" self.PerformLayout()\r\n";

Loading…
Cancel
Save