public static void Diff(PathFile p1, PathFile p2) { List <string> diff = new List <string>(); Diff(p1, p2, diff); foreach (string line in diff) { Debug.WriteLine(line); } }
public PathFile(PathFile pf) { Robot = new RobotParams(pf.Robot); Groups = new PathGroup[pf.Groups.Length]; for (int i = 0; i < Groups.Length; i++) { Groups[i] = new PathGroup(pf.Groups[i]); } IsDirty = true; m_filename = pf.m_filename; }
protected bool GeneratePathFile(RobotParams robot, RobotPath path, string filename) { bool ret = true; PathFile pf = new PathFile(); pf.Robot = robot; pf.AddPathGroup("tmp"); pf.AddPath("tmp", path); string json = JsonConvert.SerializeObject(pf); try { File.WriteAllText(filename, json); } catch (Exception) { ret = false; } return(ret); }
public static void Diff(PathFile p1, PathFile p2, List <string> diff) { Diff(p1.Robot, p2.Robot, diff); Diff(p1.Groups, p2.Groups, diff); }
public UndoState(int serial, PathFile pf) { m_file = new PathFile(pf); m_serial = serial; m_selected_index = -1; }