Compare commits

176 changed files with 11209 additions and 736 deletions

No files matched your search

@@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="TaskProjectConfiguration">
<server type="Gitlab" url="https://devops.tsommer.org" />
</component>
<component name="com.jetbrains.rider.android.RiderAndroidMiscFileCreationComponent">
<option name="ENSURE_MISC_FILE_EXISTS" value="true" />
</component>
+3
View File
@@ -7,4 +7,7 @@
<inspection_tool class="SubjectLimit" enabled="true" level="ERROR" enabled_by_default="true" />
</profile>
</component>
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>
-15
View File
@@ -1,15 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Editor" type="RunExe" factoryName=".NET Executable">
<option name="EXE_PATH" value="/Applications/Godot.app/Contents/MacOS/Godot" />
<option name="PROGRAM_PARAMETERS" value="--path &quot;$PROJECT_DIR$/App&quot; --editor" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="RUNTIME_TYPE" value="coreclr" />
<method v="2">
<option name="Build Solution" enabled="true" />
</method>
</configuration>
</component>
-15
View File
@@ -1,15 +0,0 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="Player" type="RunExe" factoryName=".NET Executable">
<option name="EXE_PATH" value="/Applications/Godot.app/Contents/MacOS/Godot" />
<option name="PROGRAM_PARAMETERS" value="--path &quot;$PROJECT_DIR$/App&quot;" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="RUNTIME_TYPE" value="coreclr" />
<method v="2">
<option name="Build Solution" enabled="true" />
</method>
</configuration>
</component>
-2
View File
@@ -1,2 +0,0 @@
# Normalize EOL for all files that Git considers text files.
* text=auto eol=lf
-2
View File
@@ -1,2 +0,0 @@
# Godot 4+ specific ignores
.godot/
-15
View File
@@ -1,15 +0,0 @@
<Project Sdk="Godot.NET.Sdk/4.2.0">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<EnableDynamicLoading>true</EnableDynamicLoading>
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<Compile Remove="obj\**" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Remove="obj\**" />
</ItemGroup>
</Project>
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://csxeqym474oxu"
path="res://.godot/imported/icons8-language-512.png-f077a2b18c06d1aaad9f9dc30a3a6ad7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/icons/icons8-language-512.png"
dest_files=["res://.godot/imported/icons8-language-512.png-f077a2b18c06d1aaad9f9dc30a3a6ad7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cp33pga3vuk5k"
path="res://.godot/imported/icons8-new-window-512.png-a618aa4884e2d1037cb64d9a2996cda7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://assets/icons/icons8-new-window-512.png"
dest_files=["res://.godot/imported/icons8-new-window-512.png-a618aa4884e2d1037cb64d9a2996cda7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
-1
View File
@@ -1 +0,0 @@
<svg height="128" width="128" xmlns="http://www.w3.org/2000/svg"><rect x="2" y="2" width="124" height="124" rx="14" fill="#363d52" stroke="#212532" stroke-width="4"/><g transform="scale(.101) translate(122 122)"><g fill="#fff"><path d="M105 673v33q407 354 814 0v-33z"/><path fill="#478cbf" d="m105 673 152 14q12 1 15 14l4 67 132 10 8-61q2-11 15-15h162q13 4 15 15l8 61 132-10 4-67q3-13 15-14l152-14V427q30-39 56-81-35-59-83-108-43 20-82 47-40-37-88-64 7-51 8-102-59-28-123-42-26 43-46 89-49-7-98 0-20-46-46-89-64 14-123 42 1 51 8 102-48 27-88 64-39-27-82-47-48 49-83 108 26 42 56 81zm0 33v39c0 276 813 276 813 0v-39l-134 12-5 69q-2 10-14 13l-162 11q-12 0-16-11l-10-65H447l-10 65q-4 11-16 11l-162-11q-12-3-14-13l-5-69z"/><path d="M483 600c3 34 55 34 58 0v-86c-3-34-55-34-58 0z"/><circle cx="725" cy="526" r="90"/><circle cx="299" cy="526" r="90"/></g><g fill="#414042"><circle cx="307" cy="532" r="60"/><circle cx="717" cy="532" r="60"/></g></g></svg>

Before

Width:  |  Height:  |  Size: 950 B

-37
View File
@@ -1,37 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://nydkfoij0mbk"
path="res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://icon.svg"
dest_files=["res://.godot/imported/icon.svg-218a8f2b3041327d8a5756f3a245f83b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1
svg/scale=1.0
editor/scale_with_editor_scale=false
editor/convert_colors_with_editor_theme=false
-33
View File
@@ -1,33 +0,0 @@
; Engine configuration file.
; It's best edited using the editor UI and not directly,
; since the parameters that go here are not all obvious.
;
; Format:
; [section] ; section goes between []
; param=value ; assign values to parameters
config_version=5
[application]
config/name="I18N Commander"
run/main_scene="res://scenes/loading_screen.tscn"
config/features=PackedStringArray("4.2", "C#", "GL Compatibility")
run/low_processor_mode=true
config/icon="res://icon.svg"
[display]
window/size/initial_position_type=3
window/stretch/aspect="ignore"
window/ios/hide_home_indicator=false
window/ios/hide_status_bar=false
[dotnet]
project/assembly_name="App"
[rendering]
renderer/rendering_method="gl_compatibility"
renderer/rendering_method.mobile="gl_compatibility"
-27
View File
@@ -1,27 +0,0 @@
using Godot;
namespace App.scenes;
public partial class BtnIcon : Control
{
[Export]
[ExportGroup("Data")]
public string Text { get; set; } = string.Empty;
[Export]
[ExportGroup("Data")]
public Texture2D Icon { get; set; }
#region Overrides of Node
public override void _Ready()
{
var button = this.GetNode<Button>("%btn");
button.Text = this.Text;
button.Icon = this.Icon;
base._Ready();
}
#endregion
}
-14
View File
@@ -1,14 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://d0x0yv7nevod7"]
[ext_resource type="Script" path="res://scenes/BtnIcon.cs" id="1_b787p"]
[node name="btn_icon" type="MarginContainer"]
theme_override_constants/margin_left = 6
theme_override_constants/margin_top = 6
theme_override_constants/margin_right = 6
theme_override_constants/margin_bottom = 6
script = ExtResource("1_b787p")
[node name="btn" type="Button" parent="."]
unique_name_in_owner = true
layout_mode = 2
@@ -1,68 +0,0 @@
[gd_scene load_steps=5 format=3 uid="uid://qm7ovimcfc3h"]
[ext_resource type="Texture2D" uid="uid://csxeqym474oxu" path="res://assets/icons/icons8-language-512.png" id="1_1ya62"]
[ext_resource type="PackedScene" uid="uid://d0x0yv7nevod7" path="res://scenes/BtnIcon.tscn" id="2_gp72s"]
[ext_resource type="Texture2D" uid="uid://cp33pga3vuk5k" path="res://assets/icons/icons8-new-window-512.png" id="3_4v5hm"]
[ext_resource type="Theme" uid="uid://uqhultm05f5a" path="res://theme/ui_theme_dark.tres" id="3_7idnl"]
[node name="frame" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("3_7idnl")
[node name="center" type="CenterContainer" parent="."]
layout_mode = 1
anchors_preset = 8
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
offset_left = -152.0
offset_top = -51.5
offset_right = 152.0
offset_bottom = 51.5
grow_horizontal = 2
grow_vertical = 2
[node name="vbox" type="VBoxContainer" parent="center"]
layout_mode = 2
[node name="hboxHeader" type="HBoxContainer" parent="center/vbox"]
layout_mode = 2
[node name="iconMargin" type="MarginContainer" parent="center/vbox/hboxHeader"]
layout_mode = 2
theme_override_constants/margin_left = 6
theme_override_constants/margin_top = 6
theme_override_constants/margin_right = 6
theme_override_constants/margin_bottom = 6
[node name="icon" type="TextureRect" parent="center/vbox/hboxHeader/iconMargin"]
layout_mode = 2
texture = ExtResource("1_1ya62")
stretch_mode = 5
[node name="header" type="Label" parent="center/vbox/hboxHeader"]
custom_minimum_size = Vector2(300, 2.08165e-12)
layout_mode = 2
theme_override_font_sizes/font_size = 36
text = "I18N Commander"
horizontal_alignment = 1
vertical_alignment = 1
autowrap_mode = 2
[node name="hboxButtons" type="HBoxContainer" parent="center/vbox"]
layout_mode = 2
[node name="btn_icon" parent="center/vbox/hboxButtons" instance=ExtResource("2_gp72s")]
layout_mode = 2
Text = "Create Project"
Icon = ExtResource("3_4v5hm")
[node name="btnRecentProjects" type="OptionButton" parent="center/vbox/hboxButtons"]
unique_name_in_owner = true
layout_mode = 2
-141
View File
@@ -1,141 +0,0 @@
[gd_scene load_steps=2 format=3 uid="uid://q3mnarw6b66l"]
[ext_resource type="Theme" uid="uid://uqhultm05f5a" path="res://theme/ui_theme_dark.tres" id="1_x217b"]
[node name="Main" type="Control"]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
theme = ExtResource("1_x217b")
[node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/MarginContainer"]
layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
[node name="Button" type="Button" parent="VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Create Unit"
[node name="Button2" type="Button" parent="VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Delete"
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
[node name="CheckButton2" type="CheckButton" parent="VBoxContainer/MarginContainer/VBoxContainer/HBoxContainer"]
layout_mode = 2
text = "Auto Save"
[node name="OptionButton" type="OptionButton" parent="VBoxContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
item_count = 3
popup/item_0/text = "Option 1"
popup/item_0/id = 0
popup/item_1/text = "Option 2"
popup/item_1/id = 1
popup/item_1/disabled = true
popup/item_2/text = "Option 3"
popup/item_2/id = 2
[node name="MenuButton" type="MenuButton" parent="VBoxContainer/MarginContainer/VBoxContainer"]
layout_mode = 2
toggle_mode = false
text = "Mein Menü"
alignment = 0
item_count = 5
popup/item_0/text = "Option 1"
popup/item_0/id = 0
popup/item_1/text = "Option 2"
popup/item_1/id = 1
popup/item_2/text = "Option 3"
popup/item_2/id = 2
popup/item_3/text = "Settings"
popup/item_3/id = 4
popup/item_3/separator = true
popup/item_4/text = "Auto Save"
popup/item_4/checkable = 1
popup/item_4/id = 3
[node name="MarginContainer2" type="MarginContainer" parent="VBoxContainer"]
layout_mode = 2
[node name="TabContainer" type="TabContainer" parent="VBoxContainer/MarginContainer2"]
layout_mode = 2
[node name="Tab1" type="TabBar" parent="VBoxContainer/MarginContainer2/TabContainer"]
layout_mode = 2
clip_tabs = false
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MarginContainer2/TabContainer/Tab1"]
layout_mode = 0
offset_right = 132.0
offset_bottom = 101.0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/MarginContainer2/TabContainer/Tab1/MarginContainer"]
layout_mode = 2
[node name="Button" type="Button" parent="VBoxContainer/MarginContainer2/TabContainer/Tab1/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Load"
[node name="Button2" type="Button" parent="VBoxContainer/MarginContainer2/TabContainer/Tab1/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Store"
[node name="Tab2" type="TabBar" parent="VBoxContainer/MarginContainer2/TabContainer"]
visible = false
layout_mode = 2
clip_tabs = false
[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MarginContainer2/TabContainer/Tab2"]
layout_mode = 0
offset_right = 24.0
offset_bottom = 24.0
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/MarginContainer2/TabContainer/Tab2/MarginContainer"]
layout_mode = 2
[node name="Button" type="Button" parent="VBoxContainer/MarginContainer2/TabContainer/Tab2/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "STart"
[node name="Button2" type="Button" parent="VBoxContainer/MarginContainer2/TabContainer/Tab2/MarginContainer/HBoxContainer"]
layout_mode = 2
text = "Stop"
[node name="TabBar" type="TabBar" parent="VBoxContainer/MarginContainer2/TabContainer"]
visible = false
layout_mode = 2
clip_tabs = false
[node name="TabBar2" type="TabBar" parent="VBoxContainer/MarginContainer2/TabContainer"]
visible = false
layout_mode = 2
clip_tabs = false
[node name="TabBar3" type="TabBar" parent="VBoxContainer/MarginContainer2/TabContainer"]
visible = false
layout_mode = 2
clip_tabs = false
[node name="TabBar4" type="TabBar" parent="VBoxContainer/MarginContainer2/TabContainer"]
visible = false
layout_mode = 2
clip_tabs = false
@@ -1,21 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://chaurklijlgu7"]
[resource]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.309804, 0.309804, 0.309804, 1)
skew = Vector2(2.08165e-12, 2.08165e-12)
border_width_left = 4
border_width_top = 4
border_width_right = 4
border_width_bottom = 4
border_color = Color(0.0509804, 0.0509804, 0.0509804, 1)
border_blend = true
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
shadow_size = 2
shadow_offset = Vector2(1, 1)
@@ -1,21 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://l1tjpnljc6c1"]
[resource]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.309804, 0.309804, 0.309804, 1)
skew = Vector2(2.08165e-12, 2.08165e-12)
border_width_left = 3
border_width_top = 3
border_width_right = 3
border_width_bottom = 3
border_color = Color(0.0509804, 0.0509804, 0.0509804, 1)
border_blend = true
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
shadow_size = 2
shadow_offset = Vector2(1, 1)
@@ -1,19 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://tj810ebe65el"]
[resource]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.239216, 0.239216, 0.239216, 1)
skew = Vector2(2.08165e-12, 2.08165e-12)
border_width_left = 2
border_width_top = 2
border_width_right = 2
border_width_bottom = 2
border_color = Color(0, 0, 0, 1)
border_blend = true
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
@@ -1,21 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://he0mxms4j1q7"]
[resource]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.4, 0.4, 0.4, 1)
skew = Vector2(2.08165e-12, 2.08165e-12)
border_width_left = 3
border_width_top = 3
border_width_right = 3
border_width_bottom = 3
border_color = Color(0.380392, 0.380392, 0.380392, 1)
border_blend = true
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
shadow_size = 2
shadow_offset = Vector2(1, 1)
@@ -1,17 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://d0s01k14o6kda"]
[resource]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.980392, 0.980392, 0.980392, 1)
border_width_left = 3
border_width_top = 3
border_width_right = 3
border_width_bottom = 3
border_color = Color(0.129412, 0.129412, 0.129412, 1)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
@@ -1,17 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://cilpphe2p81om"]
[resource]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.980392, 0.980392, 0.980392, 1)
border_width_left = 3
border_width_top = 3
border_width_right = 3
border_width_bottom = 3
border_color = Color(0.129412, 0.129412, 0.129412, 1)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
@@ -1,17 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://dv2hxit6cs1cx"]
[resource]
content_margin_left = 16.0
content_margin_top = 16.0
content_margin_right = 16.0
content_margin_bottom = 16.0
bg_color = Color(0.878431, 0.878431, 0.878431, 1)
border_width_left = 5
border_width_top = 5
border_width_right = 5
border_width_bottom = 5
border_color = Color(0.129412, 0.129412, 0.129412, 1)
corner_radius_top_left = 6
corner_radius_top_right = 6
corner_radius_bottom_right = 6
corner_radius_bottom_left = 6
@@ -1,3 +0,0 @@
[gd_resource type="StyleBoxEmpty" format=3 uid="uid://batay7mp6vfon"]
[resource]
@@ -1,3 +0,0 @@
[gd_resource type="StyleBoxEmpty" format=3 uid="uid://bgka0t482q0dh"]
[resource]
@@ -1,4 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://cens6ndafk28w"]
[resource]
bg_color = Color(0.160784, 0.160784, 0.160784, 1)
@@ -1,4 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://b2nkgvg40j6tc"]
[resource]
bg_color = Color(0.780392, 0.780392, 0.780392, 1)
@@ -1,4 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://bumfybajbkybi"]
[resource]
bg_color = Color(0.2, 0.2, 0.2, 1)
@@ -1,13 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://cv1sqjb5pjrov"]
[resource]
content_margin_left = 48.0
content_margin_top = 48.0
content_margin_right = 48.0
content_margin_bottom = 48.0
bg_color = Color(0.39, 0.39, 0.39, 1)
border_width_left = 6
border_width_top = 12
border_width_right = 6
border_width_bottom = 12
border_color = Color(0.2, 0.2, 0.2, 1)
@@ -1,13 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://b8v8084ty86la"]
[resource]
content_margin_left = 48.0
content_margin_top = 48.0
content_margin_right = 48.0
content_margin_bottom = 48.0
bg_color = Color(0.239216, 0.239216, 0.239216, 1)
border_width_left = 6
border_width_top = 12
border_width_right = 6
border_width_bottom = 12
border_color = Color(0.2, 0.2, 0.2, 1)
@@ -1,13 +0,0 @@
[gd_resource type="StyleBoxFlat" format=3 uid="uid://dp37edlumlbaj"]
[resource]
content_margin_left = 48.0
content_margin_top = 48.0
content_margin_right = 48.0
content_margin_bottom = 48.0
bg_color = Color(0.160784, 0.160784, 0.160784, 1)
border_width_left = 6
border_width_top = 12
border_width_right = 6
border_width_bottom = 12
border_color = Color(0.2, 0.2, 0.2, 1)
@@ -1,63 +0,0 @@
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://uqhultm05f5a"]
[ext_resource type="StyleBox" uid="uid://chaurklijlgu7" path="res://theme/btn/d_style_box_flat_focus.tres" id="1_uspte"]
[ext_resource type="StyleBox" uid="uid://l1tjpnljc6c1" path="res://theme/btn/d_style_box_flat_hover.tres" id="2_pm5yo"]
[ext_resource type="StyleBox" uid="uid://tj810ebe65el" path="res://theme/btn/d_style_box_flat_norm.tres" id="3_p1mf5"]
[ext_resource type="StyleBox" uid="uid://he0mxms4j1q7" path="res://theme/btn/d_style_box_flat_press.tres" id="4_a7p74"]
[ext_resource type="StyleBox" uid="uid://bgka0t482q0dh" path="res://theme/checkbox/style_box_empty.tres" id="5_1ugrl"]
[ext_resource type="StyleBox" uid="uid://batay7mp6vfon" path="res://theme/checkBtn/style_box_empty.tres" id="6_i1h00"]
[ext_resource type="StyleBox" uid="uid://cens6ndafk28w" path="res://theme/panel/d_style_box_flat.tres" id="7_3s8mj"]
[ext_resource type="StyleBox" uid="uid://dp37edlumlbaj" path="res://theme/tabs/tab_selected_style_box_flat.tres" id="8_4hym3"]
[ext_resource type="StyleBox" uid="uid://b8v8084ty86la" path="res://theme/tabs/tab_not_used_style_box_flat.tres" id="8_5xc56"]
[ext_resource type="StyleBox" uid="uid://bumfybajbkybi" path="res://theme/tabs/background_style_box_flat.tres" id="8_l6mbx"]
[ext_resource type="StyleBox" uid="uid://cv1sqjb5pjrov" path="res://theme/tabs/tab_hover_style_box_flat.tres" id="9_5ci7o"]
[resource]
Button/constants/h_separation = 6
Button/font_sizes/font_size = 32
Button/styles/focus = ExtResource("1_uspte")
Button/styles/hover = ExtResource("2_pm5yo")
Button/styles/normal = ExtResource("3_p1mf5")
Button/styles/pressed = ExtResource("4_a7p74")
CheckBox/constants/h_separation = 16
CheckBox/font_sizes/font_size = 32
CheckBox/styles/disabled = ExtResource("5_1ugrl")
CheckBox/styles/focus = ExtResource("5_1ugrl")
CheckBox/styles/hover = ExtResource("5_1ugrl")
CheckBox/styles/hover_pressed = ExtResource("5_1ugrl")
CheckBox/styles/normal = ExtResource("5_1ugrl")
CheckBox/styles/pressed = ExtResource("5_1ugrl")
CheckButton/font_sizes/font_size = 32
CheckButton/styles/focus = ExtResource("6_i1h00")
CheckButton/styles/hover = ExtResource("6_i1h00")
CheckButton/styles/hover_pressed = ExtResource("6_i1h00")
CheckButton/styles/normal = ExtResource("6_i1h00")
CheckButton/styles/pressed = ExtResource("6_i1h00")
Label/font_sizes/font_size = 32
LineEdit/font_sizes/font_size = 32
MarginContainer/constants/margin_bottom = 12
MarginContainer/constants/margin_left = 12
MarginContainer/constants/margin_right = 12
MarginContainer/constants/margin_top = 12
Panel/styles/panel = ExtResource("7_3s8mj")
PopupMenu/font_sizes/font_separator_size = 32
PopupMenu/font_sizes/font_size = 32
TabBar/font_sizes/font_size = 32
TabContainer/font_sizes/font_size = 32
TabContainer/styles/tab_focus = ExtResource("8_4hym3")
TabContainer/styles/tab_hovered = ExtResource("9_5ci7o")
TabContainer/styles/tab_selected = ExtResource("8_4hym3")
TabContainer/styles/tab_unselected = ExtResource("8_5xc56")
TabContainer/styles/tabbar_background = ExtResource("8_l6mbx")
TextEdit/font_sizes/font_size = 32
Tree/constants/children_hl_line_width = 4
Tree/constants/draw_guides = 0
Tree/constants/draw_relationship_lines = 1
Tree/constants/h_separation = 12
Tree/constants/inner_item_margin_left = 12
Tree/constants/parent_hl_line_width = 4
Tree/constants/relationship_line_width = 4
Tree/constants/scrollbar_h_separation = 12
Tree/constants/v_separation = 8
Tree/font_sizes/font_size = 32
Tree/font_sizes/title_button_font_size = 32
@@ -1,34 +0,0 @@
[gd_resource type="Theme" load_steps=5 format=3 uid="uid://w3bmkb0q753m"]
[ext_resource type="StyleBox" uid="uid://cilpphe2p81om" path="res://theme/btn/l_style_box_flat_norm.tres" id="1_21txx"]
[ext_resource type="StyleBox" uid="uid://b2nkgvg40j6tc" path="res://theme/panel/l_style_box_flat.tres" id="1_87qhj"]
[ext_resource type="StyleBox" uid="uid://d0s01k14o6kda" path="res://theme/btn/l_style_box_flat_hover.tres" id="1_apys2"]
[ext_resource type="StyleBox" uid="uid://dv2hxit6cs1cx" path="res://theme/btn/l_style_box_flat_press.tres" id="3_cpdnc"]
[resource]
Button/colors/font_color = Color(0.160784, 0.160784, 0.160784, 1)
Button/colors/font_focus_color = Color(0.160784, 0.160784, 0.160784, 1)
Button/colors/font_hover_color = Color(0.160784, 0.160784, 0.160784, 1)
Button/colors/font_hover_pressed_color = Color(0.160784, 0.160784, 0.160784, 1)
Button/colors/font_pressed_color = Color(0.160784, 0.160784, 0.160784, 1)
Button/colors/icon_disabled_color = Color(0.160784, 0.160784, 0.160784, 1)
Button/constants/h_separation = 6
Button/font_sizes/font_size = 32
Button/styles/hover = ExtResource("1_apys2")
Button/styles/normal = ExtResource("1_21txx")
Button/styles/pressed = ExtResource("3_cpdnc")
CheckBox/constants/h_separation = 16
CheckBox/font_sizes/font_size = 32
CheckButton/font_sizes/font_size = 32
Label/font_sizes/font_size = 32
LineEdit/font_sizes/font_size = 32
MarginContainer/constants/margin_bottom = 12
MarginContainer/constants/margin_left = 12
MarginContainer/constants/margin_right = 12
MarginContainer/constants/margin_top = 12
Panel/styles/panel = ExtResource("1_87qhj")
PopupMenu/font_sizes/font_separator_size = 32
PopupMenu/font_sizes/font_size = 32
TabBar/font_sizes/font_size = 32
TabContainer/font_sizes/font_size = 32
TextEdit/font_sizes/font_size = 32
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup>
<OutputType>Library</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>default</LangVersion>
@@ -18,4 +18,6 @@ public static class SettingNames
public static readonly string AUTO_EXPORT_DESTINATION_PATH = "Auto-Export Destination Path";
public static readonly string AUTO_EXPORT_FILENAME = "Auto-Export Filename";
public static readonly string AUTO_EXPORT_SENSITIVE_DATA = "Auto-Export Sensitive Data";
public static readonly string GENERATOR_DOTNET_WIN_FORMS_ENABLED = "Generator .NET WinForms Enabled";
public static readonly string GENERATOR_DOTNET_WIN_FORMS_ROOT_PATH = "Generator .NET WinForms Root Path";
}
+13 -5
View File
@@ -5,9 +5,11 @@ VisualStudioVersion = 17.3.32519.111
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Processor", "Processor\Processor.csproj", "{E24B7026-05BE-434D-9481-7CA5785BC7A8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UI WinForms", "UI WinForms\UI WinForms.csproj", "{5AE84E7C-3141-46CA-B390-4E42878B6195}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DataModel", "DataModel\DataModel.csproj", "{D18DD193-3F93-4D21-92DC-BA0E26B0342A}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "App\App.csproj", "{CA2AB6BD-472A-4906-BF5A-84263EF345B6}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UI MAUI", "UI MAUI\UI MAUI.csproj", "{BA8BE958-0DCC-4054-B731-DF911AECC429}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -19,14 +21,20 @@ Global
{E24B7026-05BE-434D-9481-7CA5785BC7A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E24B7026-05BE-434D-9481-7CA5785BC7A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E24B7026-05BE-434D-9481-7CA5785BC7A8}.Release|Any CPU.Build.0 = Release|Any CPU
{5AE84E7C-3141-46CA-B390-4E42878B6195}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5AE84E7C-3141-46CA-B390-4E42878B6195}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5AE84E7C-3141-46CA-B390-4E42878B6195}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5AE84E7C-3141-46CA-B390-4E42878B6195}.Release|Any CPU.Build.0 = Release|Any CPU
{D18DD193-3F93-4D21-92DC-BA0E26B0342A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D18DD193-3F93-4D21-92DC-BA0E26B0342A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D18DD193-3F93-4D21-92DC-BA0E26B0342A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D18DD193-3F93-4D21-92DC-BA0E26B0342A}.Release|Any CPU.Build.0 = Release|Any CPU
{CA2AB6BD-472A-4906-BF5A-84263EF345B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CA2AB6BD-472A-4906-BF5A-84263EF345B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CA2AB6BD-472A-4906-BF5A-84263EF345B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CA2AB6BD-472A-4906-BF5A-84263EF345B6}.Release|Any CPU.Build.0 = Release|Any CPU
{BA8BE958-0DCC-4054-B731-DF911AECC429}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BA8BE958-0DCC-4054-B731-DF911AECC429}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BA8BE958-0DCC-4054-B731-DF911AECC429}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{BA8BE958-0DCC-4054-B731-DF911AECC429}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BA8BE958-0DCC-4054-B731-DF911AECC429}.Release|Any CPU.Build.0 = Release|Any CPU
{BA8BE958-0DCC-4054-B731-DF911AECC429}.Release|Any CPU.Deploy.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
+16
View File
@@ -423,6 +423,22 @@ public static class AppSettings
public static async Task SetGeneratorGodotDestinationPath(string path) => await AppSettings.SetSetting(SettingNames.GENERATOR_GODOT_DESTINATION_PATH, path);
#endregion
#region .NET WinForms Generator Enabled/Disabled
public static async Task<bool> GetGeneratorDotnetWinFormsEnabled() => await AppSettings.GetSetting(SettingNames.GENERATOR_DOTNET_WIN_FORMS_ENABLED, false);
public static async Task SetGeneratorDotnetWinFormsEnabled(bool enabled) => await AppSettings.SetSetting(SettingNames.GENERATOR_DOTNET_WIN_FORMS_ENABLED, enabled);
#endregion
#region .NET WinForms Generator Root Path
public static async Task<string> GetGeneratorDotnetWinFormsRootPath() => await AppSettings.GetSetting(SettingNames.GENERATOR_DOTNET_WIN_FORMS_ROOT_PATH, string.Empty);
public static async Task SetGeneratorDotnetWinFormsRootPath(string path) => await AppSettings.SetSetting(SettingNames.GENERATOR_DOTNET_WIN_FORMS_ROOT_PATH, path);
#endregion
#endregion
@@ -0,0 +1,14 @@
namespace Processor.Generators;
public class DotnetWinForms : IGenerator
{
#region Implementation of IGenerator
/// <inheritdoc />
public async Task<ProcessorResult<long>> GenerateAsync()
{
return new ProcessorResult<long>(1);
}
#endregion
}
+1 -1
View File
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>default</LangVersion>
+1 -1
View File
@@ -2,5 +2,5 @@
public static class Version
{
public static string Text => $"v0.9.7 (2023-02-16), .NET {Environment.Version}";
public static string Text => $"v0.10.1 (2023-02-17), .NET {Environment.Version}";
}
+26
View File
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" ?>
<Application xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:UI_MAUI"
x:Class="UI_MAUI.App">
<Application.Resources>
<ResourceDictionary>
<Color x:Key="PageBackgroundColor">#512bdf</Color>
<Color x:Key="PrimaryTextColor">White</Color>
<Style TargetType="Label">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
</Style>
<Style TargetType="Button">
<Setter Property="TextColor" Value="{DynamicResource PrimaryTextColor}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="BackgroundColor" Value="#2b0b98" />
<Setter Property="Padding" Value="14,10" />
</Style>
</ResourceDictionary>
</Application.Resources>
</Application>
+10
View File
@@ -0,0 +1,10 @@
namespace UI_MAUI;
public partial class App : Application
{
public App()
{
this.InitializeComponent();
this.MainPage = new MainPage();
}
}
@@ -0,0 +1,17 @@
<div class="offcanvas offcanvas-bottom" tabindex="-1" id="@this.Name" aria-labelledby="@this.Name-Header" style="@this.AssistantHeight">
<div class="offcanvas-header">
<h4 class="offcanvas-title d-flex align-items-center" id="@this.Name-Header">
@if (this.IsIconAvailable)
{
<Icon Filename="@this.IconName" Size="35" Classes="me-2" AltText="@this.HeaderIconAltText"/>
}
@this.HeaderText
</h4>
<button class="btn btn-secondary" type="button" data-bs-toggle="offcanvas" data-bs-target="#@this.Name">
Cancel
</button>
</div>
<div class="offcanvas-body">
@this.ChildContent
</div>
</div>
@@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Components;
namespace UI_MAUI.Components;
public partial class Assistant : ComponentBase
{
[Parameter]
public string HeaderText { get; set; } = string.Empty;
[Parameter]
public string Name { get; set; } = "Assistant";
[Parameter]
public string IconName { get; set; } = string.Empty;
[Parameter]
public Height BaseHeight { get; set; } = new(60, 40, 50);
public readonly record struct Height(int Phone, int Desktop, int Tablet);
[Parameter]
public RenderFragment ChildContent { get; set; }
private string AssistantHeight =>
DeviceInfo.Idiom == DeviceIdiom.Phone ? $"--bs-offcanvas-height: {this.BaseHeight.Phone}vh;" :
DeviceInfo.Idiom == DeviceIdiom.Tablet ? $"--bs-offcanvas-height: {this.BaseHeight.Tablet}vh;" :
$"--bs-offcanvas-height: {this.BaseHeight.Desktop}vh;";
private string HeaderIconAltText => $"Icon: {this.HeaderText}";
private bool IsIconAvailable => !string.IsNullOrWhiteSpace(this.IconName);
}
@@ -0,0 +1 @@
<img src="icons/@this.Filename" class="d-inline-block @this.Classes" width="@this.Size" height="@this.Size" alt="@this.AltText" />
@@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Components;
namespace UI_MAUI.Components;
public partial class Icon : ComponentBase
{
[Parameter]
public string Filename { get; set; } = string.Empty;
[Parameter]
public string AltText { get; set; } = string.Empty;
[Parameter]
public ushort Size { get; set; } = 35;
[Parameter]
public string Classes { get; set; } = string.Empty;
}
@@ -0,0 +1,22 @@
<li class="nav-item">
@if (DeviceInfo.Idiom == DeviceIdiom.Desktop || DeviceInfo.Idiom == DeviceIdiom.Tablet)
{
<a class="nav-link active" aria-current="page" href="@this.Route">
@if (this.ShowIcon)
{
<Icon Filename="@this.IconFilename" Size="25" AltText="@this.AltText" />
}
<span class="ms-1 align-middle">@this.Text</span>
</a>
}
else
{
<a class="nav-link active" aria-current="page" href="@this.Route" @onclick="@this.Navigate" data-bs-toggle="collapse" data-bs-target="#navbarContent">
@if (this.ShowIcon)
{
<Icon Filename="@this.IconFilename" Size="25" AltText="@this.AltText" />
}
<span class="ms-1 align-middle">@this.Text</span>
</a>
}
</li>
@@ -0,0 +1,25 @@
using Microsoft.AspNetCore.Components;
namespace UI_MAUI.Components;
public partial class NavItem : ComponentBase
{
[Parameter]
public string Route { get; set; }
[Parameter]
public string Text { get; set; }
[Parameter]
public bool ShowIcon { get; set; } = false;
[Parameter]
public string IconFilename { get; set; } = string.Empty;
[Inject]
public NavigationManager NavigationManager { get; set; }
private string AltText => $"Navigation: {this.Text}";
private void Navigate() => this.NavigationManager.NavigateTo(this.Route);
}
+11
View File
@@ -0,0 +1,11 @@
<Router AppAssembly="@typeof(Main).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:local="clr-namespace:UI_MAUI"
x:Class="UI_MAUI.MainPage"
BackgroundColor="{DynamicResource PageBackgroundColor}">
<BlazorWebView HostPage="wwwroot/index.html">
<BlazorWebView.RootComponents>
<RootComponent Selector="#app" ComponentType="{x:Type local:Main}" />
</BlazorWebView.RootComponents>
</BlazorWebView>
</ContentPage>
+9
View File
@@ -0,0 +1,9 @@
namespace UI_MAUI;
public partial class MainPage : ContentPage
{
public MainPage()
{
this.InitializeComponent();
}
}
+51
View File
@@ -0,0 +1,51 @@
using DataModel.Database.Common;
using Microsoft.Maui.LifecycleEvents;
#if WINDOWS
using Microsoft.UI;
using Microsoft.UI.Windowing;
using Windows.Graphics;
#endif
namespace UI_MAUI;
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder.UseMauiApp<App>();
builder.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
});
#if WINDOWS
builder.ConfigureLifecycleEvents(events =>
{
events.AddWindows(wndLifeCycleBuilder =>
{
wndLifeCycleBuilder.OnWindowCreated(window =>
{
var nativeWindowHandle = WinRT.Interop.WindowNative.GetWindowHandle(window);
var win32WindowsId = Win32Interop.GetWindowIdFromWindow(nativeWindowHandle);
var appWindow = AppWindow.GetFromWindowId(win32WindowsId);
const int width = 1366;
const int height = 768;
appWindow.ResizeClient(new SizeInt32(width, height));
});
});
});
#endif
builder.Services.AddMauiBlazorWebView();
builder.Services.AddSingleton<DataContextFactory>();
#if DEBUG
builder.Services.AddBlazorWebViewDeveloperTools();
#endif
return builder.Build();
}
}
@@ -0,0 +1,15 @@
namespace UI_MAUI;
public readonly record struct NavigationTarget(string Text, string Route, string IconFilename)
{
private static readonly NavigationTarget SETTINGS = new("Project settings", "settings", "settings.svg");
private static readonly NavigationTarget TRANSLATION = new("Translation", "translation", "translation.svg");
private static readonly NavigationTarget LOAD_PROJECT = new("Load Project", "load", "load.svg");
public static IEnumerable<NavigationTarget> GetAll()
{
yield return LOAD_PROJECT;
yield return SETTINGS;
yield return TRANSLATION;
}
};
@@ -0,0 +1,42 @@
@page "/"
@page "/load"
<h1>Load a Project</h1>
<ul>
@foreach (var recentProject in this.recentProjects)
{
<li>@recentProject.Path</li>
}
</ul>
<div>
<button class="btn btn-secondary me-2 mb-2" type="button" data-bs-toggle="offcanvas" data-bs-target="#Assistant">
<Icon Filename="add-project.svg" Size="25" AltText="Icon: Create new project"/>
Create new project
</button>
<button class="btn btn-secondary me-2 mb-2" type="button">
<Icon Filename="load.svg" Size="25" AltText="Icon: Open project"/>
Open project
</button>
</div>
<Assistant HeaderText="Create new project" IconName="add-project.svg" BaseHeight="new Assistant.Height(40, 55, 40)">
<div class="mb-3">
<label for="projectName" class="form-label fw-bold">Project Name:</label>
<input type="text" class="form-control" id="projectName" placeholder="Type a project name" @bind="this.newProjectName" @bind:event="oninput" @onkeydown="this.ReevaluateState">
</div>
@if (DeviceInfo.Idiom == DeviceIdiom.Desktop)
{
<div class="mb-3">
<label for="projectPath" class="form-label fw-bold">Project destination:</label>
<div class="input-group" id="projectPath">
<button class="btn btn-primary" type="button" @onclick="@this.ChooseProjectDestination">Choose destination</button>
<input type="text" class="form-control" value="@this.newProjectDestination" aria-label="The chosen project path" disabled readonly>
</div>
</div>
}
<button class="btn btn-secondary" type="button" @onclick="this.CreateProject" disabled="@this.CannotCreateProject()">Create project</button>
</Assistant>
@@ -0,0 +1,88 @@
using System.Text;
using System.Text.Json.Serialization;
using DataModel.Database.Common;
using Microsoft.AspNetCore.Components;
namespace UI_MAUI.Pages;
public partial class LoadProject
{
private readonly List<RecentProject> recentProjects = new();
[Inject]
public DataContextFactory DataContextFactory { get; set; }
private string newProjectName = string.Empty;
private string newProjectDestination = string.Empty;
#region Overrides of ComponentBase
protected override async Task OnInitializedAsync()
{
await base.OnInitializedAsync();
await this.LoadRecentProjects();
}
#endregion
private readonly record struct RecentProject(string Path, string Name, bool Available);
private async Task LoadRecentProjects()
{
var appDataDirectory = FileSystem.Current.AppDataDirectory;
var recentProjectsFile = Path.Join(appDataDirectory, "recentProjects.json");
if (!File.Exists(recentProjectsFile))
await File.WriteAllTextAsync(recentProjectsFile, string.Empty, Encoding.UTF8);
// Read the JSON data from that file & decode it to an array of recent projects:
}
private async Task WriteRecentProjects()
{
}
private Task ChooseProjectDestination()
{
try
{
#if WINDOWS
return this.ChooseProjectDestinationWindows();
#elif MACCATALYST
return this.ChooseProjectDestinationMacOS();
#else
return Task.CompletedTask;
#endif
}
finally
{
this.StateHasChanged();
}
}
private Task CreateProject()
{
// TODO: Need to wait for the project to be created. Afterwards, we need to close the dialog. Meanwhile, we need to show a loading indicator.
#warning TODO: Create project
#if WINDOWS
return this.CreateProjectWindows();
#elif MACCATALYST
return Task.CompletedTask;
#else
return Task.CompletedTask;
#endif
}
private bool CannotCreateProject()
{
if (DeviceInfo.Idiom == DeviceIdiom.Desktop)
return string.IsNullOrWhiteSpace(this.newProjectName) || string.IsNullOrWhiteSpace(this.newProjectDestination);
else if (DeviceInfo.Idiom == DeviceIdiom.Phone || DeviceInfo.Idiom == DeviceIdiom.Tablet)
return string.IsNullOrWhiteSpace(this.newProjectName);
else
return true;
}
private void ReevaluateState() => this.StateHasChanged();
}
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<application android:allowBackup="true" android:icon="@mipmap/app" android:roundIcon="@mipmap/app_round" android:supportsRtl="true"></application>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
@@ -0,0 +1,10 @@
using Android.App;
using Android.Content.PM;
using Android.OS;
namespace UI_MAUI;
[Activity(Theme = "@style/Maui.SplashTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation | ConfigChanges.UiMode | ConfigChanges.ScreenLayout | ConfigChanges.SmallestScreenSize | ConfigChanges.Density)]
public class MainActivity : MauiAppCompatActivity
{
}
@@ -0,0 +1,14 @@
using Android.App;
using Android.Runtime;
namespace UI_MAUI;
[Application]
public class MainApplication : MauiApplication
{
public MainApplication(IntPtr handle, JniHandleOwnership ownership) : base(handle, ownership)
{
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
@@ -0,0 +1,9 @@
#if ANDROID
namespace UI_MAUI.Pages;
public partial class LoadProject
{
}
#endif
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#512BD4</color>
<color name="colorPrimaryDark">#2B0B98</color>
<color name="colorAccent">#2B0B98</color>
</resources>
@@ -0,0 +1,9 @@
using Foundation;
namespace UI_MAUI;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>
@@ -0,0 +1,13 @@
#if MACCATALYST
namespace UI_MAUI.Pages;
public partial class LoadProject
{
private Task ChooseProjectDestinationMacOS()
{
return Task.CompletedTask;
}
}
#endif
@@ -0,0 +1,15 @@
using ObjCRuntime;
using UIKit;
namespace UI_MAUI;
public class Program
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
@@ -0,0 +1,8 @@
<maui:MauiWinUIApplication
x:Class="UI_MAUI.WinUI.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:maui="using:Microsoft.Maui"
xmlns:local="using:UI_MAUI.WinUI">
</maui:MauiWinUIApplication>
@@ -0,0 +1,18 @@
namespace UI_MAUI.WinUI;
/// <summary>
/// Provides application-specific behavior to supplement the default Application class.
/// </summary>
public partial class App : MauiWinUIApplication
{
/// <summary>
/// Initializes the singleton application object. This is the first line of authored code
/// executed, and as such is the logical equivalent of main() or WinMain().
/// </summary>
public App()
{
this.InitializeComponent();
}
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<Package
xmlns="http://schemas.microsoft.com/appx/manifest/foundation/windows10"
xmlns:uap="http://schemas.microsoft.com/appx/manifest/uap/windows10"
xmlns:rescap="http://schemas.microsoft.com/appx/manifest/foundation/windows10/restrictedcapabilities"
IgnorableNamespaces="uap rescap">
<Identity Name="maui-package-name-placeholder" Publisher="CN=User Name" Version="0.0.0.0" />
<Properties>
<DisplayName>$placeholder$</DisplayName>
<PublisherDisplayName>User Name</PublisherDisplayName>
<Logo>$placeholder$.png</Logo>
</Properties>
<Dependencies>
<TargetDeviceFamily Name="Windows.Universal" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
<TargetDeviceFamily Name="Windows.Desktop" MinVersion="10.0.17763.0" MaxVersionTested="10.0.19041.0" />
</Dependencies>
<Resources>
<Resource Language="x-generate" />
</Resources>
<Applications>
<Application Id="App" Executable="$targetnametoken$.exe" EntryPoint="$targetentrypoint$">
<uap:VisualElements
DisplayName="$placeholder$"
Description="$placeholder$"
Square150x150Logo="$placeholder$.png"
Square44x44Logo="$placeholder$.png"
BackgroundColor="transparent">
<uap:DefaultTile Square71x71Logo="$placeholder$.png" Wide310x150Logo="$placeholder$.png" Square310x310Logo="$placeholder$.png" />
<uap:SplashScreen Image="$placeholder$.png" />
</uap:VisualElements>
</Application>
</Applications>
<Capabilities>
<rescap:Capability Name="runFullTrust" />
</Capabilities>
</Package>
@@ -0,0 +1,38 @@
#if WINDOWS
namespace UI_MAUI.Pages;
using Windows.Storage.Pickers;
using WindowsSavePicker = Windows.Storage.Pickers.FileSavePicker;
public partial class LoadProject
{
private async Task ChooseProjectDestinationWindows()
{
var saveDialog = new WindowsSavePicker
{
CommitButtonText = "Create the project here",
SuggestedStartLocation = PickerLocationId.DocumentsLibrary,
FileTypeChoices =
{
new KeyValuePair<string, IList<string>>("I18N Commander Projects", new List<string> { ".i18nc" }),
}
};
var hwnd = ((MauiWinUIWindow)App.Current.Windows[0].Handler.PlatformView).WindowHandle;
WinRT.Interop.InitializeWithWindow.Initialize(saveDialog, hwnd);
var result = await saveDialog.PickSaveFileAsync();
if(result is null)
return;
this.newProjectDestination = result.Path;
}
private async Task CreateProjectWindows() => await Task.Run(() =>
{
this.DataContextFactory.CreateDataContext(this.newProjectDestination);
});
}
#endif
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="UI MAUI.WinUI.app"/>
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<!-- The combination of below two tags have the following effect:
1) Per-Monitor for >= Windows 10 Anniversary Update
2) System < Windows 10 Anniversary Update
-->
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/PM</dpiAware>
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2, PerMonitor</dpiAwareness>
</windowsSettings>
</application>
</assembly>
@@ -0,0 +1,9 @@
using Foundation;
namespace UI_MAUI;
[Register("AppDelegate")]
public class AppDelegate : MauiUIApplicationDelegate
{
protected override MauiApp CreateMauiApp() => MauiProgram.CreateMauiApp();
}
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>arm64</string>
</array>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>XSAppIconAssets</key>
<string>Assets.xcassets/appicon.appiconset</string>
</dict>
</plist>
@@ -0,0 +1,9 @@
#if IOS
namespace UI_MAUI.Pages;
public partial class LoadProject
{
}
#endif
@@ -0,0 +1,15 @@
using ObjCRuntime;
using UIKit;
namespace UI_MAUI;
public class Program
{
// This is the main entry point of the application.
static void Main(string[] args)
{
// if you want to use a different Application Delegate class from "AppDelegate"
// you can specify it here.
UIApplication.Main(args, null, typeof(AppDelegate));
}
}
@@ -0,0 +1,8 @@
{
"profiles": {
"Windows Machine": {
"commandName": "MsixPackage",
"nativeDebugging": false
}
}
}
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 12 48 30" width="512px" height="512px"><linearGradient id="gCW9sGJUkBnBLRc40wQXGa" x1="25.447" x2="44.728" y1="4.921" y2="36.29" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#42a3f2"/><stop offset="1" stop-color="#42a4eb"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGa)" d="M42,8H19l11,30h12c1.105,0,2-0.895,2-2V10C44,8.895,43.105,8,42,8z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGb" x1="3.865" x2="23.412" y1="9.86" y2="41.663" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1d59b3"/><stop offset="1" stop-color="#195bbc"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGb)" d="M19,8H6c-1.105,0-2,0.895-2,2v26c0,1.105,0.895,2,2,2h8v7.998 c0,0.891,1.077,1.337,1.707,0.707L24.412,38H30L19,8z"/><path fill="#fff" d="M12,25h6v2h-6V25z"/><path fill="#fff" d="M12.109,29L15,20l2.906,9h2.11L16,17h-2l-4,12H12.109z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGc" x1="29.064" x2="38.79" y1="23.554" y2="23.554" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGc)" d="M29.064,27.223c0.061-0.031,4.994-3.219,7.936-9.115L38.79,19 c-3.082,6.25-7.457,9.292-8.509,10L29.064,27.223z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGd" x1="28" x2="40" y1="23.5" y2="23.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGd)" d="M38,29c0,0-5-2.583-7.769-6.998L32,21c2.333,3.833,6.981,6.26,6.981,6.26L38,29z M28,18h12v2 H28V18z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGe" x1="33" x2="35" y1="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGe)" d="M33,16h2v4h-2V16z"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@@ -0,0 +1,15 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories). Deployment of the asset to your application
is automatically handled by the following `MauiAsset` Build Action within your `.csproj`.
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
These files will be deployed with you package and will be accessible using Essentials:
async Task LoadMauiAsset()
{
using var stream = await FileSystem.OpenAppPackageFileAsync("AboutAssets.txt");
using var reader = new StreamReader(stream);
var contents = reader.ReadToEnd();
}
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="512px" height="512px"><linearGradient id="gCW9sGJUkBnBLRc40wQXGa" x1="25.447" x2="44.728" y1="4.921" y2="36.29" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#42a3f2"/><stop offset="1" stop-color="#42a4eb"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGa)" d="M42,8H19l11,30h12c1.105,0,2-0.895,2-2V10C44,8.895,43.105,8,42,8z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGb" x1="3.865" x2="23.412" y1="9.86" y2="41.663" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1d59b3"/><stop offset="1" stop-color="#195bbc"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGb)" d="M19,8H6c-1.105,0-2,0.895-2,2v26c0,1.105,0.895,2,2,2h8v7.998 c0,0.891,1.077,1.337,1.707,0.707L24.412,38H30L19,8z"/><path fill="#fff" d="M12,25h6v2h-6V25z"/><path fill="#fff" d="M12.109,29L15,20l2.906,9h2.11L16,17h-2l-4,12H12.109z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGc" x1="29.064" x2="38.79" y1="23.554" y2="23.554" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGc)" d="M29.064,27.223c0.061-0.031,4.994-3.219,7.936-9.115L38.79,19 c-3.082,6.25-7.457,9.292-8.509,10L29.064,27.223z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGd" x1="28" x2="40" y1="23.5" y2="23.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGd)" d="M38,29c0,0-5-2.583-7.769-6.998L32,21c2.333,3.833,6.981,6.26,6.981,6.26L38,29z M28,18h12v2 H28V18z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGe" x1="33" x2="35" y1="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGe)" d="M33,16h2v4h-2V16z"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<Color x:Key="Primary">#512BD4</Color>
<Color x:Key="Secondary">#DFD8F7</Color>
<Color x:Key="Tertiary">#2B0B98</Color>
<Color x:Key="White">White</Color>
<Color x:Key="Black">Black</Color>
<Color x:Key="Gray100">#E1E1E1</Color>
<Color x:Key="Gray200">#C8C8C8</Color>
<Color x:Key="Gray300">#ACACAC</Color>
<Color x:Key="Gray400">#919191</Color>
<Color x:Key="Gray500">#6E6E6E</Color>
<Color x:Key="Gray600">#404040</Color>
<Color x:Key="Gray900">#212121</Color>
<Color x:Key="Gray950">#141414</Color>
<SolidColorBrush x:Key="PrimaryBrush" Color="{StaticResource Primary}"/>
<SolidColorBrush x:Key="SecondaryBrush" Color="{StaticResource Secondary}"/>
<SolidColorBrush x:Key="TertiaryBrush" Color="{StaticResource Tertiary}"/>
<SolidColorBrush x:Key="WhiteBrush" Color="{StaticResource White}"/>
<SolidColorBrush x:Key="BlackBrush" Color="{StaticResource Black}"/>
<SolidColorBrush x:Key="Gray100Brush" Color="{StaticResource Gray100}"/>
<SolidColorBrush x:Key="Gray200Brush" Color="{StaticResource Gray200}"/>
<SolidColorBrush x:Key="Gray300Brush" Color="{StaticResource Gray300}"/>
<SolidColorBrush x:Key="Gray400Brush" Color="{StaticResource Gray400}"/>
<SolidColorBrush x:Key="Gray500Brush" Color="{StaticResource Gray500}"/>
<SolidColorBrush x:Key="Gray600Brush" Color="{StaticResource Gray600}"/>
<SolidColorBrush x:Key="Gray900Brush" Color="{StaticResource Gray900}"/>
<SolidColorBrush x:Key="Gray950Brush" Color="{StaticResource Gray950}"/>
<Color x:Key="Yellow100Accent">#F7B548</Color>
<Color x:Key="Yellow200Accent">#FFD590</Color>
<Color x:Key="Yellow300Accent">#FFE5B9</Color>
<Color x:Key="Cyan100Accent">#28C2D1</Color>
<Color x:Key="Cyan200Accent">#7BDDEF</Color>
<Color x:Key="Cyan300Accent">#C3F2F4</Color>
<Color x:Key="Blue100Accent">#3E8EED</Color>
<Color x:Key="Blue200Accent">#72ACF1</Color>
<Color x:Key="Blue300Accent">#A7CBF6</Color>
</ResourceDictionary>
@@ -0,0 +1,384 @@
<?xml version="1.0" encoding="UTF-8" ?>
<?xaml-comp compile="true" ?>
<ResourceDictionary
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml">
<Style TargetType="ActivityIndicator">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
</Style>
<Style TargetType="IndicatorView">
<Setter Property="IndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}"/>
<Setter Property="SelectedIndicatorColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray100}}"/>
</Style>
<Style TargetType="Border">
<Setter Property="Stroke" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="StrokeShape" Value="Rectangle"/>
<Setter Property="StrokeThickness" Value="1"/>
</Style>
<Style TargetType="BoxView">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style>
<Style TargetType="Button">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Primary}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="CornerRadius" Value="8"/>
<Setter Property="Padding" Value="14,10"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="Color" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="DatePicker">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Editor">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Entry">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Frame">
<Setter Property="HasShadow" Value="False" />
<Setter Property="BorderColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="CornerRadius" Value="8" />
</Style>
<Style TargetType="ImageButton">
<Setter Property="Opacity" Value="1" />
<Setter Property="BorderColor" Value="Transparent"/>
<Setter Property="BorderWidth" Value="0"/>
<Setter Property="CornerRadius" Value="0"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="Opacity" Value="0.5" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Label">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="FontSize" Value="14" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="ListView">
<Setter Property="SeparatorColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray500}}" />
<Setter Property="RefreshControlColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
</Style>
<Style TargetType="Picker">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
<Setter Property="TitleColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="ProgressBar">
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="ProgressColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="RadioButton">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="RefreshView">
<Setter Property="RefreshColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
</Style>
<Style TargetType="SearchBar">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
<Setter Property="CancelButtonColor" Value="{StaticResource Gray500}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="FontSize" Value="14" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="SearchHandler">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="PlaceholderColor" Value="{StaticResource Gray500}" />
<Setter Property="BackgroundColor" Value="Transparent" />
<Setter Property="FontFamily" Value="OpenSansRegular" />
<Setter Property="FontSize" Value="14" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
<Setter Property="PlaceholderColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Shadow">
<Setter Property="Radius" Value="15" />
<Setter Property="Opacity" Value="0.5" />
<Setter Property="Brush" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
<Setter Property="Offset" Value="10,10" />
</Style>
<Style TargetType="Slider">
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray600}}" />
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="MinimumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
<Setter Property="MaximumTrackColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}"/>
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="SwipeItem">
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
</Style>
<Style TargetType="Switch">
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="ThumbColor" Value="{StaticResource White}" />
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="On">
<VisualState.Setters>
<Setter Property="OnColor" Value="{AppThemeBinding Light={StaticResource Secondary}, Dark={StaticResource Gray200}}" />
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
</VisualState.Setters>
</VisualState>
<VisualState x:Name="Off">
<VisualState.Setters>
<Setter Property="ThumbColor" Value="{AppThemeBinding Light={StaticResource Gray400}, Dark={StaticResource Gray500}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="TimePicker">
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource White}}" />
<Setter Property="Background" Value="Transparent"/>
<Setter Property="FontFamily" Value="OpenSansRegular"/>
<Setter Property="FontSize" Value="14"/>
<Setter Property="VisualStateManager.VisualStateGroups">
<VisualStateGroupList>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Normal" />
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{AppThemeBinding Light={StaticResource Gray300}, Dark={StaticResource Gray600}}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateGroupList>
</Setter>
</Style>
<Style TargetType="Page" ApplyToDerivedTypes="True">
<Setter Property="Padding" Value="0"/>
<Setter Property="BackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
</Style>
<Style TargetType="Shell" ApplyToDerivedTypes="True">
<Setter Property="Shell.BackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
<Setter Property="Shell.ForegroundColor" Value="{OnPlatform WinUI={StaticResource Primary}, Default={StaticResource White}}" />
<Setter Property="Shell.TitleColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource White}}" />
<Setter Property="Shell.DisabledColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="Shell.UnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray200}}" />
<Setter Property="Shell.NavBarHasShadow" Value="False" />
<Setter Property="Shell.TabBarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Black}}" />
<Setter Property="Shell.TabBarForegroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="Shell.TabBarTitleColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="Shell.TabBarUnselectedColor" Value="{AppThemeBinding Light={StaticResource Gray900}, Dark={StaticResource Gray200}}" />
</Style>
<Style TargetType="NavigationPage">
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource Gray950}}" />
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
<Setter Property="IconColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource White}}" />
</Style>
<Style TargetType="TabbedPage">
<Setter Property="BarBackgroundColor" Value="{AppThemeBinding Light={StaticResource White}, Dark={StaticResource Gray950}}" />
<Setter Property="BarTextColor" Value="{AppThemeBinding Light={StaticResource Primary}, Dark={StaticResource White}}" />
<Setter Property="UnselectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray200}, Dark={StaticResource Gray950}}" />
<Setter Property="SelectedTabColor" Value="{AppThemeBinding Light={StaticResource Gray950}, Dark={StaticResource Gray200}}" />
</Style>
</ResourceDictionary>
@@ -0,0 +1,25 @@
@inherits LayoutComponentBase
<nav class="navbar navbar-dark bg-dark navbar-expand-sm p-0">
<div class="container-fluid ps-1">
<div class="navbar-brand p-0">
<Icon Filename="translation.svg" Size="35" AltText="App Icon" />
<span class="fw-bold">I18N</span> <span class="fs-6">Commander</span>
</div>
<button class="navbar-toggler p-0 my-1" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent" aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
<Icon Filename="nav-toggle.svg" AltText="Toggles menu" Size="35" />
</button>
<div class="collapse navbar-collapse" id="navbarContent">
<ul class="navbar-nav me-auto">
@foreach (var (text, route, iconFilename) in NavigationTarget.GetAll())
{
<NavItem Text="@text" Route="@route" ShowIcon="@(!string.IsNullOrWhiteSpace(iconFilename))" IconFilename="@iconFilename" />
}
</ul>
</div>
</div>
</nav>
<div class="container-fluid">
@Body
</div>
+52
View File
@@ -0,0 +1,52 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<PropertyGroup>
<TargetFrameworks>net6.0-android;net6.0-ios;net6.0-maccatalyst</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">$(TargetFrameworks);net6.0-windows10.0.19041.0</TargetFrameworks>
<OutputType>Exe</OutputType>
<AssemblyName>I18N Commander</AssemblyName>
<RootNamespace>UI_MAUI</RootNamespace>
<UseMaui>true</UseMaui>
<SingleProject>true</SingleProject>
<ImplicitUsings>enable</ImplicitUsings>
<EnableDefaultCssItems>false</EnableDefaultCssItems>
<ValidateExecutableReferencesMatchSelfContained>false</ValidateExecutableReferencesMatchSelfContained>
<!-- Display name -->
<ApplicationTitle>I18N Commander</ApplicationTitle>
<!-- App Identifier -->
<ApplicationId>org.tsommer.i18n-commander</ApplicationId>
<ApplicationIdGuid>6D8A5F75-4C32-4807-AC75-CD934671D139</ApplicationIdGuid>
<!-- Versions -->
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
<ApplicationVersion>1</ApplicationVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'ios'">14.2</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'maccatalyst'">14.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'android'">23.0</SupportedOSPlatformVersion>
<SupportedOSPlatformVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</SupportedOSPlatformVersion>
<TargetPlatformMinVersion Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">10.0.17763.0</TargetPlatformMinVersion>
</PropertyGroup>
<ItemGroup>
<!-- App Icon -->
<MauiIcon Include="Resources\AppIcon\app.svg" />
<!-- Splash Screen -->
<MauiSplashScreen Include="Resources\Splash\splash.svg" BaseSize="128,128" />
<!-- Custom Fonts -->
<MauiFont Include="Resources\Fonts\*" />
<!-- Raw Assets (also remove the "Resources\Raw" prefix) -->
<MauiAsset Include="Resources\Raw\**" LogicalName="%(RecursiveDir)%(Filename)%(Extension)" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\DataModel\DataModel.csproj" />
<ProjectReference Include="..\Processor\Processor.csproj" />
</ItemGroup>
</Project>
+9
View File
@@ -0,0 +1,9 @@
@using System.Net.Http
@using Microsoft.AspNetCore.Components.Forms
@using Microsoft.AspNetCore.Components.Routing
@using Microsoft.AspNetCore.Components.Web
@using Microsoft.AspNetCore.Components.Web.Virtualization
@using Microsoft.JSInterop
@using UI_MAUI
@using UI_MAUI.Shared
@using UI_MAUI.Components;
Whitespace-only changes.
+7
View File
@@ -0,0 +1,7 @@
@charset "UTF-8";/*!
* Bootstrap v5.2.0 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors
* Copyright 2011-2022 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/:root{--bs-blue:#0d6efd;--bs-indigo:#6610f2;--bs-purple:#6f42c1;--bs-pink:#d63384;--bs-red:#dc3545;--bs-orange:#fd7e14;--bs-yellow:#ffc107;--bs-green:#198754;--bs-teal:#20c997;--bs-cyan:#0dcaf0;--bs-black:#000;--bs-white:#fff;--bs-gray:#6c757d;--bs-gray-dark:#343a40;--bs-gray-100:#f8f9fa;--bs-gray-200:#e9ecef;--bs-gray-300:#dee2e6;--bs-gray-400:#ced4da;--bs-gray-500:#adb5bd;--bs-gray-600:#6c757d;--bs-gray-700:#495057;--bs-gray-800:#343a40;--bs-gray-900:#212529;--bs-primary:#0d6efd;--bs-secondary:#6c757d;--bs-success:#198754;--bs-info:#0dcaf0;--bs-warning:#ffc107;--bs-danger:#dc3545;--bs-light:#f8f9fa;--bs-dark:#212529;--bs-primary-rgb:13,110,253;--bs-secondary-rgb:108,117,125;--bs-success-rgb:25,135,84;--bs-info-rgb:13,202,240;--bs-warning-rgb:255,193,7;--bs-danger-rgb:220,53,69;--bs-light-rgb:248,249,250;--bs-dark-rgb:33,37,41;--bs-white-rgb:255,255,255;--bs-black-rgb:0,0,0;--bs-body-color-rgb:33,37,41;--bs-body-bg-rgb:255,255,255;--bs-font-sans-serif:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue","Noto Sans","Liberation Sans",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--bs-font-monospace:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--bs-gradient:linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));--bs-body-font-family:var(--bs-font-sans-serif);--bs-body-font-size:1rem;--bs-body-font-weight:400;--bs-body-line-height:1.5;--bs-body-color:#212529;--bs-body-bg:#fff;--bs-border-width:1px;--bs-border-style:solid;--bs-border-color:#dee2e6;--bs-border-color-translucent:rgba(0, 0, 0, 0.175);--bs-border-radius:0.375rem;--bs-border-radius-sm:0.25rem;--bs-border-radius-lg:0.5rem;--bs-border-radius-xl:1rem;--bs-border-radius-2xl:2rem;--bs-border-radius-pill:50rem;--bs-link-color:#0d6efd;--bs-link-hover-color:#0a58ca;--bs-code-color:#d63384;--bs-highlight-bg:#fff3cd}*,::after,::before{box-sizing:border-box}@media (prefers-reduced-motion:no-preference){:root{scroll-behavior:smooth}}body{margin:0;font-family:var(--bs-body-font-family);font-size:var(--bs-body-font-size);font-weight:var(--bs-body-font-weight);line-height:var(--bs-body-line-height);color:var(--bs-body-color);text-align:var(--bs-body-text-align);background-color:var(--bs-body-bg);-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}hr{margin:1rem 0;color:inherit;border:0;border-top:1px solid;opacity:.25}.h1,.h2,.h3,.h4,.h5,.h6,h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem;font-weight:500;line-height:1.2}.h1,h1{font-size:calc(1.375rem + 1.5vw)}@media (min-width:1200px){.h1,h1{font-size:2.5rem}}.h2,h2{font-size:calc(1.325rem + .9vw)}@media (min-width:1200px){.h2,h2{font-size:2rem}}.h3,h3{font-size:calc(1.3rem + .6vw)}@media (min-width:1200px){.h3,h3{font-size:1.75rem}}.h4,h4{font-size:calc(1.275rem + .3vw)}@media (min-width:1200px){.h4,h4{font-size:1.5rem}}.h5,h5{font-size:1.25rem}.h6,h6{font-size:1rem}p{margin-top:0;margin-bottom:1rem}abbr[title]{-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;-webkit-text-decoration-skip-ink:none;text-decoration-skip-ink:none}address{margin-bottom:1rem;font-style:normal;line-height:inherit}ol,ul{padding-left:2rem}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin-bottom:.5rem;margin-left:0}blockquote{margin:0 0 1rem}b,strong{font-weight:bolder}.small,small{font-size:.875em}.mark,mark{padding:.1875em;background-color:var(--bs-highlight-bg)}sub,sup{position:relative;font-size:.75em;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}a{color:var(--bs-link-color);text-decoration:underline}a:hover{color:var(--bs-link-hover-color)}a:not([href]):not([class]),a:not([href]):not([class]):hover{color:inherit;text-decoration:none}code,kbd,pre,samp{font-family:var(--bs-font-monospace);font-size:1em}pre{display:block;margin-top:0;margin-bottom:1rem;overflow:auto;font-size:.875em}pre code{font-size:inherit;color:inherit;word-break:normal}code{font-size:.875em;color:var(--bs-code-color);word-wrap:break-word}a>code{color:inherit}kbd{padding:.1875rem .375rem;font-size:.875em;color:var(--bs-body-bg);background-color:var(--bs-body-color);border-radius:.25rem}kbd kbd{padding:0;font-size:1em}figure{margin:0 0 1rem}img,svg{vertical-align:middle}table{caption-side:bottom;border-collapse:collapse}caption{padding-top:.5rem;padding-bottom:.5rem;color:#6c757d;text-align:left}th{text-align:inherit;text-align:-webkit-match-parent}tbody,td,tfoot,th,thead,tr{border-color:inherit;border-style:solid;border-width:0}label{display:inline-block}button{border-radius:0}button:focus:not(:focus-visible){outline:0}button,input,optgroup,select,textarea{margin:0;font-family:inherit;font-size:inherit;line-height:inherit}button,select{text-transform:none}[role=button]{cursor:pointer}select{word-wrap:normal}select:disabled{opacity:1}[list]:not([type=date]):not([type=datetime-local]):not([type=month]):not([type=week]):noLine truncated
/*# sourceMappingURL=bootstrap.min.css.map */
@@ -0,0 +1 @@
{"version":3,"sources":["../../scss/mixins/_banner.scss","../../scss/_root.scss","../../scss/vendor/_rfs.scss","../../scss/_reboot.scss","dist/css/bootstrap.css","../../scss/mixins/_border-radius.scss","../../scss/_type.scss","../../scss/mixins/_lists.scss","../../scss/_images.scss","../../scss/mixins/_image.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/_tables.scss","../../scss/mixins/_table-variants.scss","../../scss/forms/_labels.scss","../../scss/forms/_form-text.scss","../../scss/forms/_form-control.scss","../../scss/mixins/_transition.scss","../../scss/mixins/_gradients.scss","../../scss/forms/_form-select.scss","../../scss/forms/_form-check.scss","../../scss/forms/_form-range.scss","../../scss/forms/_floating-labels.scss","../../scss/forms/_input-group.scss","../../scss/mixins/_forms.scss","../../scss/_buttons.scss","../../scss/mixins/_buttons.scss","../../scss/_transitions.scss","../../scss/_dropdown.scss","../../scss/mixins/_caret.scss","../../scss/_button-group.scss","../../scss/_nav.scss","../../scss/_navbar.scss","../../scss/_card.scss","../../scss/_accordion.scss","../../scss/_breadcrumb.scss","../../scss/_pagination.scss","../../scss/mixins/_pagination.scss","../../scss/_badge.scss","../../scss/_alert.scss","../../scss/mixins/_alert.scss","../../scss/_progress.scss","../../scss/_list-group.scss","../../scss/mixins/_list-group.scss","../../scss/_close.scss","../../scss/_toasts.scss","../../scss/_modal.scss","../../scss/mixins/_backdrop.scss","../../scss/_tooltip.scss","../../scss/mixins/_reset-text.scss","../../scss/_popover.scss","../../scss/_carousel.scss","../../scss/mixins/_clearfix.scss","../../scss/_spinners.scss","../../scss/_offcanvas.scss","../../scss/_placeholders.scss","../../scss/helpers/_color-bg.scss","../../scss/helpers/_colored-links.scss","../../scss/helpers/_ratio.scss","../../scss/helpers/_position.scss","../../scss/helpers/_stacks.scss","../../scss/helpers/_visually-hidden.scss","../../scss/mixins/_visually-hidden.scss","../../scss/helpers/_stretched-link.scss","../../scss/helpers/_text-truncation.scss","../../scss/mixins/_text-truncate.scss","../../scss/helpers/_vr.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"iBACE;;;;;ACDF,MAQI,UAAA,QAAA,YAAA,QAAA,YAAA,QAAA,UAAA,QAAA,SAAA,QAAA,YAAA,QAAA,YAAA,QAAA,WAAA,QAAA,UAAA,QAAA,UAAA,QAAA,WAAA,KAAA,WAAA,KAAA,UAAA,QAAA,eAAA,QAIA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAAA,cAAA,QAIA,aAAA,QAAA,eAAA,QAAA,aAAA,QAAA,UAAA,QAAA,aAAA,QAAA,YAAA,QAAA,WAAA,QAAA,UAAA,QAIA,iBAAA,EAAA,CAAA,GAAA,CAAA,IAAA,mBAAA,GAAA,CAAA,GAAA,CAAA,IAAA,iBAAA,EAAA,CAAA,GAAA,CAAA,GAAA,cAAA,EAAA,CAAA,GAAA,CAAA,IAAA,iBAAA,GAAA,CAAA,GAAA,CAAA,EAAA,gBAAA,GAAA,CAAA,EAAA,CAAA,GAAA,eAAA,GAAA,CAAA,GAAA,CAAA,IAAA,cAAA,EAAA,CAAA,EAAA,CAAA,GAGF,eAAA,GAAA,CAAA,GAAA,CAAA,IACA,eAAA,CAAA,CAAA,CAAA,CAAA,EACA,oBAAA,EAAA,CAAA,EAAA,CAAA,GACA,iBAAA,GAAA,CAAA,GAAA,CAAA,IAMA,qBAAA,SAAA,CAAA,aAAA,CAAA,UAAA,CAAA,MAAA,CAAA,gBAAA,CAAA,WAAA,CAAA,iBAAA,CAAA,KAAA,CAAA,UAAA,CAAA,mBAAA,CAAA,gBAAA,CAAA,iBAAA,CAAA,mBACA,oBAAA,cAAA,CAAA,KAAA,CAAA,MAAA,CAAA,QAAA,CAAA,iBAAA,CAAA,aAAA,CAAA,UACA,cAAA,2EAOA,sBAAA,0BC4PI,oBAAA,KD1PJ,sBAAA,IACA,sBAAA,IACA,gBAAA,QAIA,aAAA,KAIA,kBAAA,IACA,kBAAA,MACA,kBAAA,QACA,8BAAA,qBAEA,mBAAA,SACA,sBAAA,QACA,sBAAA,OACA,sBAAA,KACA,uBAAA,KACA,wBAAA,MAGA,gBAAA,QACA,sBAAA,QAEA,gBAAA,QAEA,kBAAA,QExDF,EC+DA,QADA,SD3DE,WAAA,WAeE,8CANJ,MAOM,gBAAA,QAcN,KACE,OAAA,EACA,YAAA,2BDmPI,UAAA,yBCjPJ,YAAA,2BACA,YAAA,2BACA,MAAA,qBACA,WAAA,0BACA,iBAAA,kBACA,yBAAA,KACA,4BAAA,YASF,GACE,OAAA,KAAA,EACA,MAAA,QACA,OAAA,EACA,WAAA,IAAA,MACA,QAAA,IAUF,IAAA,IAAA,IAAA,IAAA,IAAA,IAAA,GAAA,GAAA,GAAA,GAAA,GAAA,GACE,WAAA,EACA,cAAA,MAGA,YAAA,IACA,YAAA,IAIF,IAAA,GD6MQ,UAAA,uBAlKJ,0BC3CJ,IAAA,GDoNQ,UAAA,QC/MR,IAAA,GDwMQ,UAAA,sBAlKJ,0BCtCJ,IAAA,GD+MQ,UAAA,MC1MR,IAAA,GDmMQ,UAAA,oBAlKJ,0BCjCJ,IAAA,GD0MQ,UAAA,SCrMR,IAAA,GD8LQ,UAAA,sBAlKJ,0BC5BJ,IAAA,GDqMQ,UAAA,QChMR,IAAA,GDqLM,UAAA,QChLN,IAAA,GDgLM,UAAA,KCrKN,EACE,WAAA,EACA,cAAA,KAUF,YACE,wBAAA,UAAA,OAAA,gBAAA,UAAA,OACA,OAAA,KACA,iCAAA,KAAA,yBAAA,KAMF,QACE,cAAA,KACA,WAAA,OACA,YAAA,QAMF,GCsBA,GDpBE,aAAA,KC0BF,GDvBA,GCsBA,GDnBE,WAAA,EACA,cAAA,KAGF,MCuBA,MACA,MAFA,MDlBE,cAAA,EAGF,GACE,YAAA,IAKF,GACE,cAAA,MACA,YAAA,EAMF,WACE,OAAA,EAAA,EAAA,KAQF,ECYA,ODVE,YAAA,OAQF,OAAA,MDmFM,UAAA,OC5EN,MAAA,KACE,QAAA,QACA,iBAAA,uBASF,ICFA,IDIE,SAAA,SD+DI,UAAA,MC7DJ,YAAA,EACA,eAAA,SAGF,IAAM,OAAA,OACN,IAAM,IAAA,MAKN,EACE,MAAA,qBACA,gBAAA,UAEA,QACE,MAAA,2BAWF,2BAAA,iCAEE,MAAA,QACA,gBAAA,KCNJ,KACA,IDYA,ICXA,KDeE,YAAA,yBDqBI,UAAA,ICbN,IACE,QAAA,MACA,WAAA,EACA,cAAA,KACA,SAAA,KDSI,UAAA,OCJJ,SDII,UAAA,QCFF,MAAA,QACA,WAAA,OAIJ,KDHM,UAAA,OCKJ,MAAA,qBACA,UAAA,WAGA,OACE,MAAA,QAIJ,IACE,QAAA,SAAA,QDfI,UAAA,OCiBJ,MAAA,kBACA,iBAAA,qBEpSE,cAAA,OFuSF,QACE,QAAA,EDtBE,UAAA,ICiCN,OACE,OAAA,EAAA,EAAA,KAMF,IChCA,IDkCE,eAAA,OAQF,MACE,aAAA,OACA,gBAAA,SAGF,QACE,YAAA,MACA,eAAA,MACA,MAAA,QACA,WAAA,KLine truncated
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="512px" height="512px"><linearGradient id="PJGLEK~gN3IlHg2NgKbnSa" x1="24" x2="24" y1="654.016" y2="645.747" gradientTransform="matrix(1 0 0 -1 0 660.724)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#eba600"/><stop offset="1" stop-color="#c28200"/></linearGradient><path fill="url(#PJGLEK~gN3IlHg2NgKbnSa)" d="M24.414,10.414l-2.536-2.536C21.316,7.316,20.553,7,19.757,7H5C3.895,7,3,7.895,3,9v30 c0,1.105,0.895,2,2,2h38c1.105,0,2-0.895,2-2V13c0-1.105-0.895-2-2-2H25.828C25.298,11,24.789,10.789,24.414,10.414z"/><linearGradient id="PJGLEK~gN3IlHg2NgKbnSb" x1="24" x2="24" y1="649.87" y2="619.741" gradientTransform="matrix(1 0 0 -1 0 660.724)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#ffd869"/><stop offset="1" stop-color="#fec52b"/></linearGradient><path fill="url(#PJGLEK~gN3IlHg2NgKbnSb)" d="M21.586,14.414l3.268-3.268C24.947,11.053,25.074,11,25.207,11H43c1.105,0,2,0.895,2,2v26 c0,1.105-0.895,2-2,2H5c-1.105,0-2-0.895-2-2V15.5C3,15.224,3.224,15,3.5,15h16.672C20.702,15,21.211,14.789,21.586,14.414z"/><linearGradient id="PJGLEK~gN3IlHg2NgKbnSc" x1="28" x2="48" y1="409.276" y2="409.276" gradientTransform="translate(0 -371.276)" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#21ad64"/><stop offset="1" stop-color="#088242"/></linearGradient><circle cx="38" cy="38" r="10" fill="url(#PJGLEK~gN3IlHg2NgKbnSc)"/><path fill="#fff" d="M38.5,43h-1c-0.276,0-0.5-0.224-0.5-0.5v-9c0-0.276,0.224-0.5,0.5-0.5h1c0.276,0,0.5,0.224,0.5,0.5 v9C39,42.776,38.776,43,38.5,43z"/><path fill="#fff" d="M33,38.5v-1c0-0.276,0.224-0.5,0.5-0.5h9c0.276,0,0.5,0.224,0.5,0.5v1c0,0.276-0.224,0.5-0.5,0.5h-9 C33.224,39,33,38.776,33,38.5z"/></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="512px" height="512px"><path fill="#ffa000" d="M40,12H22l-4-4H8c-2.199,0-4,1.801-4,4v8h40v-4C44,13.801,42.199,12,40,12z"/><path fill="#ffca28" d="M40,12H8c-2.199,0-4,1.801-4,4v20c0,2.199,1.801,4,4,4h32c2.199,0,4-1.801,4-4V16 C44,13.801,42.199,12,40,12z"/><rect width="2" height="14.142" x="28" y="22.929" fill="#616161" transform="rotate(-45.001 29 30)"/><rect width="2" height="4.243" x="31.5" y="31.379" fill="#37474f" transform="rotate(-45.001 32.5 33.5)"/><path fill="#616161" d="M31,25c0,3.866-3.134,7-7,7s-7-3.134-7-7s3.134-7,7-7S31,21.134,31,25z"/><path fill="#64b5f6" d="M29,25c0,2.761-2.239,5-5,5s-5-2.239-5-5s2.239-5,5-5S29,22.239,29,25z"/></svg>

After

Width:  |  Height:  |  Size: 723 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="512px" height="512px"><path fill="#546E7A" d="M6 14H42V18H6zM6 22H42V26H6zM6 30H42V34H6z"/><path fill="#2196F3" d="M24,45l-7-6.976h14L24,45z"/></svg>

After

Width:  |  Height:  |  Size: 217 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="480px" height="480px"><path fill="#607D8B" d="M39.6,27.2c0.1-0.7,0.2-1.4,0.2-2.2s-0.1-1.5-0.2-2.2l4.5-3.2c0.4-0.3,0.6-0.9,0.3-1.4L40,10.8c-0.3-0.5-0.8-0.7-1.3-0.4l-5,2.3c-1.2-0.9-2.4-1.6-3.8-2.2l-0.5-5.5c-0.1-0.5-0.5-0.9-1-0.9h-8.6c-0.5,0-1,0.4-1,0.9l-0.5,5.5c-1.4,0.6-2.7,1.3-3.8,2.2l-5-2.3c-0.5-0.2-1.1,0-1.3,0.4l-4.3,7.4c-0.3,0.5-0.1,1.1,0.3,1.4l4.5,3.2c-0.1,0.7-0.2,1.4-0.2,2.2s0.1,1.5,0.2,2.2L4,30.4c-0.4,0.3-0.6,0.9-0.3,1.4L8,39.2c0.3,0.5,0.8,0.7,1.3,0.4l5-2.3c1.2,0.9,2.4,1.6,3.8,2.2l0.5,5.5c0.1,0.5,0.5,0.9,1,0.9h8.6c0.5,0,1-0.4,1-0.9l0.5-5.5c1.4-0.6,2.7-1.3,3.8-2.2l5,2.3c0.5,0.2,1.1,0,1.3-0.4l4.3-7.4c0.3-0.5,0.1-1.1-0.3-1.4L39.6,27.2z M24,35c-5.5,0-10-4.5-10-10c0-5.5,4.5-10,10-10c5.5,0,10,4.5,10,10C34,30.5,29.5,35,24,35z"/><path fill="#455A64" d="M24,13c-6.6,0-12,5.4-12,12c0,6.6,5.4,12,12,12s12-5.4,12-12C36,18.4,30.6,13,24,13z M24,30c-2.8,0-5-2.2-5-5c0-2.8,2.2-5,5-5s5,2.2,5,5C29,27.8,26.8,30,24,30z"/></svg>

After

Width:  |  Height:  |  Size: 990 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="512px" height="512px"><linearGradient id="gCW9sGJUkBnBLRc40wQXGa" x1="25.447" x2="44.728" y1="4.921" y2="36.29" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#42a3f2"/><stop offset="1" stop-color="#42a4eb"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGa)" d="M42,8H19l11,30h12c1.105,0,2-0.895,2-2V10C44,8.895,43.105,8,42,8z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGb" x1="3.865" x2="23.412" y1="9.86" y2="41.663" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#1d59b3"/><stop offset="1" stop-color="#195bbc"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGb)" d="M19,8H6c-1.105,0-2,0.895-2,2v26c0,1.105,0.895,2,2,2h8v7.998 c0,0.891,1.077,1.337,1.707,0.707L24.412,38H30L19,8z"/><path fill="#fff" d="M12,25h6v2h-6V25z"/><path fill="#fff" d="M12.109,29L15,20l2.906,9h2.11L16,17h-2l-4,12H12.109z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGc" x1="29.064" x2="38.79" y1="23.554" y2="23.554" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGc)" d="M29.064,27.223c0.061-0.031,4.994-3.219,7.936-9.115L38.79,19 c-3.082,6.25-7.457,9.292-8.509,10L29.064,27.223z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGd" x1="28" x2="40" y1="23.5" y2="23.5" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGd)" d="M38,29c0,0-5-2.583-7.769-6.998L32,21c2.333,3.833,6.981,6.26,6.981,6.26L38,29z M28,18h12v2 H28V18z"/><linearGradient id="gCW9sGJUkBnBLRc40wQXGe" x1="33" x2="35" y1="18" y2="18" gradientUnits="userSpaceOnUse"><stop offset="0" stop-color="#11408a"/><stop offset="1" stop-color="#103f8f"/></linearGradient><path fill="url(#gCW9sGJUkBnBLRc40wQXGe)" d="M33,16h2v4h-2V16z"/></svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

+18
View File
@@ -0,0 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<title>I18N Commander</title>
<base href="/" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/app.css" />
</head>
<body>
<div id="app">Loading...</div>
<script src="js/bootstrap.bundle.min.js"></script>
<script src="_framework/blazor.webview.js" autostart="false"></script>
</body>
</html>
@@ -0,0 +1,7 @@
/*!
* Bootstrap v5.2.0 (https://getbootstrap.com/)
* Copyright 2011-2022 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e()}(this,(function(){"use strict";const t="transitionend",e=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},i=t=>{const i=e(t);return i&&document.querySelector(i)?i:null},n=t=>{const i=e(t);return i?document.querySelector(i):null},s=e=>{e.dispatchEvent(new Event(t))},o=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),r=t=>o(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,a=t=>{if(!o(t)||0===t.getClientRects().length)return!1;const e="visible"===getComputedStyle(t).getPropertyValue("visibility"),i=t.closest("details:not([open])");if(!i)return e;if(i!==t){const e=t.closest("summary");if(e&&e.parentNode!==i)return!1;if(null===e)return!1}return e},l=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),c=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?c(t.parentNode):null},h=()=>{},d=t=>{t.offsetHeight},u=()=>window.jQuery&&!document.body.hasAttribute("data-bs-no-jquery")?window.jQuery:null,f=[],p=()=>"rtl"===document.documentElement.dir,g=t=>{var e;e=()=>{const e=u();if(e){const i=t.NAME,n=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=n,t.jQueryInterface)}},"loading"===document.readyState?(f.length||document.addEventListener("DOMContentLoaded",(()=>{for(const t of f)t()})),f.push(e)):e()},m=t=>{"function"==typeof t&&t()},_=(e,i,n=!0)=>{if(!n)return void m(e);const o=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const n=Number.parseFloat(e),s=Number.parseFloat(i);return n||s?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(i)+5;let r=!1;const a=({target:n})=>{n===i&&(r=!0,i.removeEventListener(t,a),m(e))};i.addEventListener(t,a),setTimeout((()=>{r||s(i)}),o)},b=(t,e,i,n)=>{const s=t.length;let o=t.indexOf(e);return-1===o?!i&&n?t[s-1]:t[0]:(o+=i?1:-1,n&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))])},v=/[^.]*(?=\..*)\.|.*/,y=/\..*/,w=/::\d+$/,A={};let E=1;const T={mouseenter:"mouseover",mouseleave:"mouseout"},C=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function O(t,e){return e&&`${e}::${E++}`||t.uidEvent||E++}function x(t){const e=O(t);return t.uidEvent=e,A[e]=A[e]||{},A[e]}function k(t,e,i=null){return Object.values(t).find((t=>t.callable===e&&t.delegationSelector===i))}function L(t,e,i){const n="string"==typeof e,s=n?i:e||i;let o=N(t);return C.has(o)||(o=t),[n,s,o]}function D(t,e,i,n,s){if("string"!=typeof e||!t)return;let[o,r,a]=L(e,i,n);if(e in T){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};r=t(r)}const l=x(t),c=l[a]||(l[a]={}),h=k(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&s);const d=O(r,e.replace(v,"")),u=o?function(t,e,i){return function n(s){const o=t.querySelectorAll(e);for(let{target:r}=s;r&&r!==this;r=r.parentNode)for(const a of o)if(a===r)return j(s,{delegateTarget:r}),n.oneOff&&P.off(t,s.type,e,i),i.apply(r,[s])}}(t,i,r):function(t,e){return function i(n){return j(n,{delegateTarget:t}),i.oneOff&&P.off(t,n.type,e),e.apply(t,[n])}}(t,r);u.delegationSelector=o?i:null,u.callable=r,u.oneOff=s,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function S(t,e,i,n,s){const o=k(e[i],n,s);o&&(t.removeEventListener(i,o,Boolean(s)),delete e[i][o.uidEvent])}function I(t,e,i,n){const s=e[i]||{};for(const o of Object.keys(s))if(o.includes(n)){const n=s[o];S(t,e,i,n.callable,n.delegationSelector)}}function N(t){return t=t.replace(y,""),T[t]||t}const P={on(t,e,i,n){D(t,e,i,n,!1)},one(t,e,i,n){D(t,e,i,n,!0)},off(t,e,i,n){if("string"!=typeof e||!t)return;const[s,o,r]=L(e,i,n),a=r!==e,l=x(t),c=l[r]||{},h=e.startsWith(".");if(void 0===o){if(h)for(const i of Object.keys(l))I(t,l,i,e.slice(1));for(const i of Object.keys(c)){const n=i.replace(w,"");if(!a||e.includes(n)){const Line truncated
//# sourceMappingURL=bootstrap.bundle.min.js.map
@@ -0,0 +1 @@
{"version":3,"names":["TRANSITION_END","getSelector","element","selector","getAttribute","hrefAttribute","includes","startsWith","split","trim","getSelectorFromElement","document","querySelector","getElementFromSelector","triggerTransitionEnd","dispatchEvent","Event","isElement","object","jquery","nodeType","getElement","length","isVisible","getClientRects","elementIsVisible","getComputedStyle","getPropertyValue","closedDetails","closest","summary","parentNode","isDisabled","Node","ELEMENT_NODE","classList","contains","disabled","hasAttribute","findShadowRoot","documentElement","attachShadow","getRootNode","root","ShadowRoot","noop","reflow","offsetHeight","getjQuery","window","jQuery","body","DOMContentLoadedCallbacks","isRTL","dir","defineJQueryPlugin","plugin","callback","$","name","NAME","JQUERY_NO_CONFLICT","fn","jQueryInterface","Constructor","noConflict","readyState","addEventListener","push","execute","executeAfterTransition","transitionElement","waitForTransition","emulatedDuration","transitionDuration","transitionDelay","floatTransitionDuration","Number","parseFloat","floatTransitionDelay","getTransitionDurationFromElement","called","handler","target","removeEventListener","setTimeout","getNextActiveElement","list","activeElement","shouldGetNext","isCycleAllowed","listLength","index","indexOf","Math","max","min","namespaceRegex","stripNameRegex","stripUidRegex","eventRegistry","uidEvent","customEvents","mouseenter","mouseleave","nativeEvents","Set","makeEventUid","uid","getElementEvents","findHandler","events","callable","delegationSelector","Object","values","find","event","normalizeParameters","originalTypeEvent","delegationFunction","isDelegated","typeEvent","getTypeEvent","has","addHandler","oneOff","wrapFunction","relatedTarget","delegateTarget","call","this","handlers","previousFunction","replace","domElements","querySelectorAll","domElement","hydrateObj","EventHandler","off","type","apply","bootstrapDelegationHandler","bootstrapHandler","removeHandler","Boolean","removeNamespacedHandlers","namespace","storeElementEvent","handlerKey","keys","on","one","inNamespace","isNamespace","elementEvent","slice","keyHandlers","trigger","args","jQueryEvent","bubbles","nativeDispatch","defaultPrevented","isPropagationStopped","isImmediatePropagationStopped","isDefaultPrevented","evt","cancelable","preventDefault","obj","meta","key","value","entries","_unused","defineProperty","configurable","get","elementMap","Map","Data","set","instance","instanceMap","size","console","error","Array","from","remove","delete","normalizeData","toString","JSON","parse","decodeURIComponent","normalizeDataKey","chr","toLowerCase","Manipulator","setDataAttribute","setAttribute","removeDataAttribute","removeAttribute","getDataAttributes","attributes","bsKeys","dataset","filter","pureKey","charAt","getDataAttribute","Config","Default","DefaultType","Error","_getConfig","config","_mergeConfigObj","_configAfterMerge","_typeCheckConfig","jsonConfig","constructor","configTypes","property","expectedTypes","valueType","prototype","match","RegExp","test","TypeError","toUpperCase","BaseComponent","super","_element","_config","DATA_KEY","dispose","EVENT_KEY","propertyName","getOwnPropertyNames","_queueCallback","isAnimated","static","getInstance","VERSION","enableDismissTrigger","component","method","clickEvent","tagName","getOrCreateInstance","Alert","close","_destroyElement","each","data","undefined","SELECTOR_DATA_TOGGLE","Button","toggle","button","SelectorEngine","concat","Element","findOne","children","child","matches","parents","ancestor","prev","previous","previousElementSibling","next","nextElementSibling","focusableChildren","focusables","map","join","el","endCallback","leftCallback","rightCallback","Swipe","isSupported","_deltaX","_supportPointerEvents","PointerEvent","_initEvents","_start","_eventIsPointerPenTouch","clientX","touches","_end","_handleSwipe","_move","absDeltaX","abs","direction","add","pointerType","navigator","maxTouchPoints","ORDER_NEXT","ORDER_PREV","DIRECTION_LEFT","DIRECTION_RIGHT","EVENT_SLID","CLASS_NAME_CAROUSEL","CLASS_NAME_ACTIVE","KEY_TO_DIRECTION","ArrowLeft","ArrowRight","interval","keyboard","pause","ride","touch","wrap","Carousel","_interval","_activeElement","_isSliding","touchTimeout","_swipeHelper","_indicatorsElement","_addEventListeners","cycle","_slide","nextWhenVisible","hidden","_clearInterval","_updateInterval","setInterval","_maybeEnableCycle","to","items","_getItems","activeIndex","_getItemIndex","_getActive","order","defaultInterval","_keydown","_addTouchEventListeners","img","swipeConfig","_directionToOrder","clearTimeout","_setActiveIndicatorElement","activeIndicator","newActiveIndicator","elementInterval","parseInt","isNext","nextElement","nextElementIndex","triggerEvent","eventName","_orderToDirection","isCycling","directionalClassName","orderClassName","_isAnimated","SELECTOR_ACTIVE","clearInterval","carousel","slideIndex","carousels","CLASS_NAME_SHOW","CLASS_NAME_COLLAPSE","CLLine truncated
+76
View File
@@ -0,0 +1,76 @@
using DataModel.Database;
namespace UI_WinForms;
internal static class AppEvents
{
static AppEvents()
{
AppEvents.AddSomethingHandlers();
}
internal static void ResetAllSubscriptions()
{
WhenSettingsChanged = null;
WhenSectionChanged = null;
WhenTextElementChanged = null;
WhenTranslationChanged = null;
AppEvents.AddSomethingHandlers();
}
#region Event: Settings changed
internal static event EventHandler? WhenSettingsChanged;
internal static void SettingsChanged() => WhenSettingsChanged?.Invoke(null, EventArgs.Empty);
#endregion
#region Event: Section was changed
// Section changed event which can be subscribed:
internal static event EventHandler<Section>? WhenSectionChanged;
// Method to raise the section changed event:
internal static void SectionChanged(Section section) => WhenSectionChanged?.Invoke(null, section);
#endregion
#region Event: Text element was changed
// Text element changed event which can be subscribed:
internal static event EventHandler<TextElement?>? WhenTextElementChanged;
// Method to raise the text element changed event:
internal static void TextElementChanged(TextElement? textElement) => WhenTextElementChanged?.Invoke(null, textElement);
#endregion
#region Translation was changed
// Translation changed event which can be subscribed:
internal static event EventHandler<Translation?>? WhenTranslationChanged;
// Method to raise the translation changed event:
internal static void TranslationChanged(Translation? translation) => WhenTranslationChanged?.Invoke(null, translation);
#endregion
#region Event: Something was changed
internal static event EventHandler? WhenSomethingChanged;
internal static void SomethingChanged() => WhenSomethingChanged?.Invoke(null, EventArgs.Empty);
private static void AddSomethingHandlers()
{
// Raise the something event when any of the other change-events are raised:
WhenSectionChanged += (sender, args) => WhenSomethingChanged?.Invoke(sender, EventArgs.Empty);
WhenTextElementChanged += (sender, args) => WhenSomethingChanged?.Invoke(sender, EventArgs.Empty);
WhenTranslationChanged += (sender, args) => WhenSomethingChanged?.Invoke(sender, EventArgs.Empty);
WhenSettingsChanged += (sender, args) => WhenSomethingChanged?.Invoke(sender, EventArgs.Empty);
}
#endregion
}
@@ -0,0 +1,185 @@
namespace UI_WinForms.Components
{
partial class LoaderStart
{
/// <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 Component 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()
{
this.components = new System.ComponentModel.Container();
this.tableLayout = new System.Windows.Forms.TableLayoutPanel();
this.pictureBox = new System.Windows.Forms.PictureBox();
this.labelTitle = new System.Windows.Forms.Label();
this.flowLayoutButtons = new System.Windows.Forms.FlowLayoutPanel();
this.buttonNew = new System.Windows.Forms.Button();
this.buttonOpen = new System.Windows.Forms.Button();
this.labelVersion = new System.Windows.Forms.Label();
this.contextMenuRecentProjects = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.tableLayout.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
this.flowLayoutButtons.SuspendLayout();
this.contextMenuRecentProjects.SuspendLayout();
this.SuspendLayout();
//
// tableLayout
//
this.tableLayout.ColumnCount = 4;
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 128F));
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 360F));
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayout.Controls.Add(this.pictureBox, 1, 1);
this.tableLayout.Controls.Add(this.labelTitle, 2, 1);
this.tableLayout.Controls.Add(this.flowLayoutButtons, 1, 2);
this.tableLayout.Controls.Add(this.labelVersion, 1, 3);
this.tableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayout.Location = new System.Drawing.Point(0, 0);
this.tableLayout.Name = "tableLayout";
this.tableLayout.RowCount = 5;
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 128F));
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 66F));
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 40F));
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayout.Size = new System.Drawing.Size(937, 465);
this.tableLayout.TabIndex = 0;
//
// pictureBox
//
this.pictureBox.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox.Image = global::UI_WinForms.Resources.Icons.icons8_language_512;
this.pictureBox.Location = new System.Drawing.Point(227, 118);
this.pictureBox.Name = "pictureBox";
this.pictureBox.Size = new System.Drawing.Size(122, 122);
this.pictureBox.TabIndex = 0;
this.pictureBox.TabStop = false;
//
// labelTitle
//
this.labelTitle.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelTitle.Font = new System.Drawing.Font("Segoe UI", 28F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.labelTitle.Location = new System.Drawing.Point(355, 115);
this.labelTitle.Name = "labelTitle";
this.labelTitle.Size = new System.Drawing.Size(354, 128);
this.labelTitle.TabIndex = 1;
this.labelTitle.Text = "I18N Commander";
this.labelTitle.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// flowLayoutButtons
//
this.tableLayout.SetColumnSpan(this.flowLayoutButtons, 2);
this.flowLayoutButtons.Controls.Add(this.buttonNew);
this.flowLayoutButtons.Controls.Add(this.buttonOpen);
this.flowLayoutButtons.Dock = System.Windows.Forms.DockStyle.Fill;
this.flowLayoutButtons.Location = new System.Drawing.Point(224, 243);
this.flowLayoutButtons.Margin = new System.Windows.Forms.Padding(0);
this.flowLayoutButtons.Name = "flowLayoutButtons";
this.flowLayoutButtons.Size = new System.Drawing.Size(488, 66);
this.flowLayoutButtons.TabIndex = 2;
//
// buttonNew
//
this.buttonNew.Image = global::UI_WinForms.Resources.Icons.icons8_new_window_512;
this.buttonNew.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.buttonNew.Location = new System.Drawing.Point(3, 3);
this.buttonNew.Name = "buttonNew";
this.buttonNew.Size = new System.Drawing.Size(200, 60);
this.buttonNew.TabIndex = 0;
this.buttonNew.Text = "New Project";
this.buttonNew.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.buttonNew.UseVisualStyleBackColor = true;
this.buttonNew.Click += new System.EventHandler(this.buttonNew_Click);
//
// buttonOpen
//
this.buttonOpen.Image = global::UI_WinForms.Resources.Icons.icons8_open_file_under_cursor_512;
this.buttonOpen.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.buttonOpen.Location = new System.Drawing.Point(209, 3);
this.buttonOpen.Name = "buttonOpen";
this.buttonOpen.Size = new System.Drawing.Size(259, 60);
this.buttonOpen.TabIndex = 1;
this.buttonOpen.Text = "Open Recent Project";
this.buttonOpen.TextImageRelation = System.Windows.Forms.TextImageRelation.ImageBeforeText;
this.buttonOpen.UseVisualStyleBackColor = true;
this.buttonOpen.Click += new System.EventHandler(this.buttonOpen_Click);
//
// labelVersion
//
this.labelVersion.AutoSize = true;
this.labelVersion.BackColor = System.Drawing.Color.LightGray;
this.tableLayout.SetColumnSpan(this.labelVersion, 2);
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelVersion.Location = new System.Drawing.Point(227, 309);
this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(482, 40);
this.labelVersion.TabIndex = 3;
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
// contextMenuRecentProjects
//
this.contextMenuRecentProjects.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.contextMenuRecentProjects.ImageScalingSize = new System.Drawing.Size(20, 20);
this.contextMenuRecentProjects.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem1});
this.contextMenuRecentProjects.Name = "contextMenuRecentProjects";
this.contextMenuRecentProjects.Size = new System.Drawing.Size(73, 26);
this.contextMenuRecentProjects.Closing += new System.Windows.Forms.ToolStripDropDownClosingEventHandler(this.contextMenuRecentProjects_Closing);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(72, 22);
//
// LoaderStart
//
this.AutoScaleDimensions = new System.Drawing.SizeF(120F, 120F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.tableLayout);
this.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.Name = "LoaderStart";
this.Size = new System.Drawing.Size(937, 465);
this.tableLayout.ResumeLayout(false);
this.tableLayout.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
this.flowLayoutButtons.ResumeLayout(false);
this.contextMenuRecentProjects.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private TableLayoutPanel tableLayout;
private PictureBox pictureBox;
private Label labelTitle;
private FlowLayoutPanel flowLayoutButtons;
private Button buttonNew;
private Button buttonOpen;
private ContextMenuStrip contextMenuRecentProjects;
private ToolStripMenuItem toolStripMenuItem1;
private Label labelVersion;
}
}
@@ -0,0 +1,206 @@
using System.ComponentModel;
using Microsoft.Win32;
using Version = Processor.Version;
namespace UI_WinForms.Components;
[DefaultEvent(nameof(LoadProject))]
public partial class LoaderStart : UserControl
{
private bool areRecentProjectsVisible = false;
public LoaderStart()
{
this.InitializeComponent();
this.labelVersion.Text = Version.Text;
}
#region Recent Projects
private static RegistryKey I18NCommanderKey => Registry.CurrentUser.OpenSubKey("Software", RegistryKeyPermissionCheck.ReadWriteSubTree)!.CreateSubKey("I18N Commander", RegistryKeyPermissionCheck.ReadWriteSubTree);
/// <summary>
/// Gets or sets the list of recent projects without any extras e.g. it does not prune the list of projects.
/// </summary>
private static List<string> RecentProjects
{
get
{
using var regKey = LoaderStart.I18NCommanderKey;
var recentProjectsValue = regKey.GetValue("recentProjects");
return recentProjectsValue switch
{
string[] list => new List<string>(list),
_ => new List<string>(),
};
}
set
{
using var regKey = LoaderStart.I18NCommanderKey;
regKey.SetValue("recentProjects", value.ToArray(), RegistryValueKind.MultiString);
}
}
private static void UpdateRecentProjectsWithPruning(string latestUsedProjectPath)
{
var previousRecentList = LoaderStart.RecentProjects;
// Check, if the latest project is identical to the next project we open. In that case, we don't add it to the list.
if (previousRecentList.Any() && previousRecentList[0] == latestUsedProjectPath)
return;
// Add the next project to the list:
previousRecentList.Insert(0, latestUsedProjectPath);
// Prune the list:
if (previousRecentList.Count > 6)
previousRecentList = previousRecentList.Take(6).ToList();
LoaderStart.RecentProjects = previousRecentList;
}
#endregion
// Opens the recent projects dropdown menu.
private void buttonOpen_Click(object sender, EventArgs e)
{
if(this.DesignMode)
return;
if(this.areRecentProjectsVisible)
{
this.areRecentProjectsVisible = false;
this.contextMenuRecentProjects.Close();
return;
}
var recentProjects = LoaderStart.RecentProjects;
this.contextMenuRecentProjects.Items.Clear();
this.contextMenuRecentProjects.Items.Add("Browse for project...", Resources.Icons.icons8_browse_folder_512, (innerSender, args) => this.BrowseForProject());
foreach (var recentProject in recentProjects)
{
var fileInfo = new FileInfo(recentProject);
// Split the file's path into each folder's name:
var folderNames = fileInfo.DirectoryName!.Split(Path.DirectorySeparatorChar);
// Distinguish between I18N Commander projects and JSON imports:
if (fileInfo.Extension == ".i18nc")
{
// Render this entry:
var item = this.contextMenuRecentProjects.Items.Add($"{folderNames.Last()}: {fileInfo.Name}", Resources.Icons.icons8_document_512, (innerSender, args) => this.OpenRecentProject(innerSender, LoaderAction.LOAD_PROJECT));
item.Tag = recentProject;
}
else if (fileInfo.Extension == ".json")
{
// Render this entry:
var item = this.contextMenuRecentProjects.Items.Add($"{folderNames.Last()}: {fileInfo.Name}", Resources.Icons.icons8_git, (innerSender, args) => this.OpenRecentProject(innerSender, LoaderAction.IMPORT_JSON));
item.Tag = recentProject;
}
}
var button = (sender as Button)!;
this.contextMenuRecentProjects.Show(button, 0, button.Height);
this.areRecentProjectsVisible = true;
}
private void buttonNew_Click(object sender, EventArgs e)
{
if(this.DesignMode)
return;
var saveDialog = new SaveFileDialog
{
AddExtension = true,
CheckPathExists = true,
CheckFileExists = false,
CreatePrompt = false,
OverwritePrompt = true,
DereferenceLinks = true,
DefaultExt = ".i18nc",
Filter = "I18N Commander Files (*.i18nc)|*.i18nc",
RestoreDirectory = true,
Title = "Create a new I18N Commander file",
};
var dialogResult = saveDialog.ShowDialog(this);
if (dialogResult != DialogResult.OK)
return;
var destinationFilePath = saveDialog.FileName;
// When the user chose an existing file, we delete it:
// (note: the user already accepts overwriting the file)
if (File.Exists(destinationFilePath))
File.Delete(destinationFilePath);
LoaderStart.UpdateRecentProjectsWithPruning(destinationFilePath);
this.OpenProject(LoaderAction.CREATE_NEW_PROJECT, destinationFilePath);
}
private void BrowseForProject()
{
var openDialog = new OpenFileDialog
{
AddExtension = true,
CheckPathExists = true,
CheckFileExists = true,
DereferenceLinks = true,
DefaultExt = ".i18nc",
// I18N Commander files (*.i18nc) or JSON files (*.json):
Filter = "I18N Commander Files (*.i18nc)|*.i18nc|JSON Files (*.json)|*.json",
Multiselect = false,
RestoreDirectory = true,
Title = "Open an I18N Commander file or Import a JSON file",
};
var dialogResult = openDialog.ShowDialog(this);
if (dialogResult != DialogResult.OK)
return;
var projectFilePath = openDialog.FileName;
LoaderStart.UpdateRecentProjectsWithPruning(projectFilePath);
// Check, if the user chose an I18N Commander file or a JSON file:
if (projectFilePath.ToLowerInvariant().EndsWith(".i18nc", StringComparison.InvariantCulture))
this.OpenProject(LoaderAction.LOAD_PROJECT, projectFilePath);
else if (projectFilePath.ToLowerInvariant().EndsWith(".json", StringComparison.InvariantCulture))
this.OpenProject(LoaderAction.IMPORT_JSON, projectFilePath);
}
private void OpenRecentProject(object? sender, LoaderAction action)
{
if (sender is not ToolStripItem item)
return;
var path = (item.Tag as string)!;
LoaderStart.UpdateRecentProjectsWithPruning(path);
this.OpenProject(action, path);
}
private void OpenProject(LoaderAction action, string path)
{
// Hint: the project file might or might not exist (new project vs. recent project)
this.LoadProject?.Invoke(this, new LoaderResult(action, path));
}
private void contextMenuRecentProjects_Closing(object sender, ToolStripDropDownClosingEventArgs e)
{
this.areRecentProjectsVisible = false;
}
[Category("Settings"), Description("When the user chooses a project to load.")]
public event EventHandler<LoaderResult>? LoadProject;
public readonly record struct LoaderResult(LoaderAction Action, string DataFile);
public enum LoaderAction
{
NONE,
LOAD_PROJECT,
CREATE_NEW_PROJECT,
IMPORT_JSON,
}
}
@@ -0,0 +1,63 @@
<root>
<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="contextMenuRecentProjects.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>
+251
View File
@@ -0,0 +1,251 @@
namespace UI_WinForms.Components
{
partial class Main
{
/// <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 Component 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()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Main));
this.tableLayout = new System.Windows.Forms.TableLayoutPanel();
this.splitContainerLR = new System.Windows.Forms.SplitContainer();
this.sectionTree = new UI_WinForms.Components.SectionTree();
this.splitContainerRTB = new System.Windows.Forms.SplitContainer();
this.textElements = new UI_WinForms.Components.TextElements();
this.translations = new UI_WinForms.Components.Translations();
this.translationProgress = new UI_WinForms.Components.TranslationProgress();
this.tabControl = new System.Windows.Forms.TabControl();
this.tabTranslation = new System.Windows.Forms.TabPage();
this.tabSettings = new System.Windows.Forms.TabPage();
this.settings = new UI_WinForms.Components.Settings();
this.imageList = new System.Windows.Forms.ImageList(this.components);
this.tableLayout.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainerLR)).BeginInit();
this.splitContainerLR.Panel1.SuspendLayout();
this.splitContainerLR.Panel2.SuspendLayout();
this.splitContainerLR.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainerRTB)).BeginInit();
this.splitContainerRTB.Panel1.SuspendLayout();
this.splitContainerRTB.Panel2.SuspendLayout();
this.splitContainerRTB.SuspendLayout();
this.tabControl.SuspendLayout();
this.tabTranslation.SuspendLayout();
this.tabSettings.SuspendLayout();
this.SuspendLayout();
//
// tableLayout
//
this.tableLayout.ColumnCount = 1;
this.tableLayout.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayout.Controls.Add(this.splitContainerLR, 0, 1);
this.tableLayout.Controls.Add(this.translationProgress, 0, 0);
this.tableLayout.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayout.Location = new System.Drawing.Point(3, 3);
this.tableLayout.Name = "tableLayout";
this.tableLayout.RowCount = 2;
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 20F));
this.tableLayout.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.tableLayout.Size = new System.Drawing.Size(1237, 709);
this.tableLayout.TabIndex = 0;
//
// splitContainerLR
//
this.splitContainerLR.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainerLR.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerLR.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainerLR.Location = new System.Drawing.Point(3, 23);
this.splitContainerLR.Name = "splitContainerLR";
//
// splitContainerLR.Panel1
//
this.splitContainerLR.Panel1.Controls.Add(this.sectionTree);
this.splitContainerLR.Panel1MinSize = 300;
//
// splitContainerLR.Panel2
//
this.splitContainerLR.Panel2.Controls.Add(this.splitContainerRTB);
this.splitContainerLR.Size = new System.Drawing.Size(1231, 683);
this.splitContainerLR.SplitterDistance = 319;
this.splitContainerLR.TabIndex = 1;
//
// sectionTree
//
this.sectionTree.Dock = System.Windows.Forms.DockStyle.Fill;
this.sectionTree.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.sectionTree.Location = new System.Drawing.Point(0, 0);
this.sectionTree.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.sectionTree.Name = "sectionTree";
this.sectionTree.Size = new System.Drawing.Size(317, 681);
this.sectionTree.TabIndex = 0;
//
// splitContainerRTB
//
this.splitContainerRTB.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.splitContainerRTB.Dock = System.Windows.Forms.DockStyle.Fill;
this.splitContainerRTB.FixedPanel = System.Windows.Forms.FixedPanel.Panel1;
this.splitContainerRTB.Location = new System.Drawing.Point(0, 0);
this.splitContainerRTB.Name = "splitContainerRTB";
this.splitContainerRTB.Orientation = System.Windows.Forms.Orientation.Horizontal;
//
// splitContainerRTB.Panel1
//
this.splitContainerRTB.Panel1.Controls.Add(this.textElements);
this.splitContainerRTB.Panel1MinSize = 376;
//
// splitContainerRTB.Panel2
//
this.splitContainerRTB.Panel2.Controls.Add(this.translations);
this.splitContainerRTB.Size = new System.Drawing.Size(908, 683);
this.splitContainerRTB.SplitterDistance = 376;
this.splitContainerRTB.TabIndex = 0;
//
// textElements
//
this.textElements.Dock = System.Windows.Forms.DockStyle.Fill;
this.textElements.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.textElements.Location = new System.Drawing.Point(0, 0);
this.textElements.Name = "textElements";
this.textElements.Size = new System.Drawing.Size(906, 374);
this.textElements.TabIndex = 0;
//
// translations
//
this.translations.Dock = System.Windows.Forms.DockStyle.Fill;
this.translations.Enabled = false;
this.translations.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.translations.Location = new System.Drawing.Point(0, 0);
this.translations.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.translations.Name = "translations";
this.translations.Size = new System.Drawing.Size(906, 301);
this.translations.TabIndex = 0;
//
// translationProgress
//
this.translationProgress.Dock = System.Windows.Forms.DockStyle.Fill;
this.translationProgress.Location = new System.Drawing.Point(0, 0);
this.translationProgress.Margin = new System.Windows.Forms.Padding(0);
this.translationProgress.Name = "translationProgress";
this.translationProgress.Size = new System.Drawing.Size(1237, 20);
this.translationProgress.TabIndex = 2;
//
// tabControl
//
this.tabControl.Alignment = System.Windows.Forms.TabAlignment.Left;
this.tabControl.Controls.Add(this.tabTranslation);
this.tabControl.Controls.Add(this.tabSettings);
this.tabControl.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl.ImageList = this.imageList;
this.tabControl.Location = new System.Drawing.Point(0, 0);
this.tabControl.Multiline = true;
this.tabControl.Name = "tabControl";
this.tabControl.Padding = new System.Drawing.Point(12, 12);
this.tabControl.SelectedIndex = 0;
this.tabControl.Size = new System.Drawing.Size(1317, 723);
this.tabControl.TabIndex = 1;
this.tabControl.SelectedIndexChanged += new System.EventHandler(this.tabControl_SelectedIndexChanged);
//
// tabTranslation
//
this.tabTranslation.Controls.Add(this.tableLayout);
this.tabTranslation.ImageIndex = 1;
this.tabTranslation.Location = new System.Drawing.Point(70, 4);
this.tabTranslation.Name = "tabTranslation";
this.tabTranslation.Padding = new System.Windows.Forms.Padding(3);
this.tabTranslation.Size = new System.Drawing.Size(1243, 715);
this.tabTranslation.TabIndex = 0;
this.tabTranslation.Text = "Translation";
this.tabTranslation.UseVisualStyleBackColor = true;
//
// tabSettings
//
this.tabSettings.Controls.Add(this.settings);
this.tabSettings.ImageIndex = 0;
this.tabSettings.Location = new System.Drawing.Point(70, 4);
this.tabSettings.Name = "tabSettings";
this.tabSettings.Padding = new System.Windows.Forms.Padding(3);
this.tabSettings.Size = new System.Drawing.Size(1243, 715);
this.tabSettings.TabIndex = 1;
this.tabSettings.Text = "Settings";
this.tabSettings.UseVisualStyleBackColor = true;
//
// settings
//
this.settings.Dock = System.Windows.Forms.DockStyle.Fill;
this.settings.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.settings.Location = new System.Drawing.Point(3, 3);
this.settings.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
this.settings.Name = "settings";
this.settings.Size = new System.Drawing.Size(1237, 709);
this.settings.TabIndex = 0;
//
// imageList
//
this.imageList.ColorDepth = System.Windows.Forms.ColorDepth.Depth32Bit;
this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream")));
this.imageList.TransparentColor = System.Drawing.Color.Transparent;
this.imageList.Images.SetKeyName(0, "icons8-settings.svg.png");
this.imageList.Images.SetKeyName(1, "icons8-language-45.png");
//
// Main
//
this.AutoScaleDimensions = new System.Drawing.SizeF(96F, 96F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Dpi;
this.Controls.Add(this.tabControl);
this.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
this.Name = "Main";
this.Size = new System.Drawing.Size(1317, 723);
this.tableLayout.ResumeLayout(false);
this.splitContainerLR.Panel1.ResumeLayout(false);
this.splitContainerLR.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainerLR)).EndInit();
this.splitContainerLR.ResumeLayout(false);
this.splitContainerRTB.Panel1.ResumeLayout(false);
this.splitContainerRTB.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainerRTB)).EndInit();
this.splitContainerRTB.ResumeLayout(false);
this.tabControl.ResumeLayout(false);
this.tabTranslation.ResumeLayout(false);
this.tabSettings.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private TableLayoutPanel tableLayout;
private SplitContainer splitContainerLR;
private SplitContainer splitContainerRTB;
private SectionTree sectionTree;
private TextElements textElements;
private TabControl tabControl;
private TabPage tabTranslation;
private TabPage tabSettings;
private ImageList imageList;
private Settings settings;
private Translations translations;
private TranslationProgress translationProgress;
}
}
Loaded 100 of 176 files, more files were not shown because too many files have changed in this diff. Show more