public Storage(string url, GUI owner) { this._physicalStorage = new PhysicalXml(Util.BASEURL + "\\" + url); this._songList = this._physicalStorage.GetSongs(); this._owner = owner; Util.NRSONGS = this._songList.Count; InitializeSearch(); }
public Storage(string url, GUI owner) { this.PStorage = new PhysicalXML(Util.BASEURL + "\\" + url); this.SongList = this.PStorage.getSongs(); this.owner = owner; // this.search = new Search(); this.search = new IndexSearch(this.SongList.Values); // lucene searcher! Util.NRSONGS = this.SongList.Count; }
/// <summary> /// Initializes a new instance of the <see cref="Style" /> class. /// </summary> /// <param name="styleNode"> The style node. </param> /// <param name="storage"> The storage. </param> public Style(XmlNode styleNode, IPhysicalStorage storage) { _storage = storage; _id = styleNode.GetId(); _isDefault = styleNode.GetAttributeBoolValue("isdefault"); _name = styleNode.GetAttributeValue("name"); _foregroundColor = styleNode.GetNodeColorValue("Foreground", "color"); _font = styleNode.GetNodeValue("Foreground", "font"); _fontSize = styleNode.GetNodeIntValue("Foreground", "fontsize"); if (styleNode.HasNode("Background")) { _backgroundColor = styleNode.GetNodeColorValue("Background", "color"); if (styleNode.HasNode("Background", "image")) { _backgroundImageUri = styleNode.GetNodeValue("Background", "image", "uri"); var cache = styleNode.GetNodeValue("Background", "image", "cache"); if (!string.IsNullOrEmpty(cache)) { _backgroundImage = ImageSerializer.DeserializeBase64(cache); } else if (File.Exists(_backgroundImageUri)) { _backgroundImage = Image.FromFile(_backgroundImageUri); } _transparency = styleNode.GetNodeIntValue("Background", "image", "transparency"); _scale = styleNode.GetNodeBoolValue("Background", "image", "scale"); } if (styleNode.HasNode("Title")) { _titleMode = TitleModeExtensions.AsTitleMode(styleNode["Title"].GetAttributeValue("mode")); if (styleNode.HasNode("Title", "Foreground")) { _titleForegroundColor = styleNode.GetNodeColorValue("Title", "Foreground", "color"); _titleFont = styleNode.GetNodeValue("Title", "Foreground", "font"); _titleFontSize = styleNode.GetNodeIntValue("Title", "Foreground", "fontsize"); } if (styleNode.HasNode("Title", "Background")) { _titleBackgroundColor = styleNode.GetNodeColorValue("Title", "Background", "color"); } } } }
public NameSpaceElement Build(CompilationUnitSyntax syntax, IPhysicalStorage storage) { try { var global = new NameSpaceElement(storage); _ = new QualifiedElement(global); _parentStack.Push(global); Visit(syntax); Debug.Assert(_parentStack.Count == 1); return((NameSpaceElement)_parentStack.Pop()); } finally { _parentStack.Clear(); } }
public bool IsEquivalentTo(IPhysicalStorage other) => other switch {
public string UpdateTranslations(IPhysicalStorage pStorage) { return pStorage.CommitTranslations(this.translations); }
protected override void AreEqual(IPhysicalStorage actual, IPhysicalStorage expected) => actual.IsSameReferenceAs(expected);
private Style(IPhysicalStorage storage) { _id = Guid.NewGuid(); _storage = storage; }
public static Style CreateNewStyle(IPhysicalStorage storage, string name) { var style = new Style(storage) { Name = name }; style._isNew = true; return style; }
protected override void AreEqual(IPhysicalStorage actual, IPhysicalStorage expected) => ReferenceEquals(actual, expected).IsTrue();
public static bool IsNotAvailable(IPhysicalStorage storage) => ReferenceEquals(storage, NotAvailable);
public bool IsEquivalentTo(IPhysicalStorage other) => ReferenceEquals(other, this);