/// <summary> /// Loads a sketch file into the panel and resizes the display to /// fill the screen. Deletes the current contents of the file. /// Use this method instead of InkSketch.LoadFile() so that /// the display will be refreshed properly. Loads both Sketch XML /// and Journal files. /// /// Precondition: given file path is valid and readable. /// </summary> /// <param name="filepath">Reads from this file path.</param> public void LoadSketch(string filepath) { loadSketch(filepath, true, true); SketchFileLoadedHandler loaded = SketchFileLoaded; if (loaded != null) { loaded(); } }
/// <summary> /// Loads a sketch file into the panel and resizes the display to /// fill the screen. Deletes the current contents of the file. /// /// Use this method instead of InkSketch.LoadFile() so that /// the display will be refreshed properly. Loads both Sketch XML /// and Journal files. /// /// Precondition: given file path is valid and readable. Does nothing /// if file path is null. /// </summary> /// <param name="filepath">Reads from this file path.</param> public void LoadSketch(string filepath) { if (filepath == null) { return; } loadSketch(filepath, false, true); SketchFileLoadedHandler loaded = SketchFileLoaded; if (loaded != null) { loaded(); } ZoomToFit(); }