Samples
Samples
SharedUI.Shared
Language: Silver, Platform: All, Category: SharedUI
https://github.com/remobjects/ElementsSamples/tree/master/Silver/All/SharedUI/SharedUI.Shared
-
SharedUI.Shared
-
References
-
Source Files
- $(MSBuildThisFileDirectory)MainWindowController.swift
- $(MSBuildThisFileDirectory)MainWindow.xaml.swift
- $(MSBuildThisFileDirectory)MainWindowController.Cocoa.swift
- $(MSBuildThisFileDirectory)MainWindowController.WPF.swift
- $(MSBuildThisFileDirectory)Aliases.swift
- $(MSBuildThisFileDirectory)AppDelegate.swift
- $(MSBuildThisFileDirectory)AppDelegate.Cocoa.swift
- $(MSBuildThisFileDirectory)AppDelegate.WPF.swift
- Other Files
-
References
$(MSBuildThisFileDirectory)MainWindowController.swift
open __partial class MainWindowController {
private func setup() {
//
// Do any shared initilaization, here
//
}
//
// Add Shared code here
//
@Notify public var valueA: String!
@Notify public var valueB: String!
@Notify public private(set) var result: String!
@IBAction
public func calculateResult(_ sender: id!) {
if (length(valueA) == 0) | (length(valueB) == 0) {
result = "(value required)"
} else {
if let a = Convert.TryToDoubleInvariant(valueA), let b = Convert.TryToDoubleInvariant(valueB) {
result = Convert.ToString(a + b)
} else {
result = valueA + valueB
}
}
}
}
