Browse Source
Conflicts: src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IConsoleTextEditor.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/IPythonFileService.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsoleCompletionData.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsoleTextEditor.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonConsoleTextEditorKeyEventArgs.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonFileService.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonNameCreationService.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonTextEditorViewContent.cs src/AddIns/BackendBindings/Python/PythonBinding/Project/Src/PythonWorkbench.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Console/InsertConsoleCompletionDataTestFixture.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Designer/NameCreationServiceTestFixture.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/DummySynchronizeInvoke.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockConsoleTextEditor.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockDesignerGenerator.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockPythonConsole.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockPythonFileService.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/MockWorkbench.cs src/AddIns/BackendBindings/Python/PythonBinding/Test/Utils/Tests/MockPythonFileServiceTestFixture.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/IRubyConsole.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/IRubyConsolePad.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/IRubyWorkbench.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/RubyConsoleCompletionDataProvider.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Project/Src/ThreadSafeRubyConsoleTextEditor.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Console/CodeCompletionTests.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Console/RubyConsoleTextEditorTests.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Console/ThreadSafeRubyConsoleTextEditorTests.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Utils/AddInPathHelper.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Utils/MockProjectContent.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Utils/MockRubyConsolePad.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Utils/Tests/AddInPathHelperTestFixture.cs src/AddIns/BackendBindings/Ruby/RubyBinding/Test/Utils/Tests/MockConsoleTextEditorTestFixture.cs src/AddIns/BackendBindings/Scripting/Project/Src/IScriptingConsoleTextEditor.cs src/AddIns/BackendBindings/Scripting/Project/Src/ScriptingConsoleTextEditor.cspull/1/head
4861 changed files with 10929 additions and 28808 deletions
@ -1,176 +0,0 @@
@@ -1,176 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<Template originator = "Mike Krueger" |
||||
created = "22/01/2003" |
||||
lastModified = "11/01/2006"> |
||||
|
||||
<!-- Template Header --> |
||||
<TemplateConfiguration> |
||||
<Name>${res:Templates.Project.Direct3DApplication.Name}</Name> |
||||
<Category>C#</Category> |
||||
<Subcategory>${res:Templates.File.Categories.WindowsApplications}</Subcategory> |
||||
<Icon>C#.Project.FullProject</Icon> |
||||
<Description>${res:Templates.Project.Direct3DApplication.Description}</Description> |
||||
<SupportedTargetFrameworks>v2.0</SupportedTargetFrameworks> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename = "MainClass.cs"/> |
||||
</Actions> |
||||
|
||||
<!-- Template Content --> |
||||
<Project language = "C#"> |
||||
<ProjectItems> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.Data" /> |
||||
<Reference Include="System.Drawing" /> |
||||
<Reference Include="System.Windows.Forms" /> |
||||
<Reference Include="System.Xml" /> |
||||
<Reference Include="Microsoft.DirectX" /> |
||||
<Reference Include="Microsoft.DirectX.Direct3D" /> |
||||
</ProjectItems> |
||||
|
||||
<PropertyGroup> |
||||
<OutputType>WinExe</OutputType> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
</PropertyGroup> |
||||
|
||||
<Files> |
||||
<File name="MainClass.cs"><![CDATA[${StandardHeader.C#} |
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.ComponentModel; |
||||
using System.Drawing; |
||||
using System.Windows.Forms; |
||||
|
||||
using Microsoft.DirectX; |
||||
using Microsoft.DirectX.Direct3D; |
||||
|
||||
namespace ${StandardNamespace} |
||||
{ |
||||
/// <summary> |
||||
/// This is the main class of my Direct3D application |
||||
/// </summary> |
||||
public class MainClass : Form |
||||
{ |
||||
/// <summary> |
||||
/// The rendering device |
||||
/// </summary> |
||||
Device device = null; |
||||
|
||||
public MainClass() |
||||
{ |
||||
this.ClientSize = new System.Drawing.Size(640, 480); |
||||
this.Text = "Direct3D Project"; |
||||
} |
||||
|
||||
public bool InitializeGraphics() |
||||
{ |
||||
try { |
||||
// Now let's setup the Direct3D stuff |
||||
PresentParameters presentParams = new PresentParameters(); |
||||
presentParams.Windowed = true; |
||||
presentParams.SwapEffect = SwapEffect.Discard; |
||||
|
||||
// Create the device |
||||
device = new Device(0, DeviceType.Hardware, this, CreateFlags.SoftwareVertexProcessing, presentParams); |
||||
|
||||
// Setup the event handlers for the device |
||||
device.DeviceLost += new EventHandler(this.InvalidateDeviceObjects); |
||||
device.DeviceReset += new EventHandler(this.RestoreDeviceObjects); |
||||
device.Disposing += new EventHandler(this.DeleteDeviceObjects); |
||||
device.DeviceResizing += new CancelEventHandler(this.EnvironmentResizing); |
||||
|
||||
return true; |
||||
} catch (DirectXException) { |
||||
return false; |
||||
} |
||||
} |
||||
|
||||
protected virtual void InvalidateDeviceObjects(object sender, EventArgs e) |
||||
{ |
||||
} |
||||
|
||||
protected virtual void RestoreDeviceObjects(object sender, EventArgs e) |
||||
{ |
||||
} |
||||
|
||||
protected virtual void DeleteDeviceObjects(object sender, EventArgs e) |
||||
{ |
||||
} |
||||
|
||||
protected virtual void EnvironmentResizing(object sender, CancelEventArgs e) |
||||
{ |
||||
} |
||||
|
||||
/// <summary> |
||||
/// This method moves the scene |
||||
/// </summary> |
||||
protected virtual void FrameMove() |
||||
{ |
||||
// TODO : Frame movement |
||||
} |
||||
|
||||
/// <summary> |
||||
/// This method renders the scene |
||||
/// </summary> |
||||
protected virtual void Render() |
||||
{ |
||||
if (device != null) { |
||||
device.Clear(ClearFlags.Target, Color.Blue, 1.0f, 0); |
||||
device.BeginScene(); |
||||
|
||||
// TODO : Scene rendering |
||||
|
||||
device.EndScene(); |
||||
device.Present(); |
||||
} |
||||
} |
||||
|
||||
/// <summary> |
||||
/// Our mainloop |
||||
/// </summary> |
||||
public void Run() |
||||
{ |
||||
// While the form is still valid, render and process messages |
||||
while (Created) { |
||||
FrameMove(); |
||||
Render(); |
||||
Application.DoEvents(); |
||||
} |
||||
} |
||||
|
||||
protected override void OnPaint(PaintEventArgs e) |
||||
{ |
||||
this.Render(); |
||||
} |
||||
|
||||
protected override void OnKeyPress(KeyPressEventArgs e) |
||||
{ |
||||
base.OnKeyPress(e); |
||||
if ((int)e.KeyChar == (int)System.Windows.Forms.Keys.Escape) { |
||||
this.Close(); |
||||
} |
||||
} |
||||
|
||||
/// <summary> |
||||
/// The main entry point for the application |
||||
/// </summary> |
||||
static void Main() |
||||
{ |
||||
using (MainClass mainClass = new MainClass()) { |
||||
if (!mainClass.InitializeGraphics()) { |
||||
MessageBox.Show("Error while initializing Direct3D"); |
||||
return; |
||||
} |
||||
mainClass.Show(); |
||||
mainClass.Run(); |
||||
} |
||||
} |
||||
} |
||||
} |
||||
]]></File> |
||||
<File name="Properties\AssemblyInfo.cs" src="DefaultAssemblyInfo.cs"/> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
@ -1,165 +0,0 @@
@@ -1,165 +0,0 @@
|
||||
<?xml version="1.0"?> |
||||
<Template originator = "Markus Palme" |
||||
created = "07/03/2004" |
||||
lastModified = "07/20/2005"> |
||||
|
||||
<!-- Template Header --> |
||||
<TemplateConfiguration> |
||||
<Name>${res:Templates.Project.Direct3DApplication.Name}</Name> |
||||
<Category>VBNet</Category> |
||||
<Subcategory>${res:Templates.File.Categories.WindowsApplications}</Subcategory> |
||||
<Icon>VBNet.Project.FullProject</Icon> |
||||
<Description>${res:Templates.Project.Direct3DApplication.Description}</Description> |
||||
<SupportedTargetFrameworks>v2.0</SupportedTargetFrameworks> |
||||
</TemplateConfiguration> |
||||
|
||||
<!-- Actions --> |
||||
<Actions> |
||||
<Open filename = "MainClass.vb"/> |
||||
</Actions> |
||||
|
||||
<!-- Template Content --> |
||||
<Project language="VBNet"> |
||||
<CreateActions> |
||||
<RunCommand path = "/SharpDevelop/BackendBindings/TemplateCommands/AddDotNet35ReferencesIfTargetFrameworkIs35"/> |
||||
</CreateActions> |
||||
|
||||
<ProjectItems> |
||||
<Reference Include="System" /> |
||||
<Reference Include="System.Data" /> |
||||
<Reference Include="System.Drawing" /> |
||||
<Reference Include="System.Windows.Forms" /> |
||||
<Reference Include="System.Xml" /> |
||||
<Reference Include="Microsoft.DirectX" /> |
||||
<Reference Include="Microsoft.DirectX.Direct3D" /> |
||||
|
||||
<Import Include="Microsoft.VisualBasic" /> |
||||
<Import Include="System" /> |
||||
<Import Include="System.Collections" /> |
||||
<Import Include="System.Collections.Generic" /> |
||||
<Import Include="System.Drawing" /> |
||||
<Import Include="System.Diagnostics" /> |
||||
<Import Include="System.Windows.Forms" /> |
||||
<Import Include="Microsoft.DirectX" /> |
||||
<Import Include="Microsoft.DirectX.Direct3D" /> |
||||
</ProjectItems> |
||||
|
||||
<PropertyGroup> |
||||
<OutputType>WinExe</OutputType> |
||||
<AppDesignerFolder>Properties</AppDesignerFolder> |
||||
<StartupObject>${StandardNamespace}.MainClass</StartupObject> |
||||
<OptionInfer>On</OptionInfer> |
||||
</PropertyGroup> |
||||
|
||||
<Files> |
||||
<File name="MainClass.vb"><![CDATA[${StandardHeader.VBNET} |
||||
Imports System.ComponentModel |
||||
|
||||
' This is the main class of my Direct3D application |
||||
Public Class MainClass |
||||
Inherits Form |
||||
|
||||
' The rendering device |
||||
Private device As Device |
||||
|
||||
Public Sub New() |
||||
Me.ClientSize = new System.Drawing.Size(640, 480) |
||||
Me.Text = "Direct3D Project" |
||||
End Sub |
||||
|
||||
Public Function InitializeGraphics() As Boolean |
||||
|
||||
Try |
||||
' Now let's setup the Direct3D stuff |
||||
Dim presentParams As New PresentParameters() |
||||
presentParams.Windowed = true |
||||
presentParams.SwapEffect = SwapEffect.Discard |
||||
|
||||
' Create the device |
||||
device = new Device(0, DeviceType.Hardware, Me, CreateFlags.SoftwareVertexProcessing, presentParams) |
||||
|
||||
' Setup the event handlers for the device |
||||
AddHandler device.DeviceLost, AddressOf InvalidateDeviceObjects |
||||
AddHandler device.DeviceReset, AddressOf RestoreDeviceObjects |
||||
AddHandler device.Disposing, AddressOf DeleteDeviceObjects |
||||
AddHandler device.DeviceResizing, AddressOf EnvironmentResizing |
||||
|
||||
return True |
||||
Catch ex As DirectXException |
||||
Return False |
||||
End Try |
||||
End Function |
||||
|
||||
Protected Overridable Sub InvalidateDeviceObjects(sender As Object, e As EventArgs) |
||||
|
||||
End Sub |
||||
|
||||
Protected Overridable Sub RestoreDeviceObjects(sender As Object, e As EventArgs) |
||||
|
||||
End Sub |
||||
|
||||
Protected Overridable Sub DeleteDeviceObjects(sender As Object, e As EventArgs) |
||||
|
||||
End Sub |
||||
|
||||
Protected Overridable Sub EnvironmentResizing(sender As Object, e As CancelEventArgs) |
||||
|
||||
End Sub |
||||
|
||||
' This method moves the scene |
||||
Protected Overridable Sub FrameMove() |
||||
' TODO : Frame movement |
||||
End Sub |
||||
|
||||
' This method renders the scene |
||||
Protected Overridable Sub Render() |
||||
If Not device Is Nothing Then |
||||
device.Clear(ClearFlags.Target, Color.Blue, 1.0f, 0) |
||||
device.BeginScene() |
||||
|
||||
' TODO : Scene rendering |
||||
|
||||
device.EndScene() |
||||
device.Present() |
||||
End If |
||||
End Sub |
||||
|
||||
' Our mainloop |
||||
Public Sub Run() |
||||
' While the form is still valid, render and process messages |
||||
Do While Created |
||||
FrameMove() |
||||
Render() |
||||
Application.DoEvents() |
||||
Loop |
||||
End Sub |
||||
|
||||
Protected Overrides Sub OnPaint(e As PaintEventArgs) |
||||
Me.Render() |
||||
End Sub |
||||
|
||||
Protected Overrides Sub OnKeyPress(e As KeyPressEventArgs) |
||||
MyBase.OnKeyPress(e) |
||||
If AscW(e.KeyChar) = CInt(Keys.Escape) Then |
||||
Close() |
||||
End If |
||||
End Sub |
||||
|
||||
' The main entry point for the application |
||||
Shared Sub Main() |
||||
Dim mainClass As New MainClass() |
||||
|
||||
If Not mainClass.InitializeGraphics() Then |
||||
MessageBox.Show("Error while initializing Direct3D") |
||||
Return |
||||
End If |
||||
|
||||
mainClass.Show() |
||||
mainClass.Run() |
||||
End Sub |
||||
End Class |
||||
]]></File> |
||||
<File name="Properties\AssemblyInfo.vb" src="DefaultAssemblyInfo.vb"/> |
||||
</Files> |
||||
</Project> |
||||
</Template> |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue