summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2025-12-23 11:56:17 +0000
committerIan C <ianc@noddybox.co.uk>2025-12-23 11:56:17 +0000
commit26b13195e6cd7f8e9c3639a745f6bc12a7bf3140 (patch)
tree3720e8a551fa384db4eeeff9cf49be684fa56eeb
parent2453274670f6eac472c1a83355fe6230ffb4f018 (diff)
Imported to VS and adjusted to work with seperate Program.csHEADmaster
-rwxr-xr-xGfxView/GfxView.csproj5
-rwxr-xr-xGfxView/GfxView.slnx2
-rw-r--r--GfxView/MainForm.cs (renamed from MainForm.cs)32
-rwxr-xr-xGfxView/Program.cs31
4 files changed, 31 insertions, 39 deletions
diff --git a/GfxView/GfxView.csproj b/GfxView/GfxView.csproj
index ef6b5bf..cce41f2 100755
--- a/GfxView/GfxView.csproj
+++ b/GfxView/GfxView.csproj
@@ -47,12 +47,9 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
- <Compile Include="Form1.cs">
+ <Compile Include="MainForm.cs">
<SubType>Form</SubType>
</Compile>
- <Compile Include="Form1.Designer.cs">
- <DependentUpon>Form1.cs</DependentUpon>
- </Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="Properties\Resources.resx">
diff --git a/GfxView/GfxView.slnx b/GfxView/GfxView.slnx
index 44c72d1..35ac2b7 100755
--- a/GfxView/GfxView.slnx
+++ b/GfxView/GfxView.slnx
@@ -1,3 +1,3 @@
<Solution>
- <Project Path="GfxView.csproj" />
+ <Project Path="GfxView.csproj" Id="d9b821df-8707-40b5-aca7-6285936d1beb" />
</Solution>
diff --git a/MainForm.cs b/GfxView/MainForm.cs
index 7eae71e..26008c7 100644
--- a/MainForm.cs
+++ b/GfxView/MainForm.cs
@@ -57,38 +57,6 @@ namespace GfxView
SetSize();
}
- [STAThread]
- public static void Main(string[] args)
- {
- string file=null;
-
- if (args.Length>0)
- {
- file=args[0];
- }
- else
- {
- OpenFileDialog fsel=new OpenFileDialog();
-
- if (fsel.ShowDialog()==DialogResult.OK)
- {
- file=fsel.FileName;
- }
- }
-
- if (file!=null)
- {
- try
- {
- Application.Run(new MainForm(file));
- }
- catch (Exception e)
- {
- MessageBox.Show(e.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
- }
- }
- }
-
#region Windows Forms Designer generated code
/// <summary>
/// This method is required for Windows Forms designer support.
diff --git a/GfxView/Program.cs b/GfxView/Program.cs
index 728e471..3e4b0bb 100755
--- a/GfxView/Program.cs
+++ b/GfxView/Program.cs
@@ -12,11 +12,38 @@ namespace GfxView
/// The main entry point for the application.
/// </summary>
[STAThread]
- static void Main()
+ static void Main(string[] args)
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
- Application.Run(new Form1());
+
+ string file=null;
+
+ if (args.Length>0)
+ {
+ file=args[0];
+ }
+ else
+ {
+ OpenFileDialog fsel=new OpenFileDialog();
+
+ if (fsel.ShowDialog()==DialogResult.OK)
+ {
+ file=fsel.FileName;
+ }
+ }
+
+ if (file!=null)
+ {
+ try
+ {
+ Application.Run(new MainForm(file));
+ }
+ catch (Exception e)
+ {
+ MessageBox.Show(e.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
+ }
+ }
}
}
}