public void Progress(float progress, string message) { try { InvertApplication.SignalEvent <ITaskProgressHandler>(_ => _.Progress(progress, message)); //if (progress > 100f) //{ // EditorUtility.ClearProgressBar(); // return; //} //EditorUtility.DisplayProgressBar("Generating", message, progress/1f); } catch (Exception ex) { InvertApplication.LogException(ex); } }
public void LoadDiagram(IGraphData diagram) { InvertGraphEditor.DesignerWindow = this; if (diagram == null) { return; } try { DiagramDrawer = new DiagramDrawer(new DiagramViewModel(diagram)); DiagramDrawer.Dirty = true; //DiagramDrawer.Data.ApplyFilter(); DiagramDrawer.Refresh(InvertGraphEditor.PlatformDrawer); } catch (Exception ex) { InvertApplication.LogException(ex); InvertApplication.Log("Either a plugin isn't installed or the file could no longer be found. See Exception error"); } }
private static void GenerateFile(FileInfo fileInfo, CodeFileGenerator codeFileGenerator) { // Get the path to the directory var directory = System.IO.Path.GetDirectoryName(fileInfo.FullName); // Create it if it doesn't exist if (directory != null && !Directory.Exists(directory)) { Directory.CreateDirectory(directory); } try { // Write the file File.WriteAllText(fileInfo.FullName, codeFileGenerator.ToString()); } catch (Exception ex) { InvertApplication.LogException(ex); InvertApplication.Log("Coudln't create file " + fileInfo.FullName); } }