public ShareButton(string _imagePath, string _textShown, SharedPlatform _sharePlatForm, bool _isShareButtonEnabled) { imagePath = _imagePath; textShown = _textShown; sharePlatForm = _sharePlatForm; isShareButtonEnabled = _isShareButtonEnabled; }
protected void InitPerspex(Type appType) { if (_initialized) { return; } _initialized = true; var window = new UIWindow(UIScreen.MainScreen.Bounds); var controller = new PerspexViewController(window); window.RootViewController = controller; window.MakeKeyAndVisible(); Application.RegisterPlatformCallback(() => { MouseDevice = new MouseDevice(); KeyboardDevice = new KeyboardDevice(); SharedPlatform.Register(appType.Assembly); PerspexLocator.CurrentMutable .Bind <IClipboard>().ToTransient <Clipboard>() //.Bind<ISystemDialogImpl>().ToTransient<SystemDialogImpl>() .Bind <IStandardCursorFactory>().ToTransient <CursorFactory>() .Bind <IKeyboardDevice>().ToConstant(KeyboardDevice) .Bind <IMouseDevice>().ToConstant(MouseDevice) .Bind <IPlatformSettings>().ToSingleton <PlatformSettings>() .Bind <IPlatformThreadingInterface>().ToConstant(PlatformThreadingInterface.Instance) .Bind <IWindowImpl>().ToConstant(controller.PerspexView); SkiaPlatform.Initialize(); }); }
public static void Initialize() { PerspexLocator.CurrentMutable .Bind <IWindowingPlatform>().ToConstant(s_instance) .Bind <IClipboard>().ToSingleton <ClipboardImpl>() .Bind <IStandardCursorFactory>().ToConstant(CursorFactory.Instance) .Bind <IKeyboardDevice>().ToConstant(GtkKeyboardDevice.Instance) .Bind <IMouseDevice>().ToConstant(GtkMouseDevice.Instance) .Bind <IPlatformSettings>().ToConstant(s_instance) .Bind <IPlatformThreadingInterface>().ToConstant(s_instance) .Bind <ISystemDialogImpl>().ToSingleton <SystemDialogImpl>(); SharedPlatform.Register(); _uiThread = Thread.CurrentThread; }
private static void InitializeInternal() { PerspexLocator.CurrentMutable .Bind <IPopupImpl>().ToTransient <PopupImpl>() .Bind <IClipboard>().ToSingleton <ClipboardImpl>() .Bind <IStandardCursorFactory>().ToConstant(CursorFactory.Instance) .Bind <IKeyboardDevice>().ToConstant(WindowsKeyboardDevice.Instance) .Bind <IMouseDevice>().ToConstant(WindowsMouseDevice.Instance) .Bind <IPlatformSettings>().ToConstant(s_instance) .Bind <IPlatformThreadingInterface>().ToConstant(s_instance) .Bind <ISystemDialogImpl>().ToSingleton <SystemDialogImpl>(); SharedPlatform.Register(); _uiThread = Thread.CurrentThread; }
public void Init(Type applicationType) { SharedPlatform.Register(applicationType.Assembly); }