Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Generated by CSharp.lua Compiler
- --------------------------------------------------------------------------------
- -- <auto-generated>
- -- This code was generated by a tool.
- -- Runtime Version:4.0.30319.42000
- --
- -- Changes to this file may cause incorrect behavior and will be lost if
- -- the code is regenerated.
- -- </auto-generated>
- --------------------------------------------------------------------------------
- local System = System
- local SystemDiagnostics
- local SystemWindows
- local SystemWindowsControls
- System.import(function (out)
- SystemDiagnostics = System.Diagnostics
- SystemWindows = System.Windows
- SystemWindowsControls = System.Windows.Controls
- end)
- System.namespace("WpfCoreTest", function (namespace)
- -- <summary>
- -- Interaction logic for MainWindow.xaml
- -- </summary>
- -- <summary>
- -- MainWindow
- -- </summary>
- namespace.class("MainWindow", function (namespace)
- local ButtonExit_Click, ButtonClick, InitializeComponent, Connect, __ctor__
- __ctor__ = function (this)
- SystemWindows.Window.__ctor__(this)
- InitializeComponent(this)
- SystemDiagnostics.Debug.WriteLine("Test")
- end
- ButtonExit_Click = function (this, sender, e)
- SystemWindows.Application.getCurrent():Shutdown()
- end
- ButtonClick = function (this, sender, e)
- SystemDiagnostics.Debug.WriteLine(this.textBlock:getText())
- end
- -- <summary>
- -- InitializeComponent
- -- </summary>
- InitializeComponent = function (this)
- if this._contentLoaded then
- return
- end
- this._contentLoaded = true
- local resourceLocater = System.Uri("/WpfCoreTest;component/mainwindow.xaml", 2 --[[UriKind.Relative]])
- SystemWindows.Application.LoadComponent(this, resourceLocater)
- end
- Connect = function (this, connectionId, target)
- repeat
- local default = connectionId
- if default == 1 then
- this.textBlock = (System.cast(SystemWindowsControls.TextBlock, target))
- return
- elseif default == 2 then
- this.textBox = (System.cast(SystemWindowsControls.TextBox, target))
- return
- elseif default == 3 then
- this.button = (System.cast(SystemWindowsControls.Button, target))
- return
- elseif default == 4 then
- this.tabControl = (System.cast(SystemWindowsControls.TabControl, target))
- return
- elseif default == 5 then
- this.checkBox_Copy = (System.cast(SystemWindowsControls.CheckBox, target))
- return
- elseif default == 6 then
- this.checkBox = (System.cast(SystemWindowsControls.CheckBox, target))
- return
- elseif default == 7 then
- this.listBox = (System.cast(SystemWindowsControls.ListBox, target))
- return
- elseif default == 8 then
- this.comboBox = (System.cast(SystemWindowsControls.ComboBox, target))
- return
- elseif default == 9 then
- this.radioButton = (System.cast(SystemWindowsControls.RadioButton, target))
- return
- elseif default == 10 then
- this.radioButton1 = (System.cast(SystemWindowsControls.RadioButton, target))
- return
- elseif default == 11 then
- this.button1 = (System.cast(SystemWindowsControls.Button, target))
- return
- elseif default == 12 then
- this.button2 = (System.cast(SystemWindowsControls.Button, target))
- return
- elseif default == 13 then
- this.button3 = (System.cast(SystemWindowsControls.Button, target))
- return
- elseif default == 14 then
- this.button4 = (System.cast(SystemWindowsControls.Button, target))
- return
- elseif default == 15 then
- this.button5 = (System.cast(SystemWindowsControls.Button, target))
- return
- end
- until 1
- this._contentLoaded = true
- end
- return {
- _contentLoaded = false,
- InitializeComponent = InitializeComponent,
- Connect = Connect,
- __ctor__ = __ctor__
- }
- end)
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement