/// <summary> /// Initializes Load process /// </summary> public void Load() { BeforeLoad?.Invoke(); currentData = Serializer.DeserializeData(fileName, folderName); Debug.Log(debugPrefix + "Loaded " + currentData.Count + " entries from " + Path.Combine(Application.persistentDataPath, folderName) + " from " + fileName); AfterLoad?.Invoke(); }
/// <summary> /// Copies data from other serializer if it loaded data (executes load if not) /// </summary> /// <param name="source"></param> public void CopyLoadedDataFrom(SaveData source) { BeforeLoad?.Invoke(); if (source.currentData == null) { source.Load(); } currentData = new Dictionary <string, object>(source.currentData); folderName = source.folderName; fileName = source.fileName; AfterLoad?.Invoke(); Debug.Log(debugPrefix + "Copied " + currentData.Count + " entries from " + source.name); }
public DefaultBrowserForm(string defaulturl) { InitializeComponent(); if (CefWin.ApplicationIcon != null) { this.Icon = CefWin.ApplicationIcon; } this.Text = CefWin.ApplicationTitle; this.MinimumSize = new Size(360, 360); if (Application.OpenForms.Count - (CefWin._splashForm?.Visible == true ? 1 : 0) == 0) { this.StartPosition = FormStartPosition.CenterScreen; } this.Disposed += DefaultBrowserForm_Disposed; this.Resize += DefaultBrowserForm_Resize; _browserAgent = new BrowserAgent(); _browserAgent.Url = defaulturl; if (CefWin._splashForm != null) { this.Opacity = 0; //this.ShowInTaskbar = false; //TODO:this will affect the Forms collection , handle it later } CefWin.PostToAppThread(delegate { BeforeLoad?.Invoke(this, EventArgs.Empty); CefWin.WriteDebugLine("BeforeLoad Invoked."); }); }
/// <summary> /// Raises the <see cref="BeforeLoad" /> event. /// </summary> /// <param name="args">The <see cref="LoadStateEventArgs"/> instance containing the event data.</param> protected virtual void OnBeforeLoad(LoadStateEventArgs args) => BeforeLoad?.Invoke(this, args);
internal static void InvokeBeforeLoad() { BeforeLoad?.Invoke(); }
protected virtual void OnBeforeLoad() { BeforeLoad?.Invoke(); }