Advertisement
NanoBob

Slipe WPF

Apr 24th, 2019
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.07 KB | None | 0 0
  1. -- Generated by CSharp.lua Compiler
  2. --------------------------------------------------------------------------------
  3. -- <auto-generated>
  4. --     This code was generated by a tool.
  5. --     Runtime Version:4.0.30319.42000
  6. --
  7. --     Changes to this file may cause incorrect behavior and will be lost if
  8. --     the code is regenerated.
  9. -- </auto-generated>
  10. --------------------------------------------------------------------------------
  11. local System = System
  12. local SystemDiagnostics
  13. local SystemWindows
  14. local SystemWindowsControls
  15. System.import(function (out)
  16.   SystemDiagnostics = System.Diagnostics
  17.   SystemWindows = System.Windows
  18.   SystemWindowsControls = System.Windows.Controls
  19. end)
  20. System.namespace("WpfCoreTest", function (namespace)
  21.   -- <summary>
  22.   -- Interaction logic for MainWindow.xaml
  23.   -- </summary>
  24.   -- <summary>
  25.   -- MainWindow
  26.   -- </summary>
  27.   namespace.class("MainWindow", function (namespace)
  28.     local ButtonExit_Click, ButtonClick, InitializeComponent, Connect, __ctor__
  29.     __ctor__ = function (this)
  30.       SystemWindows.Window.__ctor__(this)
  31.       InitializeComponent(this)
  32.       SystemDiagnostics.Debug.WriteLine("Test")
  33.     end
  34.     ButtonExit_Click = function (this, sender, e)
  35.       SystemWindows.Application.getCurrent():Shutdown()
  36.     end
  37.     ButtonClick = function (this, sender, e)
  38.       SystemDiagnostics.Debug.WriteLine(this.textBlock:getText())
  39.     end
  40.     -- <summary>
  41.     -- InitializeComponent
  42.     -- </summary>
  43.     InitializeComponent = function (this)
  44.       if this._contentLoaded then
  45.         return
  46.       end
  47.       this._contentLoaded = true
  48.       local resourceLocater = System.Uri("/WpfCoreTest;component/mainwindow.xaml", 2 --[[UriKind.Relative]])
  49.  
  50.  
  51.       SystemWindows.Application.LoadComponent(this, resourceLocater)
  52.     end
  53.     Connect = function (this, connectionId, target)
  54.       repeat
  55.         local default = connectionId
  56.         if default == 1 then
  57.           this.textBlock = (System.cast(SystemWindowsControls.TextBlock, target))
  58.           return
  59.         elseif default == 2 then
  60.           this.textBox = (System.cast(SystemWindowsControls.TextBox, target))
  61.           return
  62.         elseif default == 3 then
  63.           this.button = (System.cast(SystemWindowsControls.Button, target))
  64.           return
  65.         elseif default == 4 then
  66.           this.tabControl = (System.cast(SystemWindowsControls.TabControl, target))
  67.           return
  68.         elseif default == 5 then
  69.           this.checkBox_Copy = (System.cast(SystemWindowsControls.CheckBox, target))
  70.           return
  71.         elseif default == 6 then
  72.           this.checkBox = (System.cast(SystemWindowsControls.CheckBox, target))
  73.           return
  74.         elseif default == 7 then
  75.           this.listBox = (System.cast(SystemWindowsControls.ListBox, target))
  76.           return
  77.         elseif default == 8 then
  78.           this.comboBox = (System.cast(SystemWindowsControls.ComboBox, target))
  79.           return
  80.         elseif default == 9 then
  81.           this.radioButton = (System.cast(SystemWindowsControls.RadioButton, target))
  82.           return
  83.         elseif default == 10 then
  84.           this.radioButton1 = (System.cast(SystemWindowsControls.RadioButton, target))
  85.           return
  86.         elseif default == 11 then
  87.           this.button1 = (System.cast(SystemWindowsControls.Button, target))
  88.           return
  89.         elseif default == 12 then
  90.           this.button2 = (System.cast(SystemWindowsControls.Button, target))
  91.           return
  92.         elseif default == 13 then
  93.           this.button3 = (System.cast(SystemWindowsControls.Button, target))
  94.           return
  95.         elseif default == 14 then
  96.           this.button4 = (System.cast(SystemWindowsControls.Button, target))
  97.           return
  98.         elseif default == 15 then
  99.           this.button5 = (System.cast(SystemWindowsControls.Button, target))
  100.           return
  101.         end
  102.       until 1
  103.       this._contentLoaded = true
  104.     end
  105.     return {
  106.       _contentLoaded = false,
  107.       InitializeComponent = InitializeComponent,
  108.       Connect = Connect,
  109.       __ctor__ = __ctor__
  110.     }
  111.   end)
  112. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement