private void OpenProject(string fileName, bool create, Action <Exception> result) { EsperProject p = null; FileStore.Directory r = null; _worker.Do(() => { p = new EsperProject(fileName, create); r = p.FileStore.GetFullTree(); }, (e) => { if (e != null) { MessageBox.Show("FileStore error occured:\n" + e.Message ?? e.ToString(), "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } else { BeforeInitialize?.Invoke(this, EventArgs.Empty); _project = p; _root = r; Init(); } result?.Invoke(e); }); }
internal void Initialize(Context context) { BeforeInitialize?.Invoke(this, new EventArgs()); Bindings.FabricSdk.Fabric.With(new Bindings.FabricSdk.Fabric.Builder(context) .Kits(Kits.Select(i => i.ToNative()).ToArray()) .Debuggable(Debug) .Build()); AfterInitialize?.Invoke(this, new EventArgs()); }
internal void Initialize() { BeforeInitialize?.Invoke(this, new EventArgs()); var nativeKits = new List <NSObject>(); foreach (var kit in Kits) { nativeKits.Add(kit.ToNative()); } Bindings.FabricSdk.Fabric.With(nativeKits.ToArray()); AfterInitialize?.Invoke(this, new EventArgs()); }
/// <summary> /// Raises the <see cref="BeforeInitialize"/> event. /// </summary> /// <param name="e"> /// The <see cref="EventArgs"/> object that contains the event data. /// </param> protected virtual void OnBeforeInitalize(EventArgs e) { BeforeInitialize?.Invoke(this, e); }
internal void Initialize() { BeforeInitialize?.Invoke(this, new EventArgs()); Bindings.FabricSdk.Fabric.With(Kits.Select(i => i.ToNative()).ToArray()); AfterInitialize?.Invoke(this, new EventArgs()); }