Samples
Samples
SharedUI.Shared
Language: Oxygene, Platform: All, Category: SharedUI
https://github.com/remobjects/ElementsSamples/tree/master/Oxygene/All/SharedUI/SharedUI.Shared
-
SharedUI.Shared
-
References
-
Source Files
- $(MSBuildThisFileDirectory)MainWindowController.pas
- $(MSBuildThisFileDirectory)MainWindow.xaml.pas
- $(MSBuildThisFileDirectory)MainWindowController.Cocoa.pas
- $(MSBuildThisFileDirectory)MainWindowController.WPF.pas
- $(MSBuildThisFileDirectory)Aliases.pas
- $(MSBuildThisFileDirectory)AppDelegate.pas
- $(MSBuildThisFileDirectory)AppDelegate.Cocoa.pas
- $(MSBuildThisFileDirectory)AppDelegate.WPF.pas
- Other Files
-
References
$(MSBuildThisFileDirectory)MainWindowController.pas
namespace SharedUI.Shared;
type
MainWindowController = public partial class
public
//
// Add Shared code here
//
[Notify] property valueA: String;
[Notify] property valueB: String;
[Notify] property &result: String read private write;
[IBAction]
method calculateResult(aSender: id);
begin
if (length(valueA) = 0) or (length(valueB) = 0) then begin
&result := '(value required)';
end
else begin
var a := Convert.TryToDoubleInvariant(valueA);
var b := Convert.TryToDoubleInvariant(valueB);
if assigned(a) and assigned(b) then begin
&result := Convert.ToString(a + b);
end
else begin
&result := valueA + valueB;
end;
end;
end;
private
method setup;
begin
//
// Do any shared initilaization, here
//
//
end;
end;
end.
