/// <summary> /// Initializes a new instance of the <see cref="MDModel" /> class. /// </summary> /// <param name="commandManager">The injected command manager.</param> /// <param name="menuService">The menu service.</param> public GorillaModel() { _sprites = new ObservableCollection <SpriteModel>(); mFonts = new ObservableCollection <FontModel>(); mRectangles = new ObservableCollection <System.Windows.UIElement>(); m_items = new CollectionOfIItem(); SelectedRectangle = new Rectangle(); mRectangles.Add(m_SelectedRectangle); ImageFolder = @"D:\Projekte\coop\XEngine\data\Test\XETUI\art"; ImageExtensions = "*.png"; FontImagePath = @"D:\Projekte\coop\Build\arial.png"; TextureName = "arial.png"; Name = "TestGorillaAtlas"; PathToGorillaFile = @"D:\Projekte\coop\Build\" + Name + ".gorilla"; PathToFontGorillaFile = @"D:\Projekte\coop\Build\arial.gorilla"; //StreamReader streamReader = new StreamReader(m_PathToGorillaFile); //GorillaCode = streamReader.ReadToEnd(); //streamReader.Close(); Width = SquareSize.SS_2048; Height = SquareSize.SS_2048; }
public CollectionOfIItem GetItems(string path) { var items = new CollectionOfIItem(); var dirInfo = new DirectoryInfo(path); foreach (var directory in dirInfo.GetDirectories()) { var item = new DirectoryItem { Name = directory.Name, ContentID = directory.FullName, Items = GetItems(directory.FullName) }; items.Add(item); } foreach (var file in dirInfo.GetFiles()) { var item = new FileItem { Name = file.Name, ContentID = file.FullName }; items.Add(item); } return(items); }
public PItem() { m_Items = new CollectionOfIItem(); this.CanAddThisItems = new List<Type>(); }
public PItem() { m_Items = new CollectionOfIItem(); this.CanAddThisItems = new List <Type>(); MenuOptions = new List <IMenuItem>(); }
public DirectoryItem() { Items = new CollectionOfIItem(); }