public ProcessComponentFrame(DiagramModel model, TestAppForm appForm) { _AppForm = appForm; _Model = model; Prepare(); Process(); }
private string GetXmlFileNameFor(DiagramModel model) { string lastMatchingLine = null; string mappingFileName = GetMappingFileName (); if (File.Exists (mappingFileName)) { using (StreamReader sr = File.OpenText (mappingFileName)) { while (sr.Peek () != -1) { string line = sr.ReadLine (); if (line.StartsWith (model.Header.ModelGuid)) { lastMatchingLine = line; } } } } if (lastMatchingLine != null) { string[] strList = lastMatchingLine.Split (','); System.Diagnostics.Debug.Assert (strList.Length == 4); string fileName = strList [1]; return fileName; } return model.Header.Name; }
private string GetXmlFileNameFor(DiagramModel model) { string lastMatchingLine = null; string mappingFileName = GetMappingFileName(); if (File.Exists(mappingFileName)) { using (StreamReader sr = File.OpenText(mappingFileName)) { while (sr.Peek() != -1) { string line = sr.ReadLine(); if (line.StartsWith(model.Header.ModelGuid)) { lastMatchingLine = line; } } } } if (lastMatchingLine != null) { string[] strList = lastMatchingLine.Split(','); System.Diagnostics.Debug.Assert(strList.Length == 4); string fileName = strList [1]; return(fileName); } return(model.Header.Name); }
public ProcessComponentFrame(DiagramModel model, TestAppForm appForm) { _AppForm = appForm; _Model = model; Prepare (); Process (); }
protected void SaveCodeFileMapping(DiagramModel model, string codeFileName) { using (StreamWriter sw = File.AppendText (GetMappingFileName ())) { sw.WriteLine ("{0}, {1}, {2}, {3}", model.Header.ModelGuid, codeFileName, model.Header.Name, DateTime.Now); } }
protected void SaveXmlFileMapping(DiagramModel model, string xmlFileName) { using (StreamWriter sw = File.AppendText(GetMappingFileName())) { sw.WriteLine("{0}, {1}, {2}, {3}", model.Header.ModelGuid, xmlFileName, model.Header.Name, DateTime.Now); } }
public ConvertToCode(DiagramModel model, bool signalAsEnum) : base(model.GetGlyphsList ()) { _Model = model; _Header = model.Header; _SignalAsEnum = signalAsEnum; }
protected void ClearModel_i() { DoModelCleared(); _InteractionHandler = null; _Model = new DiagramModel(); _LastFileName = null; SelectMoveInteractor(); }
public CompilerResults Compile(DiagramModel model) { ConvertToCode convert = new ConvertToCode (model, false); string code = convert.Convert (); Type loggingUtilType = typeof (LoggingUserBase); Type qf4netType = typeof (qf4net.QHsm); Type qfExtensionsType = typeof (qf4net.LQHsm); CompilerResults results = Compile (code, new Type[] {loggingUtilType, qf4netType, qfExtensionsType}); return results; }
public CompilerResults Compile(DiagramModel model) { ConvertToCode convert = new ConvertToCode(model, false); string code = convert.Convert(); Type loggingUtilType = typeof(LoggingUserBase); Type qf4netType = typeof(qf4net.QHsm); Type qfExtensionsType = typeof(qf4net.LQHsm); CompilerResults results = Compile(code, new Type[] { loggingUtilType, qf4netType, qfExtensionsType }); return(results); }
public override void Execute() { LoadGlyphDataFile loadFile = new LoadGlyphDataFile(); loadFile.Load(_FileName); DiagramModel model = new DiagramModel(loadFile.Header, loadFile.Glyphs); Context.ReplaceModel(model); Context.LastFileName = _FileName; Context.RefreshView(); }
public void SetMachineModel(DiagramModel model, TestAppForm appForm) { CodeCompiler compiler = new CodeCompiler (); System.CodeDom.Compiler.CompilerResults results = compiler.Compile (model); if (!results.Errors.HasErrors) { string typeName = model.Header.NameSpace + "." + model.Header.Name; Type type = results.CompiledAssembly.GetType (typeName); qf4net.ILQHsm hsm = HsmUtil.CreateHsm (type); Controller.Execute (hsm); } else { foreach (string msg in results.Output) { appForm.Log (Color.Red, msg + "\n"); } } }
public void SetMachineModel(DiagramModel model, TestAppForm appForm) { CodeCompiler compiler = new CodeCompiler(); System.CodeDom.Compiler.CompilerResults results = compiler.Compile(model); if (!results.Errors.HasErrors) { string typeName = model.Header.NameSpace + "." + model.Header.Name; Type type = results.CompiledAssembly.GetType(typeName); qf4net.ILQHsm hsm = HsmUtil.CreateHsm(type); Controller.Execute(hsm); } else { foreach (string msg in results.Output) { appForm.Log(Color.Red, msg + "\n"); } } }
public ExecuteHsmCommand(DiagramModel model, IUIInterationContext context, string lastFileName) { _Model = model; _Context = context; _LastFileName = lastFileName; }
public QHsmExecutionController(DiagramModel model) : base (model.GetGlyphsList ()) { }
public void ClearModel() { if (AppForm () != null) { AppForm ().ClearExecutionModelTabs (); } _InteractionHandler = null; _Model = new DiagramModel (); _LastFileName = null; SelectMoveInteractor (); }
public ConvertToXml(DiagramModel model) : base(model.GetGlyphsList ()) { }
public void ReplaceModel(DiagramModel model) { _Model = model; }
public SaveGlyphDataFile(DiagramModel model) { _Model = model; _Header = model.Header; _Glyphs = model.GetGlyphsList (); }
public QHsmExecutionController(DiagramModel model) : base(model.GetGlyphsList ()) { }
public SaveAsImageCommand(DiagramModel model, IUIInterationContext context, string lastFileName) { _Model = model; _Context = context; _LastFileName = lastFileName; }
public ConvertToXml(DiagramModel model) : base(model.GetGlyphsList()) { _Model = model; }
public SaveGlyphDataFile(DiagramModel model) { _Model = model; _Header = model.Header; _Glyphs = model.GetGlyphsList(); }