Skip to content

Commit

Permalink
UIStringResources.xaml에서 DisclaimerWindow 파트를 UIStringResources.resx로 이관
Browse files Browse the repository at this point in the history
  • Loading branch information
rkttu committed Jan 9, 2024
1 parent 940b5e6 commit c738af6
Show file tree
Hide file tree
Showing 5 changed files with 249 additions and 24 deletions.
9 changes: 5 additions & 4 deletions src/TableCloth/Dialogs/DisclaimerWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@
xmlns:vm="clr-namespace:TableCloth.ViewModels"
xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
xmlns:local="clr-namespace:TableCloth.Dialogs"
xmlns:res="clr-namespace:TableCloth.Resources"
mc:Ignorable="d"
Style="{DynamicResource MainWindowStyle}"
WindowStyle="SingleBorderWindow" WindowStartupLocation="CenterOwner"
Title="{StaticResource DisclaimerWindow_Title}" Height="320" Width="480"
Title="{x:Static res:UIStringResources.DisclaimerWindow_Title}" Height="320" Width="480"
TextOptions.TextFormattingMode="Display" TextOptions.TextRenderingMode="ClearType"
d:DataContext="{d:DesignInstance Type=vm:DisclaimerWindowViewModelForDesigner, IsDesignTimeCreatable=True}">
<i:Interaction.Triggers>
Expand All @@ -27,9 +28,9 @@
<RowDefinition Height="1*" />
<RowDefinition Height="30" />
</Grid.RowDefinitions>
<Label Grid.Row="0" Content="{StaticResource DisclaimerWindow_Readme}" />
<TextBox Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" IsReadOnly="True" Margin="0 10 0 10" FontSize="15" FontWeight="Bold" Foreground="Red" Text="{StaticResource DisclaimerWindow_Content}" />
<Button x:Name="AgreeDisclaimer" Grid.Row="2" Content="{StaticResource DisclaimerWindow_AgreeButtonText}" Command="{Binding DisclaimerWindowAcknowledgeCommand}">
<Label Grid.Row="0" Content="{x:Static res:UIStringResources.DisclaimerWindow_Readme}" />
<TextBox Grid.Row="1" HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" TextWrapping="Wrap" IsReadOnly="True" Margin="0 10 0 10" FontSize="15" FontWeight="Bold" Foreground="Red" Text="{x:Static res:UIStringResources.DisclaimerWindow_Content}" />
<Button x:Name="AgreeDisclaimer" Grid.Row="2" Content="{x:Static res:UIStringResources.DisclaimerWindow_AgreeButtonText}" Command="{Binding DisclaimerWindowAcknowledgeCommand}">
<Button.CommandParameter>
<Binding Path="DataContext" RelativeSource="{RelativeSource Mode=FindAncestor, AncestorType={x:Type Window}}" />
</Button.CommandParameter>
Expand Down
101 changes: 101 additions & 0 deletions src/TableCloth/Resources/UIStringResources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

134 changes: 134 additions & 0 deletions src/TableCloth/Resources/UIStringResources.resx
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="DisclaimerWindow_AgreeButtonText" xml:space="preserve">
<value>동의합니다. 일주일 동안 이 화면을 보지 않겠습니다.</value>
</data>
<data name="DisclaimerWindow_Content" xml:space="preserve">
<value>식탁보를 사용 중 발생하는 개인, 기업, 기관의 금전 손실, 세금 신고 누락 등을 비롯한 어떠한 장애나 손해에 대해서는 사용자 본인에게 책임이 있습니다.

가상 환경이 아닌 실제 컴퓨터 환경에서 실행되어야 손해나 피해가 발생하지 않는 작업은 식탁보를 이용하지 않고 실제 PC 환경에서 사용하는 것을 권장합니다.</value>
</data>
<data name="DisclaimerWindow_Readme" xml:space="preserve">
<value>꼭 읽어주세요.</value>
</data>
<data name="DisclaimerWindow_Title" xml:space="preserve">
<value>식탁보 사용 시 주의 사항</value>
</data>
</root>
20 changes: 0 additions & 20 deletions src/TableCloth/Resources/UIStringResources.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,6 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">

<!-- DisclaimerWindow.xaml -->

<system:String x:Key="DisclaimerWindow_Title">
식탁보 사용 시 주의 사항
</system:String>

<system:String x:Key="DisclaimerWindow_Readme">
꼭 읽어주세요.
</system:String>

<system:String x:Key="DisclaimerWindow_Content" xml:space="preserve">
식탁보를 사용 중 발생하는 개인, 기업, 기관의 금전 손실, 세금 신고 누락 등을 비롯한 어떠한 장애나 손해에 대해서는 사용자 본인에게 책임이 있습니다.

가상 환경이 아닌 실제 컴퓨터 환경에서 실행되어야 손해나 피해가 발생하지 않는 작업은 식탁보를 이용하지 않고 실제 PC 환경에서 사용하는 것을 권장합니다.
</system:String>

<system:String x:Key="DisclaimerWindow_AgreeButtonText">
동의합니다. 일주일 동안 이 화면을 보지 않겠습니다.
</system:String>

<!-- MainWindow.xaml -->

<system:String x:Key="MainWindow_Title">
Expand Down
9 changes: 9 additions & 0 deletions src/TableCloth/TableCloth.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,22 @@
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Update="Resources\UIStringResources.Designer.cs">
<DesignTime>True</DesignTime>
<AutoGen>True</AutoGen>
<DependentUpon>UIStringResources.resx</DependentUpon>
</Compile>
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\UIStringResources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>UIStringResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>

<Import Project="..\TableCloth.Shared\TableCloth.Shared.projitems" Label="Shared" />
Expand Down

0 comments on commit c738af6

Please sign in to comment.