private void AddDefaultRulers() { var l1 = new RulerLine { Value = -384 }; var l2 = new RulerLine { Value = 384 }; var ruler = new RulerData { Name = "1152x768 (3:2)" }; ruler.Lines.Add(new RulerLine { IsVertical = true, Value = -576 }); ruler.Lines.Add(new RulerLine { IsVertical = true, Value = 576 }); ruler.Lines.Add(l1); ruler.Lines.Add(l2); DefaultRulers.Add(ruler); ruler = new RulerData { Name = "1024x768 (3:4)" }; ruler.Lines.Add(new RulerLine { IsVertical = true, Value = -512 }); ruler.Lines.Add(new RulerLine { IsVertical = true, Value = 512 }); ruler.Lines.Add(l1); ruler.Lines.Add(l2); DefaultRulers.Add(ruler); ruler = new RulerData { Name = "1366x768 (16:9)" }; ruler.Lines.Add(new RulerLine { IsVertical = true, Value = -683 }); ruler.Lines.Add(new RulerLine { IsVertical = true, Value = 683 }); ruler.Lines.Add(l1); ruler.Lines.Add(l2); DefaultRulers.Add(ruler); ruler = new RulerData { Name = "1579x768" }; ruler.Lines.Add(new RulerLine { IsVertical = true, Value = -790 }); ruler.Lines.Add(new RulerLine { IsVertical = true, Value = 790 }); ruler.Lines.Add(l1); ruler.Lines.Add(l2); DefaultRulers.Add(ruler); }
public void RemoveRuler(RulerData ruler) { Orange.The.Workspace.ProjectJson.RemoveFromArray("Rulers", ruler); Rulers.Remove(ruler); Orange.The.Workspace.SaveCurrentProject(); }
public void AddRuler(RulerData ruler) { Orange.The.Workspace.ProjectJson.AddToArray("Rulers", ruler); Rulers.Add(ruler); Orange.The.Workspace.SaveCurrentProject(); }