presun
This commit is contained in:
6
LICENSE
6
LICENSE
@@ -208,8 +208,8 @@ If you develop a new program, and you want it to be of the greatest possible use
|
||||
|
||||
To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the “copyright” line and a pointer to where the full notice is found.
|
||||
|
||||
PodrazNG
|
||||
Copyright (C) 2026 toho
|
||||
podraz-ng
|
||||
Copyright (C) 2026 pohl
|
||||
|
||||
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
||||
|
||||
@@ -221,7 +221,7 @@ Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode:
|
||||
|
||||
PodrazNG Copyright (C) 2026 toho
|
||||
podraz-ng Copyright (C) 2026 pohl
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details.
|
||||
|
||||
|
||||
3
PodrazNG.slnx
Normal file
3
PodrazNG.slnx
Normal file
@@ -0,0 +1,3 @@
|
||||
<Solution>
|
||||
<Project Path="PodrazNG/PodrazNG.csproj" />
|
||||
</Solution>
|
||||
127
PodrazNG/Apps/Notepad/NotepadForm.Designer.cs
generated
Normal file
127
PodrazNG/Apps/Notepad/NotepadForm.Designer.cs
generated
Normal file
@@ -0,0 +1,127 @@
|
||||
namespace PodrazNG.Apps.Notepad
|
||||
{
|
||||
partial class NotepadForm
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
mnuNotepad = new MenuStrip();
|
||||
NotepadFile = new ToolStripMenuItem();
|
||||
NotepadFileNew = new ToolStripMenuItem();
|
||||
NotepadFileOpen = new ToolStripMenuItem();
|
||||
NotepadFileSave = new ToolStripMenuItem();
|
||||
NotepadFileSaveAs = new ToolStripMenuItem();
|
||||
NotepadFileExit = new ToolStripMenuItem();
|
||||
txtContent = new TextBox();
|
||||
mnuNotepad.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// mnuNotepad
|
||||
//
|
||||
mnuNotepad.AllowMerge = false;
|
||||
mnuNotepad.Items.AddRange(new ToolStripItem[] { NotepadFile });
|
||||
mnuNotepad.Location = new Point(0, 0);
|
||||
mnuNotepad.Name = "mnuNotepad";
|
||||
mnuNotepad.Size = new Size(583, 24);
|
||||
mnuNotepad.TabIndex = 0;
|
||||
mnuNotepad.Text = "menuStrip1";
|
||||
//
|
||||
// NotepadFile
|
||||
//
|
||||
NotepadFile.DropDownItems.AddRange(new ToolStripItem[] { NotepadFileNew, NotepadFileOpen, NotepadFileSave, NotepadFileSaveAs, NotepadFileExit });
|
||||
NotepadFile.Name = "NotepadFile";
|
||||
NotepadFile.Size = new Size(57, 20);
|
||||
NotepadFile.Text = "Soubor";
|
||||
//
|
||||
// NotepadFileNew
|
||||
//
|
||||
NotepadFileNew.Name = "NotepadFileNew";
|
||||
NotepadFileNew.Size = new Size(141, 22);
|
||||
NotepadFileNew.Text = "Nový";
|
||||
//
|
||||
// NotepadFileOpen
|
||||
//
|
||||
NotepadFileOpen.Name = "NotepadFileOpen";
|
||||
NotepadFileOpen.Size = new Size(141, 22);
|
||||
NotepadFileOpen.Text = "Otevřít";
|
||||
//
|
||||
// NotepadFileSave
|
||||
//
|
||||
NotepadFileSave.Name = "NotepadFileSave";
|
||||
NotepadFileSave.Size = new Size(141, 22);
|
||||
NotepadFileSave.Text = "Uložit";
|
||||
//
|
||||
// NotepadFileSaveAs
|
||||
//
|
||||
NotepadFileSaveAs.Name = "NotepadFileSaveAs";
|
||||
NotepadFileSaveAs.Size = new Size(141, 22);
|
||||
NotepadFileSaveAs.Text = "Uložit jako ...";
|
||||
//
|
||||
// NotepadFileExit
|
||||
//
|
||||
NotepadFileExit.Name = "NotepadFileExit";
|
||||
NotepadFileExit.Size = new Size(141, 22);
|
||||
NotepadFileExit.Text = "Konec";
|
||||
//
|
||||
// txtContent
|
||||
//
|
||||
txtContent.Anchor = AnchorStyles.Top | AnchorStyles.Bottom | AnchorStyles.Left | AnchorStyles.Right;
|
||||
txtContent.Font = new Font("Consolas", 11.25F, FontStyle.Regular, GraphicsUnit.Point, 238);
|
||||
txtContent.Location = new Point(2, 27);
|
||||
txtContent.Multiline = true;
|
||||
txtContent.Name = "txtContent";
|
||||
txtContent.ScrollBars = ScrollBars.Both;
|
||||
txtContent.Size = new Size(581, 222);
|
||||
txtContent.TabIndex = 1;
|
||||
//
|
||||
// NotepadForm
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(583, 252);
|
||||
Controls.Add(txtContent);
|
||||
Controls.Add(mnuNotepad);
|
||||
MainMenuStrip = mnuNotepad;
|
||||
Name = "NotepadForm";
|
||||
Text = "NotepadForm";
|
||||
mnuNotepad.ResumeLayout(false);
|
||||
mnuNotepad.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MenuStrip mnuNotepad;
|
||||
private ToolStripMenuItem NotepadFile;
|
||||
private ToolStripMenuItem NotepadFileNew;
|
||||
private ToolStripMenuItem NotepadFileOpen;
|
||||
private ToolStripMenuItem NotepadFileSave;
|
||||
private ToolStripMenuItem NotepadFileSaveAs;
|
||||
private ToolStripMenuItem NotepadFileExit;
|
||||
private TextBox txtContent;
|
||||
}
|
||||
}
|
||||
18
PodrazNG/Apps/Notepad/NotepadForm.cs
Normal file
18
PodrazNG/Apps/Notepad/NotepadForm.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Data;
|
||||
using System.Drawing;
|
||||
using System.Text;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace PodrazNG.Apps.Notepad
|
||||
{
|
||||
public partial class NotepadForm : Form
|
||||
{
|
||||
public NotepadForm()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
}
|
||||
}
|
||||
123
PodrazNG/Apps/Notepad/NotepadForm.resx
Normal file
123
PodrazNG/Apps/Notepad/NotepadForm.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="mnuNotepad.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
46
PodrazNG/GameData/GameManager.cs
Normal file
46
PodrazNG/GameData/GameManager.cs
Normal file
@@ -0,0 +1,46 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace PodrazNG.GameData
|
||||
{
|
||||
public class GameManager
|
||||
{
|
||||
private static GameManager? _instance;
|
||||
public string Name { get; set; } = "Nová hra";
|
||||
public Dictionary<string,string> VarGlobal { get; set; } = new Dictionary<string,string>();
|
||||
public GameManager()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public static GameManager Data
|
||||
{
|
||||
get
|
||||
{
|
||||
if (_instance == null)
|
||||
{
|
||||
_instance = new GameManager();
|
||||
}
|
||||
return _instance;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public SavingData ToSavingData()
|
||||
{
|
||||
return new SavingData
|
||||
{
|
||||
Name = this.Name,
|
||||
VarGlobal = this.VarGlobal
|
||||
};
|
||||
}
|
||||
public void FromSavingData(SavingData data)
|
||||
{
|
||||
this.Name = data.Name;
|
||||
this.VarGlobal = data.VarGlobal;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
12
PodrazNG/GameData/SavingData.cs
Normal file
12
PodrazNG/GameData/SavingData.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace PodrazNG.GameData
|
||||
{
|
||||
public class SavingData
|
||||
{
|
||||
public string Name { get; set; } = "Nová hra";
|
||||
public Dictionary<string, string> VarGlobal { get; set; } = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
134
PodrazNG/PodrazNG.Designer.cs
generated
Normal file
134
PodrazNG/PodrazNG.Designer.cs
generated
Normal file
@@ -0,0 +1,134 @@
|
||||
namespace PodrazNG
|
||||
{
|
||||
partial class PodrazNG
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
menuStrip1 = new MenuStrip();
|
||||
mnuFile = new ToolStripMenuItem();
|
||||
mnuFileNew = new ToolStripMenuItem();
|
||||
mnuFileOpen = new ToolStripMenuItem();
|
||||
mnuFileSave = new ToolStripMenuItem();
|
||||
mnuFileSaveAs = new ToolStripMenuItem();
|
||||
mnuFileExit = new ToolStripMenuItem();
|
||||
mnuApps = new ToolStripMenuItem();
|
||||
mnuAppsNotepad = new ToolStripMenuItem();
|
||||
menuStrip1.SuspendLayout();
|
||||
SuspendLayout();
|
||||
//
|
||||
// menuStrip1
|
||||
//
|
||||
menuStrip1.Items.AddRange(new ToolStripItem[] { mnuFile, mnuApps });
|
||||
menuStrip1.Location = new Point(0, 0);
|
||||
menuStrip1.Name = "menuStrip1";
|
||||
menuStrip1.Size = new Size(629, 24);
|
||||
menuStrip1.TabIndex = 1;
|
||||
menuStrip1.Text = "menuStrip1";
|
||||
//
|
||||
// mnuFile
|
||||
//
|
||||
mnuFile.DropDownItems.AddRange(new ToolStripItem[] { mnuFileNew, mnuFileOpen, mnuFileSave, mnuFileSaveAs, mnuFileExit });
|
||||
mnuFile.Name = "mnuFile";
|
||||
mnuFile.Size = new Size(57, 20);
|
||||
mnuFile.Text = "Soubor";
|
||||
//
|
||||
// mnuFileNew
|
||||
//
|
||||
mnuFileNew.Name = "mnuFileNew";
|
||||
mnuFileNew.Size = new Size(180, 22);
|
||||
mnuFileNew.Text = "Nová hra";
|
||||
//
|
||||
// mnuFileOpen
|
||||
//
|
||||
mnuFileOpen.Name = "mnuFileOpen";
|
||||
mnuFileOpen.Size = new Size(180, 22);
|
||||
mnuFileOpen.Text = "Otevřít hru";
|
||||
mnuFileOpen.Click += mnuFileOpen_Click;
|
||||
//
|
||||
// mnuFileSave
|
||||
//
|
||||
mnuFileSave.Name = "mnuFileSave";
|
||||
mnuFileSave.Size = new Size(180, 22);
|
||||
mnuFileSave.Text = "Uložit hru";
|
||||
//
|
||||
// mnuFileSaveAs
|
||||
//
|
||||
mnuFileSaveAs.Name = "mnuFileSaveAs";
|
||||
mnuFileSaveAs.Size = new Size(180, 22);
|
||||
mnuFileSaveAs.Text = "Uložit hru jako...";
|
||||
mnuFileSaveAs.Click += mnuFileSaveAs_Click;
|
||||
//
|
||||
// mnuFileExit
|
||||
//
|
||||
mnuFileExit.Name = "mnuFileExit";
|
||||
mnuFileExit.Size = new Size(180, 22);
|
||||
mnuFileExit.Text = "Konec";
|
||||
mnuFileExit.Click += mnuFileExit_Click;
|
||||
//
|
||||
// mnuApps
|
||||
//
|
||||
mnuApps.DropDownItems.AddRange(new ToolStripItem[] { mnuAppsNotepad });
|
||||
mnuApps.Name = "mnuApps";
|
||||
mnuApps.Size = new Size(64, 20);
|
||||
mnuApps.Text = "Aplikace";
|
||||
//
|
||||
// mnuAppsNotepad
|
||||
//
|
||||
mnuAppsNotepad.Name = "mnuAppsNotepad";
|
||||
mnuAppsNotepad.Size = new Size(180, 22);
|
||||
mnuAppsNotepad.Text = "Poznámkový blok";
|
||||
mnuAppsNotepad.Click += mnuAppsNotepad_Click;
|
||||
//
|
||||
// PodrazNG
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(7F, 15F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(629, 359);
|
||||
Controls.Add(menuStrip1);
|
||||
IsMdiContainer = true;
|
||||
MainMenuStrip = menuStrip1;
|
||||
Name = "PodrazNG";
|
||||
Text = "Form1";
|
||||
menuStrip1.ResumeLayout(false);
|
||||
menuStrip1.PerformLayout();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private MenuStrip menuStrip1;
|
||||
private ToolStripMenuItem mnuFile;
|
||||
private ToolStripMenuItem mnuFileExit;
|
||||
private ToolStripMenuItem mnuFileNew;
|
||||
private ToolStripMenuItem mnuFileOpen;
|
||||
private ToolStripMenuItem mnuFileSave;
|
||||
private ToolStripMenuItem mnuFileSaveAs;
|
||||
private ToolStripMenuItem mnuApps;
|
||||
private ToolStripMenuItem mnuAppsNotepad;
|
||||
}
|
||||
}
|
||||
60
PodrazNG/PodrazNG.cs
Normal file
60
PodrazNG/PodrazNG.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using PodrazNG.Apps.Notepad;
|
||||
using PodrazNG.GameData;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace PodrazNG
|
||||
{
|
||||
public partial class PodrazNG : Form
|
||||
{
|
||||
public PodrazNG()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
private void mnuFileExit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
|
||||
private void mnuFileSaveAs_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new SaveFileDialog()
|
||||
{
|
||||
Filter = "JSON soubory (*.json)|*.json",
|
||||
Title = "Uložit hru jako"
|
||||
};
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string json = JsonSerializer.Serialize(GameManager.Data);
|
||||
File.WriteAllText(dialog.FileName, json);
|
||||
}
|
||||
}
|
||||
|
||||
private void mnuFileOpen_Click(object sender, EventArgs e)
|
||||
{
|
||||
using var dialog = new OpenFileDialog()
|
||||
{
|
||||
Filter = "JSON soubory (*.json)|*.json",
|
||||
Title = "Otevřít hru"
|
||||
};
|
||||
if (dialog.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
string json = File.ReadAllText(dialog.FileName);
|
||||
SavingData? data = JsonSerializer.Deserialize<SavingData>(json);
|
||||
if (data != null)
|
||||
{
|
||||
GameManager.Data.FromSavingData(data);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void mnuAppsNotepad_Click(object sender, EventArgs e)
|
||||
{
|
||||
NotepadForm notepad = new NotepadForm();
|
||||
notepad.MdiParent = this;
|
||||
notepad.Show();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
11
PodrazNG/PodrazNG.csproj
Normal file
11
PodrazNG/PodrazNG.csproj
Normal file
@@ -0,0 +1,11 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net10.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
126
PodrazNG/PodrazNG.resx
Normal file
126
PodrazNG/PodrazNG.resx
Normal file
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>34</value>
|
||||
</metadata>
|
||||
</root>
|
||||
17
PodrazNG/Program.cs
Normal file
17
PodrazNG/Program.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace PodrazNG
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new PodrazNG());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user