blob: b0c192003de2d1c83df14d47e25915c92b229264 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Media.Imaging;
using Tango.SharedUI.Helpers;
namespace Tango.Scripting.IDE
{
public class Solution :ISolution
{
public ObservableCollection<IProject> Projects { get; set; }
public string Name { get; set; }
public string SolutionLocation { get; set; }
public string WorkingFolder => Path.GetDirectoryName(SolutionLocation);
public BitmapSource Image => ResourceHelper.GetImageFromResources("Images/NewFileCollection_16x.png");
public bool CanOpen => false;
public ObservableCollection<ISolutionItemCommand> Commands { get; set; }
public event EventHandler AddProjectEvent;
public Solution()
{
Name = "Solution";
Projects = new ObservableCollection<IProject>();
Commands = new ObservableCollection<ISolutionItemCommand>
{
new SolutionItemCommand(AddProject) { Name = "Add New Project..." }
};
}
/// <summary>
/// Adds Project Dialog.
/// </summary>
public void AddProject()
{
AddProjectEvent?.Invoke(this, new EventArgs());
}
}
}
|