mirror of
https://github.com/vczh-libraries/Release.git
synced 2026-05-23 07:45:59 +08:00
Update release
This commit is contained in:
+124
@@ -0,0 +1,124 @@
|
||||
<Folder>
|
||||
<LocalizedStrings name="StringResource">
|
||||
<LocalizedStrings ref.Class="demo::StringResource" DefaultLocale="en-US">
|
||||
<Strings Locales="en-US">
|
||||
<String Name="ShortDate" Text="ShortDate: $(0:ShortDate)"/>
|
||||
<String Name="LongDate" Text="LongDate: $(0:LongDate)"/>
|
||||
<String Name="YearMonthDate" Text="YearMonthDate: $(0:YearMonthDate)"/>
|
||||
<String Name="ShortTime" Text="ShortTime: $(0:ShortTime)"/>
|
||||
<String Name="LongTime" Text="LongTime: $(0:LongTime)"/>
|
||||
<String Name="DateFormat" Text="DateFormat: $(0:Date:yyyy)"/>
|
||||
<String Name="TimeFormat" Text="TimeFormat: $(0:Time:HH)"/>
|
||||
<String Name="Number" Text="Number: $(0:Number)"/>
|
||||
<String Name="Currency" Text="Currency: $(0:Currency)"/>
|
||||
<String Name="Sentence" Text="$($)Good morning, $(0)!$($)"/>
|
||||
<String Name="Title" Text="Localization"/>
|
||||
<String Name="Label" Text="Selected Locale:"/>
|
||||
</Strings>
|
||||
|
||||
<Strings Locales="zh-CN">
|
||||
<String Name="ShortDate" Text="短日期:$(0:ShortDate)"/>
|
||||
<String Name="LongDate" Text="长日期:$(0:LongDate)"/>
|
||||
<String Name="YearMonthDate" Text="年月:$(0:YearMonthDate)"/>
|
||||
<String Name="ShortTime" Text="短时间:$(0:ShortTime)"/>
|
||||
<String Name="LongTime" Text="长时间:$(0:LongTime)"/>
|
||||
<String Name="DateFormat" Text="日期格式:$(0:Date:yyyy)"/>
|
||||
<String Name="TimeFormat" Text="时间格式: $(0:Time:HH)"/>
|
||||
<String Name="Number" Text="数字:$(0:Number)"/>
|
||||
<String Name="Currency" Text="货币:$(0:Currency)"/>
|
||||
<String Name="Sentence" Text="$($)$(0),早上好!$($)"/>
|
||||
<String Name="Title" Text="本地化"/>
|
||||
<String Name="Label" Text="语言设置:"/>
|
||||
</Strings>
|
||||
</LocalizedStrings>
|
||||
</LocalizedStrings>
|
||||
|
||||
<Instance name="MainWindowResource">
|
||||
<Instance ref.CodeBehind="false" ref.Class="demo::LocalizedStringsTabPage">
|
||||
<ref.Members>
|
||||
<![CDATA[
|
||||
func GetLocaleIndex(locale: Locale): int
|
||||
{
|
||||
for (i in range (0, listLocales.Items.Count))
|
||||
{
|
||||
if (listLocales.Items[i].Text == locale)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
var dateTime: DateTime = Sys::GetLocalTime();
|
||||
var number: int = 2147483647;
|
||||
var currency: double = 1342177.28;
|
||||
]]>
|
||||
</ref.Members>
|
||||
<ref.LocalizedStrings Name="Strings" Uri="res://LocalizedStringsTabPage/StringResource" Default="true"/>
|
||||
<TabPage ref.Name="self" Text-str="Title()">
|
||||
<Table AlignmentToParent="left:0 top:0 right:0 bottom:0" CellPadding="5">
|
||||
<att.Rows>
|
||||
<_>composeType:MinSize</_>
|
||||
<_>composeType:Percentage percentage:1.0</_>
|
||||
</att.Rows>
|
||||
<att.Columns>
|
||||
<_>composeType:MinSize</_>
|
||||
<_>composeType:MinSize</_>
|
||||
<_>composeType:Percentage percentage:1.0</_>
|
||||
</att.Columns>
|
||||
|
||||
<Cell Site="row:0 column:0">
|
||||
<SolidLabel Font-bind="self.Font" Color="#FFFFFF" Text-str="Label()" VerticalAlignment="Center"/>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:0 column:1">
|
||||
<ComboBox ref.Name="comboLocales">
|
||||
<att.BoundsComposition-set PreferredMinSize="x:120"/>
|
||||
<att.SelectedIndex-bind>self.GetLocaleIndex(Application::GetApplication().Locale)</att.SelectedIndex-bind>
|
||||
<ev.SelectedIndexChanged-eval>
|
||||
<![CDATA[
|
||||
{
|
||||
var index = comboLocales.SelectedIndex;
|
||||
if (index == -1)
|
||||
{
|
||||
index = 0;
|
||||
}
|
||||
Application::GetApplication().Locale = cast Locale listLocales.Items[index].Text;
|
||||
}
|
||||
]]>
|
||||
</ev.SelectedIndexChanged-eval>
|
||||
<att.ListControl>
|
||||
<TextList ref.Name="listLocales" HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
|
||||
<att.Items>
|
||||
<_ Text="en-US"/>
|
||||
<_ Text="zh-CN"/>
|
||||
</att.Items>
|
||||
</TextList>
|
||||
</att.ListControl>
|
||||
</ComboBox>
|
||||
</Cell>
|
||||
|
||||
<Cell Site="row:1 column:0 columnSpan:3">
|
||||
<TextList HorizontalAlwaysVisible="false" VerticalAlwaysVisible="false">
|
||||
<att.BoundsComposition-set AlignmentToParent="left:0 top:0 right:0 bottom:0"/>
|
||||
<att.Items>
|
||||
<_ Text-str="ShortDate(self.dateTime)"/>
|
||||
<_ Text-str="LongDate(self.dateTime)"/>
|
||||
<_ Text-str="YearMonthDate(self.dateTime)"/>
|
||||
<_ Text-str="ShortTime(self.dateTime)"/>
|
||||
<_ Text-str="LongTime(self.dateTime)"/>
|
||||
<_ Text-str="DateFormat(self.dateTime)"/>
|
||||
<_ Text-str="TimeFormat(self.dateTime)"/>
|
||||
<_ Text-str="Number(self.number)"/>
|
||||
<_ Text-str="Currency(self.currency)"/>
|
||||
<_ Text-str="Sentence('John Smith')"/>
|
||||
<_ Text-str="Strings.Sentence('John Smith')"/>
|
||||
<_ Text-bind="self.Strings.Sentence('John Smith') ?? ''"/>
|
||||
</att.Items>
|
||||
</TextList>
|
||||
</Cell>
|
||||
</Table>
|
||||
</TabPage>
|
||||
</Instance>
|
||||
</Instance>
|
||||
</Folder>
|
||||
@@ -25,12 +25,34 @@
|
||||
</att.Pages>
|
||||
</Tab>
|
||||
</TabPage>
|
||||
<demo:RepeatTabPage Alt="R"/>
|
||||
<demo:DocumentTabPage Alt="D"/>
|
||||
<demo:TextBoxTabPage Alt="D"/>
|
||||
<demo:ElementTabPage Alt="E"/>
|
||||
<demo:AnimationTabPage Alt="A"/>
|
||||
<demo:ResponsiveTabPage Alt="R"/>
|
||||
<TabPage Alt="L" Text="Layout">
|
||||
<Tab>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
|
||||
<att.Pages>
|
||||
<demo:RepeatTabPage Alt="R"/>
|
||||
<demo:ResponsiveTabPage Alt="R"/>
|
||||
</att.Pages>
|
||||
</Tab>
|
||||
</TabPage>
|
||||
<TabPage Alt="L" Text="Control">
|
||||
<Tab>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
|
||||
<att.Pages>
|
||||
<demo:DocumentTabPage Alt="D"/>
|
||||
<demo:TextBoxTabPage Alt="D"/>
|
||||
</att.Pages>
|
||||
</Tab>
|
||||
</TabPage>
|
||||
<TabPage Alt="M" Text="Misc">
|
||||
<Tab>
|
||||
<att.BoundsComposition-set AlignmentToParent="left:5 top:5 right:5 bottom:5"/>
|
||||
<att.Pages>
|
||||
<demo:ElementTabPage Alt="E"/>
|
||||
<demo:AnimationTabPage Alt="A"/>
|
||||
<demo:LocalizedStringsTabPage Alt="L"/>
|
||||
</att.Pages>
|
||||
</Tab>
|
||||
</TabPage>
|
||||
</att.Pages>
|
||||
</Tab>
|
||||
</Window>
|
||||
@@ -40,16 +62,21 @@
|
||||
<Instance name="TextListTabPageResource" content="File">TextListTabPage.xml</Instance>
|
||||
<Instance name="ListViewTabPageResource" content="File">ListViewTabPage.xml</Instance>
|
||||
<Instance name="TreeViewTabPageResource" content="File">TreeViewTabPage.xml</Instance>
|
||||
<Instance name="RepeatTabPageResource" content="File">RepeatTabPage.xml</Instance>
|
||||
<Instance name="DataGridTabPageResource" content="File">DataGridTabPage.xml</Instance>
|
||||
<Folder name="DataGridComponents" content="Link">DataGridComponents.xml</Folder>
|
||||
|
||||
<Instance name="RepeatTabPageResource" content="File">RepeatTabPage.xml</Instance>
|
||||
<Folder name="ResponsiveTabPage" content="Link">ResponsiveTabPage.xml</Folder>
|
||||
<Folder name="RepeatComponents" content="Link">RepeatComponents.xml</Folder>
|
||||
|
||||
<Instance name="DocumentTabPageResource" content="File">DocumentTabPage.xml</Instance>
|
||||
<Folder name="TextBoxComponents" content="Link">TextBoxTabPage.xml</Folder>
|
||||
<Folder name="DocumentComponents" content="Link">DocumentComponents.xml</Folder>
|
||||
|
||||
<Instance name="ElementTabPageResource" content="File">ElementTabPage.xml</Instance>
|
||||
<Folder name="AnimationTabPage" content="Link">AnimationTabPage.xml</Folder>
|
||||
<Folder name="ResponsiveTabPage" content="Link">ResponsiveTabPage.xml</Folder>
|
||||
<Folder name="TextBoxComponents" content="Link">TextBoxTabPage.xml</Folder>
|
||||
<Folder name="DataGridComponents" content="Link">DataGridComponents.xml</Folder>
|
||||
<Folder name="RepeatComponents" content="Link">RepeatComponents.xml</Folder>
|
||||
<Folder name="DocumentComponents" content="Link">DocumentComponents.xml</Folder>
|
||||
<Folder name="LocalizedStringsTabPage" content="Link">LocalizedStringsTabPage.xml</Folder>
|
||||
|
||||
<Folder name="LargeImages" content="Link">Images/LargeImages.xml</Folder>
|
||||
<Folder name="SmallImages" content="Link">Images/SmallImages.xml</Folder>
|
||||
<Folder name="MiscImages" content="Link">Images/MiscImages.xml</Folder>
|
||||
|
||||
+2547
-553
File diff suppressed because it is too large
Load Diff
+1074
-341
File diff suppressed because it is too large
Load Diff
@@ -63,8 +63,11 @@ namespace vl
|
||||
IMPL_CPP_TYPE_INFO(demo::GenderVisualizerConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::HyperlinkWindow)
|
||||
IMPL_CPP_TYPE_INFO(demo::HyperlinkWindowConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::IStringResourceStrings)
|
||||
IMPL_CPP_TYPE_INFO(demo::ListViewTabPage)
|
||||
IMPL_CPP_TYPE_INFO(demo::ListViewTabPageConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::LocalizedStringsTabPage)
|
||||
IMPL_CPP_TYPE_INFO(demo::LocalizedStringsTabPageConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindow)
|
||||
IMPL_CPP_TYPE_INFO(demo::MainWindowConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::MyCategory)
|
||||
@@ -83,6 +86,7 @@ namespace vl
|
||||
IMPL_CPP_TYPE_INFO(demo::ResponsiveTabPageConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::ResponsiveViewControl)
|
||||
IMPL_CPP_TYPE_INFO(demo::ResponsiveViewControlConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::StringResource)
|
||||
IMPL_CPP_TYPE_INFO(demo::TextBoxTabPage)
|
||||
IMPL_CPP_TYPE_INFO(demo::TextBoxTabPageConstructor)
|
||||
IMPL_CPP_TYPE_INFO(demo::TextEditor)
|
||||
@@ -589,6 +593,21 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(textUrl)
|
||||
END_CLASS_MEMBER(::demo::HyperlinkWindowConstructor)
|
||||
|
||||
BEGIN_INTERFACE_MEMBER(::demo::IStringResourceStrings)
|
||||
CLASS_MEMBER_METHOD(Currency, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(DateFormat, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(Label, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(LongDate, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(LongTime, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(Number, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(Sentence, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(ShortDate, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(ShortTime, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(TimeFormat, { L"__vwsn_ls_0" })
|
||||
CLASS_MEMBER_METHOD(Title, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(YearMonthDate, { L"__vwsn_ls_0" })
|
||||
END_INTERFACE_MEMBER(::demo::IStringResourceStrings)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::ListViewTabPage)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::ListViewTabPage*(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_instance_ctor_, NO_PARAMETER)
|
||||
@@ -625,6 +644,50 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::demo::ListViewTabPageConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::LocalizedStringsTabPage)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::LocalizedStringsTabPage*(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(GetLocaleIndex, { L"locale" })
|
||||
CLASS_MEMBER_METHOD(GetStrings, NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(SetStrings, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_EVENT(StringsChanged)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Strings)
|
||||
CLASS_MEMBER_PROPERTY_EVENT(Strings, GetStrings, SetStrings, StringsChanged)
|
||||
CLASS_MEMBER_FIELD(currency)
|
||||
CLASS_MEMBER_FIELD(dateTime)
|
||||
CLASS_MEMBER_FIELD(number)
|
||||
END_CLASS_MEMBER(::demo::LocalizedStringsTabPage)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::LocalizedStringsTabPageConstructor)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::LocalizedStringsTabPageConstructor>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(__vwsn_initialize_instance_, { L"__vwsn_this_" })
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_0)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_1)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_10)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_11)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_12)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_14)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_15)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_16)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_17)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_18)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_19)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_20)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_21)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_6)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_7)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_8)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_9)
|
||||
CLASS_MEMBER_FIELD(Strings)
|
||||
CLASS_MEMBER_FIELD(comboLocales)
|
||||
CLASS_MEMBER_FIELD(listLocales)
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::demo::LocalizedStringsTabPageConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::MainWindow)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::MainWindow*(), NO_PARAMETER)
|
||||
END_CLASS_MEMBER(::demo::MainWindow)
|
||||
@@ -640,7 +703,17 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_13)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_14)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_15)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_16)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_17)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_18)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_19)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_2)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_20)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_21)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_22)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_23)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_24)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_25)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_3)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_4)
|
||||
CLASS_MEMBER_FIELD(__vwsn_precompile_5)
|
||||
@@ -958,6 +1031,12 @@ namespace vl
|
||||
CLASS_MEMBER_FIELD(self)
|
||||
END_CLASS_MEMBER(::demo::ResponsiveViewControlConstructor)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::StringResource)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::vl::Ptr<::demo::StringResource>(), NO_PARAMETER)
|
||||
CLASS_MEMBER_STATIC_METHOD(__vwsn_ls_First, { L"__vwsn_ls_formats" })
|
||||
CLASS_MEMBER_STATIC_METHOD(Get, { L"__vwsn_ls_locale" })
|
||||
END_CLASS_MEMBER(::demo::StringResource)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::TextBoxTabPage)
|
||||
CLASS_MEMBER_CONSTRUCTOR(::demo::TextBoxTabPage*(), NO_PARAMETER)
|
||||
CLASS_MEMBER_METHOD(UpdateFont, { L"newFont" })
|
||||
@@ -1156,8 +1235,11 @@ namespace vl
|
||||
ADD_TYPE_INFO(::demo::GenderVisualizerConstructor)
|
||||
ADD_TYPE_INFO(::demo::HyperlinkWindow)
|
||||
ADD_TYPE_INFO(::demo::HyperlinkWindowConstructor)
|
||||
ADD_TYPE_INFO(::demo::IStringResourceStrings)
|
||||
ADD_TYPE_INFO(::demo::ListViewTabPage)
|
||||
ADD_TYPE_INFO(::demo::ListViewTabPageConstructor)
|
||||
ADD_TYPE_INFO(::demo::LocalizedStringsTabPage)
|
||||
ADD_TYPE_INFO(::demo::LocalizedStringsTabPageConstructor)
|
||||
ADD_TYPE_INFO(::demo::MainWindow)
|
||||
ADD_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
ADD_TYPE_INFO(::demo::MyCategory)
|
||||
@@ -1176,6 +1258,7 @@ namespace vl
|
||||
ADD_TYPE_INFO(::demo::ResponsiveTabPageConstructor)
|
||||
ADD_TYPE_INFO(::demo::ResponsiveViewControl)
|
||||
ADD_TYPE_INFO(::demo::ResponsiveViewControlConstructor)
|
||||
ADD_TYPE_INFO(::demo::StringResource)
|
||||
ADD_TYPE_INFO(::demo::TextBoxTabPage)
|
||||
ADD_TYPE_INFO(::demo::TextBoxTabPageConstructor)
|
||||
ADD_TYPE_INFO(::demo::TextEditor)
|
||||
|
||||
@@ -66,8 +66,11 @@ namespace vl
|
||||
DECL_TYPE_INFO(::demo::GenderVisualizerConstructor)
|
||||
DECL_TYPE_INFO(::demo::HyperlinkWindow)
|
||||
DECL_TYPE_INFO(::demo::HyperlinkWindowConstructor)
|
||||
DECL_TYPE_INFO(::demo::IStringResourceStrings)
|
||||
DECL_TYPE_INFO(::demo::ListViewTabPage)
|
||||
DECL_TYPE_INFO(::demo::ListViewTabPageConstructor)
|
||||
DECL_TYPE_INFO(::demo::LocalizedStringsTabPage)
|
||||
DECL_TYPE_INFO(::demo::LocalizedStringsTabPageConstructor)
|
||||
DECL_TYPE_INFO(::demo::MainWindow)
|
||||
DECL_TYPE_INFO(::demo::MainWindowConstructor)
|
||||
DECL_TYPE_INFO(::demo::MyCategory)
|
||||
@@ -86,6 +89,7 @@ namespace vl
|
||||
DECL_TYPE_INFO(::demo::ResponsiveTabPageConstructor)
|
||||
DECL_TYPE_INFO(::demo::ResponsiveViewControl)
|
||||
DECL_TYPE_INFO(::demo::ResponsiveViewControlConstructor)
|
||||
DECL_TYPE_INFO(::demo::StringResource)
|
||||
DECL_TYPE_INFO(::demo::TextBoxTabPage)
|
||||
DECL_TYPE_INFO(::demo::TextBoxTabPageConstructor)
|
||||
DECL_TYPE_INFO(::demo::TextEditor)
|
||||
@@ -94,6 +98,57 @@ namespace vl
|
||||
DECL_TYPE_INFO(::demo::TextListTabPageConstructor)
|
||||
DECL_TYPE_INFO(::demo::TreeViewTabPage)
|
||||
DECL_TYPE_INFO(::demo::TreeViewTabPageConstructor)
|
||||
|
||||
BEGIN_INTERFACE_PROXY_NOPARENT_SHAREDPTR(::demo::IStringResourceStrings)
|
||||
::vl::WString Currency(const ::vl::WString& __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(Currency, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString DateFormat(::vl::DateTime __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(DateFormat, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString Label() override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(Label);
|
||||
}
|
||||
::vl::WString LongDate(::vl::DateTime __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(LongDate, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString LongTime(::vl::DateTime __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(LongTime, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString Number(const ::vl::WString& __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(Number, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString Sentence(const ::vl::WString& __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(Sentence, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString ShortDate(::vl::DateTime __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(ShortDate, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString ShortTime(::vl::DateTime __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(ShortTime, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString TimeFormat(::vl::DateTime __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(TimeFormat, __vwsn_ls_0);
|
||||
}
|
||||
::vl::WString Title() override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY_NOPARAMS(Title);
|
||||
}
|
||||
::vl::WString YearMonthDate(::vl::DateTime __vwsn_ls_0) override
|
||||
{
|
||||
INVOKEGET_INTERFACE_PROXY(YearMonthDate, __vwsn_ls_0);
|
||||
}
|
||||
END_INTERFACE_PROXY(::demo::IStringResourceStrings)
|
||||
#endif
|
||||
|
||||
extern bool LoadDemoTypes();
|
||||
|
||||
Binary file not shown.
@@ -61,127 +61,31 @@ namespace demo
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
bool MainWindow::LoadFile(const ::vl::WString& path)
|
||||
{
|
||||
stream::FileStream fileStream(path, stream::FileStream::ReadOnly);
|
||||
if (fileStream.IsAvailable())
|
||||
{
|
||||
stream::BomDecoder decoder;
|
||||
stream::DecoderStream decoderStream(fileStream, decoder);
|
||||
stream::StreamReader reader(decoderStream);
|
||||
textBox->SetText(reader.ReadToEnd());
|
||||
textBox->Select(TextPos(), TextPos());
|
||||
textBox->SetFocus();
|
||||
textBox->ClearUndoRedo();
|
||||
|
||||
fileName = dialogOpen->GetFileName();
|
||||
if (INVLOC.EndsWith(fileName, L".xml", Locale::IgnoreCase))
|
||||
{
|
||||
SetupXmlConfig();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupTextConfig();
|
||||
}
|
||||
|
||||
GetApplication()->InvokeInMainThread(this, [=]()
|
||||
{
|
||||
AddRecentFile(path);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
bool MainWindow::OpenFile(::vl::vint filterIndex)
|
||||
{
|
||||
if (CanCloseFile())
|
||||
{
|
||||
dialogOpen->SetFilterIndex(filterIndex);
|
||||
if (dialogOpen->ShowDialog())
|
||||
{
|
||||
if (LoadFile(dialogOpen->GetFileName()))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
dialogCannotOpen->ShowDialog();
|
||||
}
|
||||
}
|
||||
}
|
||||
return false;
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
bool MainWindow::SaveFile(bool saveAs)
|
||||
{
|
||||
WString targetFileName = fileName;
|
||||
if (saveAs || targetFileName == L"")
|
||||
{
|
||||
dialogSave->SetFilterIndex(isXml ? 1 : 0);
|
||||
if (dialogSave->ShowDialog())
|
||||
{
|
||||
targetFileName = dialogSave->GetFileName();
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
stream::FileStream fileStream(targetFileName, stream::FileStream::WriteOnly);
|
||||
if (fileStream.IsAvailable())
|
||||
{
|
||||
stream::BomEncoder encoder(stream::BomEncoder::Utf16);
|
||||
stream::EncoderStream encoderStream(fileStream, encoder);
|
||||
stream::StreamWriter writer(encoderStream);
|
||||
writer.WriteString(textBox->GetText());
|
||||
textBox->NotifyModificationSaved();
|
||||
|
||||
fileName = targetFileName;
|
||||
if (INVLOC.EndsWith(fileName, L".xml", Locale::IgnoreCase))
|
||||
{
|
||||
SetupXmlConfig();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetupTextConfig();
|
||||
}
|
||||
|
||||
GetApplication()->InvokeInMainThread(this, [=]()
|
||||
{
|
||||
AddRecentFile(targetFileName);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
dialogCannotSave->ShowDialog();
|
||||
}
|
||||
return false;
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::SetupTextConfig()
|
||||
{
|
||||
if (isXml == true)
|
||||
{
|
||||
isXml = false;
|
||||
SetColorizer(textBox, false);
|
||||
}
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::SetupXmlConfig()
|
||||
{
|
||||
if (isXml == false)
|
||||
{
|
||||
isXml = true;
|
||||
SetColorizer(textBox, true);
|
||||
}
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
void MainWindow::AddRecentFile(const ::vl::WString& path)
|
||||
@@ -217,129 +121,109 @@ namespace demo
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileNewText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
if (CanCloseFile())
|
||||
{
|
||||
textBox->SetText(L"");
|
||||
textBox->ClearUndoRedo();
|
||||
SetupTextConfig();
|
||||
}
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileNewXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
if (CanCloseFile())
|
||||
{
|
||||
textBox->SetText(L"");
|
||||
textBox->ClearUndoRedo();
|
||||
SetupXmlConfig();
|
||||
}
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileOpen_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
OpenFile(dialogOpen->GetFilterIndex());
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileOpenText_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
OpenFile(0);
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileOpenXml_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
OpenFile(1);
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileSave_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
SaveFile(false);
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileSaveAs_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
SaveFile(true);
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandFileExit_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
Close();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditUndo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
textBox->Undo();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditRedo_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
textBox->Redo();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditCut_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
textBox->Cut();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditCopy_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
textBox->Copy();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditPaste_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
textBox->Paste();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditDelete_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
textBox->SetSelectionText(L"");
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditSelect_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
textBox->SelectAll();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandEditFind_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
if (!findWindow)
|
||||
{
|
||||
auto window = MakePtr<FindWindow>();
|
||||
window->textBox = textBox;
|
||||
window->MoveToScreenCenter();
|
||||
window->GetNativeWindow()->SetParent(GetNativeWindow());
|
||||
findWindow = window;
|
||||
}
|
||||
findWindow->Show();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::commandAbout_Executed(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiEventArgs* arguments)
|
||||
{
|
||||
auto window = new AboutWindow;
|
||||
window->MoveToScreenCenter();
|
||||
window->ShowModalAndDelete(this, []() {});
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
USERIMPL(/* ::demo::MainWindow */)
|
||||
void MainWindow::window_Closing(::vl::presentation::compositions::GuiGraphicsComposition* sender, ::vl::presentation::compositions::GuiRequestEventArgs* arguments)
|
||||
{
|
||||
arguments->cancel = !CanCloseFile();
|
||||
throw ::vl::Exception(L"You should implement this function.");
|
||||
}
|
||||
|
||||
MainWindow::MainWindow()
|
||||
|
||||
Binary file not shown.
@@ -764,18 +764,32 @@ Closures
|
||||
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
||||
{
|
||||
this->__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr);
|
||||
this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>();
|
||||
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_opened_ = false;
|
||||
this->__vwsn_bind_closed_ = false;
|
||||
}
|
||||
|
||||
void __vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
|
||||
{
|
||||
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel().Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
|
||||
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
|
||||
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
|
||||
}
|
||||
|
||||
void __vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
|
||||
{
|
||||
if (static_cast<bool>(__vwsn_bind_handler_1_0))
|
||||
{
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
|
||||
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
this->__vwsn_bind_activator_();
|
||||
}
|
||||
|
||||
void __vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0()
|
||||
{
|
||||
this->__vwsn_bind_activator_();
|
||||
}
|
||||
@@ -786,7 +800,9 @@ Closures
|
||||
{
|
||||
(__vwsn_bind_opened_ = true);
|
||||
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->self; } catch(...){ return static_cast<::demo::AccountButtonTemplate*>(nullptr); } }());
|
||||
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
|
||||
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, ::vl::Func<void()>(this, &__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -812,8 +828,15 @@ Closures
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, __vwsn_bind_handler_0_0);
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
if (static_cast<bool>(__vwsn_bind_handler_1_0))
|
||||
{
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
(__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr));
|
||||
(__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>());
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -825,18 +848,32 @@ Closures
|
||||
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
||||
{
|
||||
this->__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr);
|
||||
this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>();
|
||||
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_opened_ = false;
|
||||
this->__vwsn_bind_closed_ = false;
|
||||
}
|
||||
|
||||
void __vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
|
||||
{
|
||||
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel().Obj())->GetName(); } catch(...){ return ::vl::WString(L"", false); } }();
|
||||
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetName(); } catch(...){ return ::vl::WString(L"", false); } }();
|
||||
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
|
||||
}
|
||||
|
||||
void __vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
|
||||
{
|
||||
if (static_cast<bool>(__vwsn_bind_handler_1_0))
|
||||
{
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, __vwsn_bind_handler_1_0);
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
|
||||
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, ::vl::Func<void()>(this, &__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
this->__vwsn_bind_activator_();
|
||||
}
|
||||
|
||||
void __vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0()
|
||||
{
|
||||
this->__vwsn_bind_activator_();
|
||||
}
|
||||
@@ -847,7 +884,9 @@ Closures
|
||||
{
|
||||
(__vwsn_bind_opened_ = true);
|
||||
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->self; } catch(...){ return static_cast<::demo::AccountButtonTemplate*>(nullptr); } }());
|
||||
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
|
||||
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, ::vl::Func<void()>(this, &__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, ::vl::Func<void()>(this, &__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -873,8 +912,15 @@ Closures
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, __vwsn_bind_handler_0_0);
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
if (static_cast<bool>(__vwsn_bind_handler_1_0))
|
||||
{
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->NameChanged, __vwsn_bind_handler_1_0);
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
(__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr));
|
||||
(__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>());
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1008,18 +1054,32 @@ Closures
|
||||
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
||||
{
|
||||
this->__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr);
|
||||
this->__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>();
|
||||
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_opened_ = false;
|
||||
this->__vwsn_bind_closed_ = false;
|
||||
}
|
||||
|
||||
void __vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
|
||||
{
|
||||
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel().Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
|
||||
auto __vwsn_bind_activator_result_ = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->GetImage(); } catch(...){ return ::vl::Ptr<::vl::presentation::INativeImage>(); } }();
|
||||
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
|
||||
}
|
||||
|
||||
void __vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
|
||||
{
|
||||
if (static_cast<bool>(__vwsn_bind_handler_1_0))
|
||||
{
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
|
||||
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
this->__vwsn_bind_activator_();
|
||||
}
|
||||
|
||||
void __vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0()
|
||||
{
|
||||
this->__vwsn_bind_activator_();
|
||||
}
|
||||
@@ -1030,7 +1090,9 @@ Closures
|
||||
{
|
||||
(__vwsn_bind_opened_ = true);
|
||||
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->self; } catch(...){ return static_cast<::demo::AccountButtonTemplate*>(nullptr); } }());
|
||||
(__vwsn_bind_cache_1 = [&](){ try{ return ::vl::__vwsn::This(__vwsn_bind_cache_0)->GetViewModel(); } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
|
||||
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, ::vl::Func<void()>(this, &__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
(__vwsn_bind_handler_1_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, ::vl::Func<void()>(this, &__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_1_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1056,8 +1118,15 @@ Closures
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0)->ViewModelChanged, __vwsn_bind_handler_0_0);
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
if (static_cast<bool>(__vwsn_bind_handler_1_0))
|
||||
{
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_1.Obj())->ImageChanged, __vwsn_bind_handler_1_0);
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
(__vwsn_bind_cache_0 = static_cast<::demo::AccountButtonTemplate*>(nullptr));
|
||||
(__vwsn_bind_cache_1 = ::vl::Ptr<::demo::AccountButtonViewModel>());
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
(__vwsn_bind_handler_1_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1129,21 +1198,30 @@ Closures
|
||||
__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountMenuItemTemplateConstructor* __vwsnctorthis_0)
|
||||
:__vwsnthis_0(::vl::__vwsn::This(__vwsnctorthis_0))
|
||||
{
|
||||
this->__vwsn_bind_cache_0 = ::vl::Ptr<::demo::AccountButtonViewModel>();
|
||||
this->__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>();
|
||||
this->__vwsn_bind_opened_ = false;
|
||||
this->__vwsn_bind_closed_ = false;
|
||||
}
|
||||
|
||||
void __vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_activator_()
|
||||
{
|
||||
auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsnthis_0->ViewModel.Obj())->GetName();
|
||||
auto __vwsn_bind_activator_result_ = ::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->GetName();
|
||||
::vl::__vwsn::EventInvoke(this->ValueChanged)(::vl::__vwsn::Box(__vwsn_bind_activator_result_));
|
||||
}
|
||||
|
||||
void __vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0()
|
||||
{
|
||||
this->__vwsn_bind_activator_();
|
||||
}
|
||||
|
||||
bool __vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::Open()
|
||||
{
|
||||
if ((! __vwsn_bind_opened_))
|
||||
{
|
||||
(__vwsn_bind_opened_ = true);
|
||||
(__vwsn_bind_cache_0 = [&](){ try{ return __vwsnthis_0->ViewModel; } catch(...){ return ::vl::Ptr<::demo::AccountButtonViewModel>(); } }());
|
||||
(__vwsn_bind_handler_0_0 = [&](){ try{ return ::vl::__vwsn::EventAttach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->NameChanged, ::vl::Func<void()>(this, &__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription::__vwsn_bind_callback_0_0)); } catch(...){ return ::vl::Ptr<::vl::reflection::description::IEventHandler>(); } }());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -1164,6 +1242,13 @@ Closures
|
||||
if ((! __vwsn_bind_closed_))
|
||||
{
|
||||
(__vwsn_bind_closed_ = true);
|
||||
if (static_cast<bool>(__vwsn_bind_handler_0_0))
|
||||
{
|
||||
::vl::__vwsn::EventDetach(::vl::__vwsn::This(__vwsn_bind_cache_0.Obj())->NameChanged, __vwsn_bind_handler_0_0);
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
}
|
||||
(__vwsn_bind_cache_0 = ::vl::Ptr<::demo::AccountButtonViewModel>());
|
||||
(__vwsn_bind_handler_0_0 = ::vl::Ptr<::vl::reflection::description::IEventHandler>());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -2027,7 +2112,11 @@ Class (::demo::AccountButtonViewModel)
|
||||
|
||||
void AccountButtonViewModel::SetController(::vl::presentation::controls::GuiSelectableButton::GroupController* __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Controller = __vwsn_value_);
|
||||
if ((this->__vwsn_prop_Controller != __vwsn_value_))
|
||||
{
|
||||
(this->__vwsn_prop_Controller = __vwsn_value_);
|
||||
::vl::__vwsn::EventInvoke(this->ControllerChanged)();
|
||||
}
|
||||
}
|
||||
|
||||
::vl::WString AccountButtonViewModel::GetName()
|
||||
@@ -2037,7 +2126,11 @@ Class (::demo::AccountButtonViewModel)
|
||||
|
||||
void AccountButtonViewModel::SetName(const ::vl::WString& __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Name = __vwsn_value_);
|
||||
if ((this->__vwsn_prop_Name != __vwsn_value_))
|
||||
{
|
||||
(this->__vwsn_prop_Name = __vwsn_value_);
|
||||
::vl::__vwsn::EventInvoke(this->NameChanged)();
|
||||
}
|
||||
}
|
||||
|
||||
::vl::Ptr<::vl::presentation::INativeImage> AccountButtonViewModel::GetImage()
|
||||
@@ -2047,7 +2140,11 @@ Class (::demo::AccountButtonViewModel)
|
||||
|
||||
void AccountButtonViewModel::SetImage(::vl::Ptr<::vl::presentation::INativeImage> __vwsn_value_)
|
||||
{
|
||||
(this->__vwsn_prop_Image = __vwsn_value_);
|
||||
if ((this->__vwsn_prop_Image.Obj() != __vwsn_value_.Obj()))
|
||||
{
|
||||
(this->__vwsn_prop_Image = __vwsn_value_);
|
||||
::vl::__vwsn::EventInvoke(this->ImageChanged)();
|
||||
}
|
||||
}
|
||||
|
||||
AccountButtonViewModel::AccountButtonViewModel()
|
||||
|
||||
@@ -324,16 +324,19 @@ namespace demo
|
||||
public:
|
||||
::vl::presentation::controls::GuiSelectableButton::GroupController* GetController();
|
||||
void SetController(::vl::presentation::controls::GuiSelectableButton::GroupController* __vwsn_value_);
|
||||
::vl::Event<void()> ControllerChanged;
|
||||
private:
|
||||
::vl::WString __vwsn_prop_Name;
|
||||
public:
|
||||
::vl::WString GetName();
|
||||
void SetName(const ::vl::WString& __vwsn_value_);
|
||||
::vl::Event<void()> NameChanged;
|
||||
private:
|
||||
::vl::Ptr<::vl::presentation::INativeImage> __vwsn_prop_Image;
|
||||
public:
|
||||
::vl::Ptr<::vl::presentation::INativeImage> GetImage();
|
||||
void SetImage(::vl::Ptr<::vl::presentation::INativeImage> __vwsn_value_);
|
||||
::vl::Event<void()> ImageChanged;
|
||||
AccountButtonViewModel();
|
||||
};
|
||||
|
||||
@@ -662,11 +665,14 @@ Closures
|
||||
__vwsnc2_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountButtonTemplateConstructor* __vwsnctorthis_0);
|
||||
|
||||
::demo::AccountButtonTemplate* __vwsn_bind_cache_0 = nullptr;
|
||||
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_1;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0;
|
||||
bool __vwsn_bind_opened_ = false;
|
||||
bool __vwsn_bind_closed_ = false;
|
||||
void __vwsn_bind_activator_();
|
||||
void __vwsn_bind_callback_0_0();
|
||||
void __vwsn_bind_callback_1_0();
|
||||
bool Open() override;
|
||||
bool Update() override;
|
||||
bool Close() override;
|
||||
@@ -680,11 +686,14 @@ Closures
|
||||
__vwsnc3_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountButtonTemplateConstructor* __vwsnctorthis_0);
|
||||
|
||||
::demo::AccountButtonTemplate* __vwsn_bind_cache_0 = nullptr;
|
||||
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_1;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0;
|
||||
bool __vwsn_bind_opened_ = false;
|
||||
bool __vwsn_bind_closed_ = false;
|
||||
void __vwsn_bind_activator_();
|
||||
void __vwsn_bind_callback_0_0();
|
||||
void __vwsn_bind_callback_1_0();
|
||||
bool Open() override;
|
||||
bool Update() override;
|
||||
bool Close() override;
|
||||
@@ -734,11 +743,14 @@ Closures
|
||||
__vwsnc6_Demo_demo_AccountButtonTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountButtonTemplateConstructor* __vwsnctorthis_0);
|
||||
|
||||
::demo::AccountButtonTemplate* __vwsn_bind_cache_0 = nullptr;
|
||||
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_1;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_1_0;
|
||||
bool __vwsn_bind_opened_ = false;
|
||||
bool __vwsn_bind_closed_ = false;
|
||||
void __vwsn_bind_activator_();
|
||||
void __vwsn_bind_callback_0_0();
|
||||
void __vwsn_bind_callback_1_0();
|
||||
bool Open() override;
|
||||
bool Update() override;
|
||||
bool Close() override;
|
||||
@@ -769,9 +781,12 @@ Closures
|
||||
|
||||
__vwsnc8_Demo_demo_AccountMenuItemTemplateConstructor___vwsn_initialize_instance___vl_reflection_description_IValueSubscription(::demo::AccountMenuItemTemplateConstructor* __vwsnctorthis_0);
|
||||
|
||||
::vl::Ptr<::demo::AccountButtonViewModel> __vwsn_bind_cache_0;
|
||||
::vl::Ptr<::vl::reflection::description::IEventHandler> __vwsn_bind_handler_0_0;
|
||||
bool __vwsn_bind_opened_ = false;
|
||||
bool __vwsn_bind_closed_ = false;
|
||||
void __vwsn_bind_activator_();
|
||||
void __vwsn_bind_callback_0_0();
|
||||
bool Open() override;
|
||||
bool Update() override;
|
||||
bool Close() override;
|
||||
|
||||
@@ -79,12 +79,15 @@ namespace vl
|
||||
CLASS_MEMBER_METHOD(SetController, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetImage, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_METHOD(SetName, { L"__vwsn_value_" })
|
||||
CLASS_MEMBER_EVENT(ControllerChanged)
|
||||
CLASS_MEMBER_EVENT(ImageChanged)
|
||||
CLASS_MEMBER_EVENT(NameChanged)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Controller)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Image)
|
||||
CLASS_MEMBER_FIELD(__vwsn_prop_Name)
|
||||
CLASS_MEMBER_PROPERTY(Controller, GetController, SetController)
|
||||
CLASS_MEMBER_PROPERTY(Image, GetImage, SetImage)
|
||||
CLASS_MEMBER_PROPERTY(Name, GetName, SetName)
|
||||
CLASS_MEMBER_PROPERTY_EVENT(Controller, GetController, SetController, ControllerChanged)
|
||||
CLASS_MEMBER_PROPERTY_EVENT(Image, GetImage, SetImage, ImageChanged)
|
||||
CLASS_MEMBER_PROPERTY_EVENT(Name, GetName, SetName, NameChanged)
|
||||
END_CLASS_MEMBER(::demo::AccountButtonViewModel)
|
||||
|
||||
BEGIN_CLASS_MEMBER(::demo::AccountItemTemplate)
|
||||
|
||||
Reference in New Issue
Block a user