From 09abcce174f8dc4e612f5cd98b07dffced5b38cd Mon Sep 17 00:00:00 2001 From: Jean-Philippe Bruyère Date: Mon, 6 May 2019 00:37:48 +0200 Subject: wip --- Samples/CrowIDE/src/Solution.cs | 541 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 541 insertions(+) create mode 100644 Samples/CrowIDE/src/Solution.cs (limited to 'Samples/CrowIDE/src/Solution.cs') diff --git a/Samples/CrowIDE/src/Solution.cs b/Samples/CrowIDE/src/Solution.cs new file mode 100644 index 00000000..c6b1fbc1 --- /dev/null +++ b/Samples/CrowIDE/src/Solution.cs @@ -0,0 +1,541 @@ +// +// Solution.cs +// +//code taken in project https://sourceforge.net/projects/syncproj/ +// no licence info was included, I took the liberty to modify it. +// Author: +// tarmopikaro +// 2018 Jean-Philippe Bruyère +//MIT-licenced + +using Microsoft.Win32; +using System; +using System.Collections.Generic; +using System.Diagnostics.CodeAnalysis; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Reflection; +using System.Text; +using System.Text.RegularExpressions; +using System.Xml.Serialization; +using Crow; + +namespace Crow.Coding{ + public class SolutionProject { + public string ProjectHostGuid; + public string ProjectName; + public string RelativePath; + public string ProjectGuid; + } + public class StyleItemContainer { + public object Value; + public string Name; + public StyleItemContainer(string name, object _value){ + Name = name; + Value = _value; + } + } + public class StyleContainer : IValueChange { + #region IValueChange implementation + public event EventHandler ValueChanged; + public virtual void NotifyValueChanged(string MemberName, object _value) + { + ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value)); + } + #endregion + + Style style; + bool isExpanded; + + public string Name; + public List Items; + public bool IsExpanded + { + get { return isExpanded; } + set + { + if (value == isExpanded) + return; + isExpanded = value; + NotifyValueChanged ("IsExpanded", isExpanded); + } + } + public StyleContainer(string name, Style _style){ + Name = name; + style = _style; + + Items = new List (); + foreach (string k in style.Keys) { + Items.Add(new StyleItemContainer(k, style[k])); + } + } + } + + + /// +/// .sln loaded into class. +/// + public class Solution: IValueChange + { + #region IValueChange implementation + public event EventHandler ValueChanged; + public virtual void NotifyValueChanged(string MemberName, object _value) + { + ValueChanged.Raise(this, new ValueChangeEventArgs(MemberName, _value)); + } + #endregion + + ProjectItem selectedItem = null; + object selectedItemElement = null; + ObservableList openedItems = new ObservableList(); + ObservableList toolboxItems; + + public Dictionary Styling; + public Dictionary DefaultTemplates; + + public List