public static void Free() { if (!_isInited) { return; } _isInited = false; SDKContext.Free(); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.DLPSettingsLayout); var dlpTextView = FindViewById <TextView>(Resource.Id.enable_dlp); var screenshotTextView = FindViewById <TextView>(Resource.Id.enable_screenshot); var copyPasteTextView = FindViewById <AWTextView>(Resource.Id.enable_copypaste); var openWithTextView = FindViewById <TextView>(Resource.Id.enable_openwith); mUriPathEditText = FindViewById <EditText>(Resource.Id.open_uri_text); mUriOpenButton = FindViewById <Button>(Resource.Id.open_uri_button); mUriOpenButton.Click += OnButtonClick; mFileOpenButton = FindViewById <Button>(Resource.Id.open_file_button); mFileOpenButton.Click += OnButtonClick; SDKContext sdkContext = null; try { sdkContext = SDKContextManager.SDKContext; if (sdkContext.CurrentState != SDKContext.State.Idle) { Bundle bundle = sdkContext.SDKConfiguration.GetSettings(SDKConfigurationKeys.TypeDataLossPrevention); dlpTextView.Text = bundle.GetString(SDKConfigurationKeys.EnableDataLossPrevention); copyPasteTextView.Text = bundle.GetString(SDKConfigurationKeys.EnableCopyPaste); openWithTextView.Text = bundle.GetString(SDKConfigurationKeys.LimitOpenWith); screenshotTextView.Text = bundle.GetString(SDKConfigurationKeys.EnableScreenCapture); } else { dlpTextView.Text = "SDK Context is in IDLE state"; } } catch (SDKContextException e) { dlpTextView.Text = "SDKContextException while fetching DLP settings" + e.Message; return; } }
public static void Init() { if (_isInited) { return; } int ret = SDKContext.Init(); if (0 != ret) { throw new Exception(string.Format("SDKContext.Init, ret {0}", ret)); } _bmpWarning = new BitmapImage(new Uri(string.Format("{0}\\Warning.png", Config))); _isInited = true; string fn = string.Format("{0}\\Logo.png", Config); if (File.Exists(fn)) { _bmpLogo = new BitmapImage(new Uri(fn)); } }