<AssemblyOriginatorKeyFile>crow.key</AssemblyOriginatorKeyFile>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
- <ReleaseVersion>0.7</ReleaseVersion>
+ <ReleaseVersion>0.5</ReleaseVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
- <DefineConstants>DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_DISPOSE0;DEBUG_LAYOUTING0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)build\Debug</OutputPath>
+ <DefineConstants>DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_DISPOSE0;DEBUG_LAYOUTING0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<EmbeddedResource Include="Icons\folder.svg" />
<EmbeddedResource Include="Icons\file.svg" />
<EmbeddedResource Include="Icons\level-up.svg" />
+ <EmbeddedResource Include="Icons\frame.svg" />
<EmbeddedResource Include="Templates\FileItems.template" />
<EmbeddedResource Include="Templates\DefaultItem.template">
<LogicalName>Crow.DefaultItem.template</LogicalName>
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Test", "Crow.Test\Crow.Test.csproj", "{42C73BD8-51F5-4BB7-8EE9-9F0BE2D80A2C}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CrowIDE", "CrowIDE\CrowIDE.csproj", "{B6D911CD-1D09-42FC-B300-9187190F2AE1}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Crow.Coding", "..\gts\CrowEdit\Crow.Coding\Crow.Coding.csproj", "{78842EE4-8A2F-4C75-AEC6-C95F15AD3994}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.Build.0 = Release|Any CPU
+ {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.Build.0 = Release|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C2980F9B-4798-4C05-99E2-E174810F7C7B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {78842EE4-8A2F-4C75-AEC6-C95F15AD3994}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(MonoDevelopProperties) = preSolution
Policies = $0
$0.StandardHeader = $1
$1.Text = @\n${FileName}\n \nAuthor:\n ${AuthorName} <${AuthorEmail}>\n\nCopyright (c) 2013-2017 Jean-Philippe Bruyère\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the "Software"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.
- $1.IncludeInNewFiles = True
$0.DotNetNamingPolicy = $2
- $2.DirectoryNamespaceAssociation = None
- $2.ResourceNamePolicy = FileFormatDefault
$0.TextStylePolicy = $3
- $3.FileWidth = 120
- $3.TabsToSpaces = False
$3.EolMarker = Unix
- $3.inheritsSet = VisualStudio
- $3.inheritsScope = text/plain
$3.scope = text/x-csharp
$0.CSharpFormattingPolicy = $4
$4.AfterDelegateDeclarationParameterComma = True
- $4.inheritsSet = Mono
- $4.inheritsScope = text/x-csharp
$4.scope = text/x-csharp
+ $4.IndentSwitchSection = False
+ $4.NewLinesForBracesInProperties = False
+ $4.NewLinesForBracesInAccessors = False
+ $4.NewLinesForBracesInAnonymousMethods = False
+ $4.NewLinesForBracesInControlBlocks = False
+ $4.NewLinesForBracesInAnonymousTypes = False
+ $4.NewLinesForBracesInObjectCollectionArrayInitializers = False
+ $4.NewLinesForBracesInLambdaExpressionBody = False
+ $4.NewLineForElse = False
+ $4.NewLineForCatch = False
+ $4.NewLineForFinally = False
+ $4.NewLineForMembersInObjectInit = False
+ $4.NewLineForMembersInAnonymousTypes = False
+ $4.NewLineForClausesInQuery = False
+ $4.SpacingAfterMethodDeclarationName = True
+ $4.SpaceAfterMethodCallName = True
+ $4.SpaceBeforeOpenSquareBracket = True
$0.VersionControlPolicy = $5
$5.CommitMessageStyle = $6
$6.Indent = @\t
$6.LastFilePostfix = "@:\n "
$6.LineAlign = 0
$6.Wrap = False
- $5.inheritsSet = Mono
description = @C.R.O.W. c# Rapid Open Widgets\n\nCrow is a pure c# widget toolkit with XML definition of interface, bindings, styling...\n
- version = 0.7
+ version = 0.5
EndGlobalSection
EndGlobal
<Project>{C2980F9B-4798-4C05-99E2-E174810F7C7B}</Project>
<Name>Crow</Name>
</ProjectReference>
+ <ProjectReference Include="..\..\gts\CrowEdit\Crow.Coding\Crow.Coding.csproj">
+ <Project>{78842EE4-8A2F-4C75-AEC6-C95F15AD3994}</Project>
+ <Name>Crow.Coding</Name>
+ </ProjectReference>
</ItemGroup>
<ItemGroup>
<Compile Include="src\CrowIDE.cs" />
<Compile Include="src\EditPane.cs" />
<Compile Include="src\ProjectNodes.cs" />
<Compile Include="src\SolutionControler.cs" />
+ <Compile Include="src\INetProject.cs" />
</ItemGroup>
<ItemGroup>
<Folder Include="ui\" />
<EmbeddedResource Include="ui\TabItem.template">
<LogicalName>Crow.TabItem.template</LogicalName>
</EmbeddedResource>
+ <EmbeddedResource Include="ui\MenuItem.template">
+ <LogicalName>Crow.MenuItem.template</LogicalName>
+ </EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="ui\test.crow">
<None Include="ui\icons\zoom-in.svg" />
<None Include="ui\icons\zoom-out.svg" />
<None Include="ui\icons\basic_floppydisk.svg" />
- <None Include="ui\MenuItem.template">
- <LogicalName>Crow.MenuItem.template</LogicalName>
- </None>
</ItemGroup>
</Project>
{
if (e.Key == OpenTK.Input.Key.Escape) {
Quit (null, null);
- return;
- }
-// else if (e.Key == OpenTK.Input.Key.F4) {
-// loadWindow ("#CrowIDE.ui.MemberView.crow");
-// } else if (e.Key == OpenTK.Input.Key.F5) {
-// loadWindow ("#CrowIDE.ui.GTreeExplorer.crow");
-// } else if (e.Key == OpenTK.Input.Key.F6) {
+ } else if (e.Key == OpenTK.Input.Key.F5) {
+ try {
+ CurrentSolution.StartupProject.Compile ();
+ } catch (Exception ex) {
+ Console.WriteLine (ex.ToString ());
+ }
+
+ }// else if (e.Key == OpenTK.Input.Key.F6) {
// loadWindow ("#CrowIDE.ui.LQIsExplorer.crow");
// } else if (e.Key == OpenTK.Input.Key.F7) {
// loadWindow ("#CrowIDE.ui.CSProjExplorer.crow");
--- /dev/null
+//
+// INetProject.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+
+namespace Crow.Coding
+{
+ public interface INetProject
+ {
+
+ }
+}
+
return;
hr = SelectedItem.ScreenCoordinates(SelectedItem.getSlot ());
hr.Inflate (1);
+ gr.LineWidth = 2;
gr.SetSourceColor (Color.Yellow);
gr.SetDash (new double[]{ 5.0, 3.0 },0.0);
gr.Rectangle (hr, 1.0);
using Microsoft.CSharp;
using System.CodeDom.Compiler;
using Crow;
+using System.Text.RegularExpressions;
namespace CrowIDE
{
XmlNode nodeProject;
XmlNode nodeProps;
XmlNodeList nodesItems;
+ SolutionProject solutionProject;
+
public Solution solution;
public List<Crow.Command> Commands;
public CompilerResults CompilationResults;
public List<Project> dependantProjects = new List<Project>();
public Project ParentProject = null;
+ List<ProjectNode> rootItems;
+ List<ProjectNode> flattenNodes;
public string Name {
get { return solutionProject.ProjectName; }
public string Path {
get { return System.IO.Path.Combine (solution.SolutionFolder, solutionProject.RelativePath.Replace('\\','/')); }
}
-
-
- #region Project properties
public string RootDir {
get { return System.IO.Path.GetDirectoryName (Path); }
}
+
+
+
+ public List<ProjectNode> RootItems {
+ get { return rootItems; }
+ }
+
+ void buildTreeNodes(){
+ ProjectNode root = new ProjectNode (this, ItemType.VirtualGroup, RootNamespace);
+ List<ProjectItem> items = new List<ProjectItem> ();
+ foreach (XmlNode i in nodesItems) {
+ foreach (XmlNode f in i.ChildNodes) {
+ items.Add (new ProjectItem (this, f));
+ }
+ }
+
+ flattenNodes = new List<ProjectNode> ();
+
+ ProjectNode refs = new ProjectNode (this, ItemType.ReferenceGroup, "References");
+ root.ChildNodes.Add (refs);
+
+ foreach (ProjectItem pn in items) {
+ switch (pn.Type) {
+ case ItemType.Reference:
+ refs.ChildNodes.Add (pn);
+ flattenNodes.Add (pn);
+ break;
+ case ItemType.ProjectReference:
+ ProjectReference pr = new ProjectReference (pn);
+ refs.ChildNodes.Add (pr);
+ flattenNodes.Add (pr);
+ break;
+ case ItemType.Compile:
+ case ItemType.None:
+ case ItemType.EmbeddedResource:
+ ProjectNode curNode = root;
+ string[] folds = pn.Path.Split ('/');
+ for (int i = 0; i < folds.Length - 1; i++) {
+ ProjectNode nextNode = curNode.ChildNodes.FirstOrDefault (n => n.DisplayName == folds [i] && n.Type == ItemType.VirtualGroup);
+ if (nextNode == null) {
+ nextNode = new ProjectNode (this, ItemType.VirtualGroup, folds [i]);
+ curNode.ChildNodes.Add (nextNode);
+ }
+ curNode = nextNode;
+ }
+ ProjectNode f = null;
+ switch (pn.Extension) {
+ case ".crow":
+ case ".template":
+ f = new ImlProjectItem (pn);
+ break;
+ default:
+ f = new ProjectFile (pn);
+ break;
+ }
+ curNode.ChildNodes.Add (f);
+ flattenNodes.Add (f);
+ break;
+ }
+ }
+ root.SortChilds ();
+
+ rootItems = root.ChildNodes;
+ }
+
+ #region Project properties
public string ToolsVersion {
get { return nodeProject?.Attributes ["ToolsVersion"]?.Value; }
}
public string IntermediateOutputPath {
get { return nodeProps["IntermediateOutputPath"]?.InnerText; }
}
- #endregion
-
- public List<ProjectItem> Items {
- get {
- List<ProjectItem> tmp = new List<ProjectItem> ();
- foreach (XmlNode i in nodesItems) {
- foreach (XmlNode f in i.ChildNodes) {
- tmp.Add (new ProjectItem (this, f));
- }
- }
- return tmp;
- }
+ public string StartupObject {
+ get { return nodeProps["StartupObject"]?.InnerText; }
+ }
+ public bool DebugSymbols {
+ get { return nodeProps["DebugSymbols"] == null ? false : bool.Parse( nodeProps["DebugSymbols"]?.InnerText); }
+ }
+ public int WarningLevel {
+ get { return nodeProps["WarningLevel"] == null ? 0 : int.Parse(nodeProps["WarningLevel"]?.InnerText); }
}
- public List<ProjectNode> RootItems {
- get {
- ProjectNode root = new ProjectNode (this, ItemType.VirtualGroup, RootNamespace);
- List<ProjectItem> items = Items;
-
- ProjectNode refs = new ProjectNode (this, ItemType.ReferenceGroup, "References");
- root.ChildNodes.Add (refs);
-
- foreach (ProjectItem pn in items) {
- switch (pn.Type) {
- case ItemType.Reference:
- refs.ChildNodes.Add (pn);
- break;
- case ItemType.ProjectReference:
- refs.ChildNodes.Add (new ProjectReference(pn));
- break;
- case ItemType.Compile:
- case ItemType.None:
- case ItemType.EmbeddedResource:
- ProjectNode curNode = root;
- string[] folds = pn.Path.Split ('/');
- for (int i = 0; i < folds.Length - 1; i++) {
- ProjectNode nextNode = curNode.ChildNodes.FirstOrDefault (n => n.DisplayName == folds [i] && n.Type == ItemType.VirtualGroup);
- if (nextNode == null) {
- nextNode = new ProjectNode (this, ItemType.VirtualGroup, folds [i]);
- curNode.ChildNodes.Add (nextNode);
- }
- curNode = nextNode;
- }
- switch (pn.Extension) {
- case ".crow":
- case ".template":
- curNode.ChildNodes.Add (new ImlProjectItem(pn));
- break;
- default:
- curNode.ChildNodes.Add (pn);
- break;
- }
-
-
- break;
- }
- }
- root.SortChilds ();
-
- return root.ChildNodes;
- }
+ #endregion
- }
- SolutionProject solutionProject;
public Project (Solution sol, SolutionProject sp) {
solutionProject = sp;
if (ProjectGuid != solutionProject.ProjectGuid)
throw new Exception ("Project GUID not matching with solution");
+ buildTreeNodes ();
+
IsLoaded = true;
}
void setAsStartupProject () {
solution.StartupProject = this;
}
-
- public void Compile () {
+ static Regex regexDirTokens = new Regex(@"\$\(([^\)]*)\)|([^\$]*)");
+
+ string getDirectoryWithTokens (string dir){
+ Match m = regexDirTokens.Match (dir);
+ string tmp = "";
+ while (m.Success)
+ {
+ if (m.Value == @"$(SolutionDir)")
+ tmp = System.IO.Path.Combine (tmp, solution.SolutionFolder);
+ else if (m.Value == @"$(Configuration)")
+ tmp = System.IO.Path.Combine (tmp, "Debug");
+ else
+ tmp = System.IO.Path.Combine (tmp, m.Value);
+
+ if (tmp.EndsWith (@"\")||tmp.EndsWith (@"/"))
+ tmp = tmp.Remove (tmp.Length - 1);
+
+ m = m.NextMatch();
+ }
+ return tmp;
+ }
+ public string Compile () {
+ GetStyling ();
+
if (ParentProject != null)
ParentProject.Compile ();
CSharpCodeProvider cp = new CSharpCodeProvider();
CompilerParameters parameters = new CompilerParameters();
- foreach (ProjectItem pi in Items.Where (pp=>pp.Type == ItemType.ProjectReference)) {
- ProjectReference pr = new ProjectReference (pi);
+ foreach (ProjectReference pr in flattenNodes.OfType<ProjectReference>()) {
Project p = solution.Projects.FirstOrDefault (pp => pp.ProjectGuid == pr.ProjectGUID);
if (p == null)
throw new Exception ("referenced project not found");
- p.Compile ();
- parameters.ReferencedAssemblies.Add (pr.DisplayName);
+ parameters.ReferencedAssemblies.Add (p.Compile ());
}
- foreach (ProjectItem pi in Items.Where (p=>p.Type == ItemType.Reference)) {
- parameters.ReferencedAssemblies.Add (pi.Path);
- }
- parameters.ReferencedAssemblies.Add ("System.Core");
-
- parameters.GenerateInMemory = true;
+ string outputDir = getDirectoryWithTokens(this.OutputPath);
+ string objDir = getDirectoryWithTokens (this.IntermediateOutputPath);
- if (!Directory.Exists("testbuild"))
- Directory.CreateDirectory ("testbuild");
- parameters.OutputAssembly = "testbuild/" + this.AssemblyName;
+ Directory.CreateDirectory (outputDir);
+ Directory.CreateDirectory (objDir);
+
+ parameters.OutputAssembly = System.IO.Path.Combine (outputDir, this.AssemblyName);
// True - exe file generation, false - dll file generation
if (this.OutputType == "Library") {
parameters.GenerateExecutable = true;
parameters.CompilerOptions += " /target:exe";
parameters.OutputAssembly += ".exe";
+ parameters.MainClass = this.StartupObject;
}
- parameters.IncludeDebugInformation = true;
+ parameters.GenerateInMemory = false;
+ parameters.IncludeDebugInformation = this.DebugSymbols;
parameters.TreatWarningsAsErrors = this.TreatWarningsAsErrors;
- parameters.WarningLevel = 4;
+ parameters.WarningLevel = this.WarningLevel;
parameters.CompilerOptions += " /noconfig";
if (this.AllowUnsafeBlocks)
parameters.CompilerOptions += " /unsafe";
parameters.CompilerOptions += " /delaysign+";
+ parameters.CompilerOptions += " /debug:full /debug+";
+ parameters.CompilerOptions += " /optimize-";
+ parameters.CompilerOptions += " /define:\"DEBUG;TRACE\"";
+ parameters.CompilerOptions += " /nostdlib";
+
+
+
+ foreach (ProjectItem pi in flattenNodes.Where (p=>p.Type == ItemType.Reference)) {
+
+ if (string.IsNullOrEmpty (pi.HintPath)) {
+ parameters.CompilerOptions += " /reference:/usr/lib/mono/4.5/" + pi.Path + ".dll";
+ continue;
+ }
+ parameters.ReferencedAssemblies.Add (pi.Path);
+ string fullHintPath = System.IO.Path.GetFullPath(System.IO.Path.Combine (RootDir, pi.HintPath.Replace('\\','/')));
+ if (File.Exists(fullHintPath))
+ File.Copy (fullHintPath, System.IO.Path.Combine(outputDir, System.IO.Path.GetFileName(fullHintPath)));
+ }
+ parameters.CompilerOptions += " /reference:/usr/lib/mono/4.5/System.Core.dll";
+ parameters.CompilerOptions += " /reference:/usr/lib/mono/4.5/mscorlib.dll";
+ //parameters.ReferencedAssemblies.Add ("System.Core");
+ //parameters.ReferencedAssemblies.Add ("mscorlib.dll");
+
- foreach (ProjectFile pi in Items.OfType<ProjectFile>().Where (p => p.Type == ItemType.EmbeddedResource)) {
+ IEnumerable<ProjectFile> pfs = flattenNodes.OfType<ProjectFile> ();
+
+ foreach (ProjectFile pi in pfs.Where (p => p.Type == ItemType.EmbeddedResource)) {
string absPath = pi.AbsolutePath;
string logicName = pi.LogicalName;
if (string.IsNullOrEmpty (logicName))
- parameters.CompilerOptions += string.Format (" /resource:{0}", absPath);
+ parameters.CompilerOptions += string.Format (" /resource:{0},{1}", absPath , this.Name + "." + pi.Path.Replace('/','.'));
else
parameters.CompilerOptions += string.Format (" /resource:{0},{1}", absPath, logicName);
}
+ foreach (ProjectFile pi in pfs.Where (p => p.Type == ItemType.None)) {
+ if (pi.CopyToOutputDirectory == CopyToOutputState.Never)
+ continue;
+ string source = pi.AbsolutePath;
+ string target = System.IO.Path.Combine (outputDir, pi.Path);
+ Directory.CreateDirectory (System.IO.Path.GetDirectoryName (target));
+
+ if (File.Exists (target)) {
+ if (pi.CopyToOutputDirectory == CopyToOutputState.PreserveNewest) {
+ if (DateTime.Compare (
+ System.IO.File.GetLastWriteTime (source),
+ System.IO.File.GetLastWriteTime (target)) < 0)
+ continue;
+ }
+ File.Delete (target);
+ }
+ System.Diagnostics.Debug.WriteLine ("copy " + source + " to " + target);
+ File.Copy (source, target);
+ }
+ string[] files = pfs.Where (p => p.Type == ItemType.Compile).Select (p => p.AbsolutePath).ToArray();
-
- string[] files = Items.Where (p => p.Type == ItemType.Compile).Select (p => p.AbsolutePath).ToArray();
+ System.Diagnostics.Debug.WriteLine("---- start compilation of :" + parameters.OutputAssembly);
+ System.Diagnostics.Debug.WriteLine (parameters.CompilerOptions);
CompilationResults = cp.CompileAssemblyFromFile(parameters, files);
solution.UpdateErrorList ();
+
+ return parameters.OutputAssembly;
}
+
+
+ public void GetStyling () {
+ foreach (ProjectFile pi in flattenNodes.OfType<ProjectFile> ().Where (pp=>pp.Type == ItemType.EmbeddedResource)) {
+ Console.WriteLine (pi.Extension);
+ }
+ }
}
}
Path.Split ('/').LastOrDefault();
}
}
-
+ public string HintPath {
+ get { return node.SelectSingleNode ("HintPath")?.InnerText; }
+ }
}
public class ProjectReference : ProjectItem {
public ProjectReference (ProjectItem pi) : base (pi.Project, pi.node){
}
}
}
+ public enum CopyToOutputState {
+ Never,
+ Always,
+ PreserveNewest
+ }
public class ProjectFile : ProjectItem {
+ bool isDirty = false;
+ object selectedItem;
+
public ProjectFile (ProjectItem pi) : base (pi.Project, pi.node){
}
- object selectedItem;
public string LogicalName {
get {
return node.SelectSingleNode ("LogicalName")?.InnerText;
NotifyValueChanged ("SelectedItem", selectedItem);
}
}
-
+ public CopyToOutputState CopyToOutputDirectory {
+ get {
+ XmlNode xn = node.SelectSingleNode ("CopyToOutputDirectory");
+ if (xn == null)
+ return CopyToOutputState.Never;
+ CopyToOutputState tmp = (CopyToOutputState)Enum.Parse (typeof(CopyToOutputState), xn.InnerText, true);
+ return tmp;
+ //return xn == null ? CopyToOutputState.Never : (CopyToOutputState)Enum.Parse (typeof(CopyToOutputState), xn.InnerText, true);
+ }
+ }
public void OnQueryClose (object sender, EventArgs e){
Project.solution.CloseItem (this);
}
}
));
+ Console.WriteLine ("******** CONFIG ***************");
+
new Regex("GlobalSection\\(ProjectConfigurationPlatforms\\).*?[\r\n]+(.*?)EndGlobalSection[\r\n]+", RegexOptions.Singleline).Replace(slnTxt, new MatchEvaluator(m2 =>
{
foreach (Match m3 in new Regex("\\s*({[A-F0-9-]+})\\.(.*?)\\.(.*?)\\s+=\\s+(.*?)[\r\n]+").Matches(m2.Groups[1].ToString()))
if (p == null)
continue;
+ Console.WriteLine ("{0},{1},{2},{3}",guid,solutionConfig,action,projectConfig);
+
int iConfigIndex = s.configurations.IndexOf(solutionConfig);
if (iConfigIndex == -1)
continue;
Data="{Projects}" SelectedItemChanged="onSelectedItemChanged"
ItemTemplate="#CrowIDE.ui.ProjectTree.template"/>
<Splitter/>
- <MembersView Instance="{SelectedItemElement}" DataTest="Type" Background="DimGray"
+ <MembersView Instance="{SelectedItemElement}" DataTest="Type"
ItemTemplate="#CrowIDE.ui.MembersItem.template"/>
</VerticalStack>
</HorizontalStack>
<?xml version="1.0"?>
<Window Caption="Properties" Width="30%" Height="60%" AlwaysOnTop="true">
- <MembersView Instance="{SelectedItem}" DataTest="Type" Background="DimGray"
+ <MembersView Instance="{SelectedItem}" DataTest="Type"
ItemTemplate="#CrowIDE.ui.MembersItem.template"/>
</Window>
\ No newline at end of file
<Border Height="Fit">
<Label TextAlignment="Left" Text="{../../../SelectedItemName}" Width="Stretched"/>
</Border>
- <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
- ValueChanged="./_scroller_ValueChanged">
- <VerticalStack LayoutChanged="./_list_LayoutChanged" Spacing="0"
- Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
- </Scroller>
+ <HorizontalStack>
+ <Scroller Name="scroller1" Margin="1" VerticalScrolling="true"
+ Background="{./Background}"
+ ScrollY="{../scrollbar1.Value}">
+ <VerticalStack
+ Height="Fit" Name="ItemsContainer" Margin="0" VerticalAlignment="Top"/>
+ </Scroller>
+ <ScrollBar
+ Name="scrollbar1"
+ LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30"
+ CursorSize="{../scroller1.ChildHeightRatio}"
+ Value="{../scroller1.ScrollY}"
+ Maximum="{../scroller1.MaximumScroll}"
+ Width="14" Orientation="Vertical"/>
+ </HorizontalStack>
</VerticalStack>
Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseClick="./onMI_Click"
IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}" IsEnabled="{./IsEnabled}">
<Template>
- <Border Name="border1"
- MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
- MouseLeave="{Foreground=Transparent}"
- MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
- MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
- MinimumSize = "40,0"
- Foreground="Transparent"
- Background="{./Background}">
- <HorizontalStack HorizontalAlignment="Left" Margin="1">
- <Image MaximumSize="10,10" Picture="{../../../../Icon}"/>
- <Label Text="{./Caption}"
- Foreground="{./Foreground}"
- Font="{./Font}" />
- </HorizontalStack>
- </Border>
+ <CheckBox IsChecked="{²./IsPopped}" Caption="{./Caption}" Background="{./Background}" Foreground="{./Foreground}">
+ <Template>
+ <Border Name="border1"
+ MouseEnter="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+ MouseLeave="{Foreground=Transparent}"
+ MouseDown="{Foreground=vgradient|0:Black|0.05:Gray|0.85:Gray|1:White}"
+ MouseUp="{Foreground=vgradient|0:White|0.2:Gray|0.9:Gray|1:Black}"
+ MinimumSize = "40,0"
+ Foreground="Transparent"
+ Background="{./Background}">
+ <HorizontalStack HorizontalAlignment="Left" Margin="1">
+ <Image MaximumSize="10,10" Picture="{../../../../../Icon}"/>
+ <Label Text="{./Caption}"
+ Foreground="{./Foreground}"
+ Font="{./Font}" />
+ </HorizontalStack>
+ </Border>
+ </Template>
+ </CheckBox>
</Template>
<Border Foreground="DimGray" Width="{../PopWidth}" Height="{../PopHeight}" Background="Onyx">
<VerticalStack Name="ItemsContainer"/>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="67.316353mm"
+ height="27.756908mm"
+ viewBox="0 0 67.316353 27.756908"
+ version="1.1"
+ id="svg8895"
+ inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"
+ sodipodi:docname="frame.svg">
+ <defs
+ id="defs8889" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#434343"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="0.35"
+ inkscape:cx="195.58263"
+ inkscape:cy="-58.812438"
+ inkscape:document-units="mm"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:window-width="1600"
+ inkscape:window-height="881"
+ inkscape:window-x="0"
+ inkscape:window-y="0"
+ inkscape:window-maximized="1"
+ fit-margin-top="0"
+ fit-margin-left="0"
+ fit-margin-right="0"
+ fit-margin-bottom="0" />
+ <metadata
+ id="metadata8892">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Calque 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(106.44585,-169.24652)">
+ <polygon
+ transform="matrix(0.26458333,0,0,0.26458333,-314.15488,52.734079)"
+ style="fill:#f5fcff"
+ id="polygon6818"
+ points="860.815,440.362 785.042,440.362 785.042,469.369 789.327,469.369 789.327,515.071 815.242,540.986 971.44,540.986 971.44,545.27 1001.438,545.27 1001.438,540.986 1039.466,540.986 1039.466,470.564 1013.109,444.207 1012.21,445.105 1038.193,471.091 1038.193,539.714 815.77,539.714 790.598,514.544 790.598,445.919 1014.176,445.919 1014.176,444.648 860.815,444.648 " />
+ </g>
+</svg>
<MenuItem Command="{}" Width="150" PopWidth="120" SelectionBackground="Transparent">
<Template>
<Popper Font="{./Font}" Caption="{./Caption}" Background="{./Background}" PopDirection="{./PopDirection}"
- Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseClick="./onMI_Click"
+ Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseDown="./onMI_Click"
IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}">
<Template>
<Border Name="border1"
--- /dev/null
+//
+// TechBorder.cs
+//
+// Author:
+// Jean-Philippe Bruyère <jp_bruyere@hotmail.com>
+//
+// Copyright (c) 2013-2017 Jean-Philippe Bruyère
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+using System;
+using Crow;
+
+namespace Tests
+{
+ public class TechBorder : Container
+ {
+ public TechBorder () : base() {}
+ public TechBorder (Interface iface): base (iface){}
+
+ protected override int measureRawSize (LayoutingType lt)
+ {
+ return base.measureRawSize (lt) + 6;
+ }
+ protected override void onDraw (Cairo.Context gr)
+ {
+ gr.Save ();
+
+ drawTechBorder1 (gr);
+
+ if (child != null) {
+ if (child.Visible)
+ child.Paint (ref gr);
+ }
+
+ gr.Restore ();
+ }
+
+ void drawTechBorder1 (Cairo.Context gr){
+ Rectangle r = ClientRectangle;
+
+ double l1 = Math.Round(0.2 * Math.Min (r.Width, r.Height)) + 0.5;
+
+ Foreground.SetAsSource (gr);
+ gr.LineWidth = 6.0;
+ gr.MoveTo (r.Left + 1.5, r.Top + l1);
+ gr.LineTo (r.Left + 1.5, r.Top + 1.5);
+ gr.LineTo (r.Left + l1, r.Top + 1.5);
+ gr.MoveTo (r.Left + r.Width * 0.65, r.Bottom - 1.5);
+ gr.LineTo (r.Left + r.Width * 0.85, r.Bottom - 1.5);
+ gr.Stroke ();
+
+ gr.MoveTo (r.Left + 2.5, r.Top + 2.5);
+ gr.LineTo (r.Left + 2.5, r.Bottom - l1);
+ gr.LineTo (r.Left + l1, r.Bottom - 2.5);
+ gr.LineTo (r.Right - 2.5, r.Bottom - 2.5);
+ gr.LineTo (r.Right - 2.5, r.Top + l1);
+ gr.LineTo (r.Right - l1, r.Top + 2.5);
+ gr.ClosePath ();
+
+ if (ClipToClientRect) //clip to client zone
+ gr.ClipPreserve ();
+
+ Background.SetAsSource (gr);
+ gr.FillPreserve ();
+
+ gr.LineWidth = 1.0;
+ Foreground.SetAsSource (gr);
+ gr.Stroke ();
+ }
+ }
+}
+
<OutputType>Exe</OutputType>
<RootNamespace>Tests</RootNamespace>
<AssemblyName>Tests</AssemblyName>
- <StartupObject>Tests.Showcase</StartupObject>
+ <StartupObject>Tests.BasicTests</StartupObject>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ReleaseVersion>0.7</ReleaseVersion>
+ <ReleaseVersion>0.5</ReleaseVersion>
<OutputPath>$(SolutionDir)build/$(Configuration)</OutputPath>
<IntermediateOutputPath>$(SolutionDir)build/obj/$(Configuration)</IntermediateOutputPath>
<CustomCommands>
<Compile Include="Tutorials\T4_Gauge.cs" />
<Compile Include="Tutorials\T2_IML.cs" />
<Compile Include="GraphicObjects\HexaContainer.cs" />
+ <Compile Include="GraphicObjects\TechBorder.cs" />
</ItemGroup>
<ItemGroup>
<None Include="image\u.svg">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="Interfaces\Container\0.crow">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </None>
- <None Include="Interfaces\Container\1.crow">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
+ <None Include="Interfaces\Container\1.crow" />
<None Include="Interfaces\Container\2.crow">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
else
il.Emit (OpCodes.Ldc_I4_0);
break;
- // case TypeCode.Empty:
- // break;
- // case TypeCode.Object:
- // break;
- // case TypeCode.DBNull:
- // break;
- // case TypeCode.SByte:
- // break;
- // case TypeCode.Decimal:
- // break;
- // case TypeCode.DateTime:
- // break;
+// case TypeCode.Empty:
+// break;
+// case TypeCode.Object:
+// break;
+// case TypeCode.DBNull:
+// break;
+// case TypeCode.SByte:
+// break;
+// case TypeCode.Decimal:
+// break;
+// case TypeCode.DateTime:
+// break;
case TypeCode.Char:
il.Emit (OpCodes.Ldc_I4, Convert.ToChar (val));
break;
iTemp = ItemTemplates ["default"];
}
- //lock (CurrentInterface.LayoutMutex) {
+ lock (CurrentInterface.LayoutMutex) {
g = iTemp.CreateInstance(CurrentInterface);
page.AddChild (g);
// if (isPaged)
g.LogicalParent = this;
g.MouseDown += itemClick;
- //}
+ }
if (iTemp.Expand != null && g is Expandable) {
(g as Expandable).Expand += iTemp.Expand;
public void ShowContextMenu (GraphicObject go) {
- if (ctxMenuContainer.Parent == null)
- this.AddWidget (ctxMenuContainer);
- else
- ctxMenuContainer.IsOpened = true;
+ lock (UpdateMutex) {
+ if (ctxMenuContainer.Parent == null)
+ this.AddWidget (ctxMenuContainer);
+ else
+ ctxMenuContainer.IsOpened = true;
- ctxMenuContainer.isPopup = true;
- ctxMenuContainer.LogicalParent = go;
- ctxMenuContainer.DataSource = go;
+ ctxMenuContainer.isPopup = true;
+ ctxMenuContainer.LogicalParent = go;
+ ctxMenuContainer.DataSource = go;
- PutOnTop (ctxMenuContainer, true);
+ PutOnTop (ctxMenuContainer, true);
+ }
ctxMenuContainer.Left = Mouse.X - 5;
ctxMenuContainer.Top = Mouse.Y - 5;