Fixed XmlEditor unit tests (Form.Show(owner) throws an exception when called in a non-interactive windows service, but Form.Show() works) git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@3490 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61shortcuts
Before Width: | Height: | Size: 5.7 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 218 B After Width: | Height: | Size: 218 B |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 6.7 KiB After Width: | Height: | Size: 6.7 KiB |
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 193 B |
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 9.9 KiB |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 67 B After Width: | Height: | Size: 67 B |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 44 B After Width: | Height: | Size: 44 B |
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 43 B After Width: | Height: | Size: 43 B |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 97 B After Width: | Height: | Size: 97 B |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
Before Width: | Height: | Size: 352 B After Width: | Height: | Size: 352 B |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 5.3 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 201 B After Width: | Height: | Size: 201 B |
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 5.7 KiB |
After Width: | Height: | Size: 218 B |
After Width: | Height: | Size: 6.9 KiB |
@ -1,671 +0,0 @@
@@ -1,671 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.IO; |
||||
using System.Text; |
||||
using System.Windows.Forms; |
||||
using System.Xml; |
||||
using System.Xml.Xsl; |
||||
|
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
|
||||
namespace ICSharpCode.StartPage |
||||
{ |
||||
public enum ColorScheme |
||||
{ |
||||
blue, |
||||
red, |
||||
green, |
||||
brown, |
||||
orange |
||||
} |
||||
|
||||
public class MenuItem |
||||
{ |
||||
public string Caption, URL; |
||||
|
||||
public MenuItem(string strCaption, string strUrl) |
||||
{ |
||||
Caption = strCaption; |
||||
URL = strUrl; |
||||
} |
||||
} |
||||
|
||||
public class ICSharpCodePage |
||||
{ |
||||
ColorScheme _ColorScheme; |
||||
|
||||
string startPageLocation; |
||||
|
||||
string m_strMainColColor, m_strSubColColor; |
||||
int m_nLeftTopImageWidth, m_nRightTopImageWidth; |
||||
bool m_bShowMilestoneContentImage; |
||||
|
||||
private int nTotalColumns = 0; |
||||
|
||||
string m_strTitle, m_strMetaDescription, m_strMetaKeywords, m_strMetaAuthor, m_strMetaCopyright; |
||||
string m_strStaticStyleSheet, m_strRightBoxHtml; |
||||
|
||||
bool m_bShowLeftMenu, m_bShowRightBox, m_bShowContentBar; |
||||
string m_strContentBarText, m_strTopMenuSelectedItem, m_strLeftMenuSelectedItem; |
||||
string m_strVersionText, m_strVersionStatus; |
||||
|
||||
public string PrimaryColor |
||||
{ |
||||
get { return m_strMainColColor; } |
||||
} |
||||
|
||||
public string SecondaryColor |
||||
{ |
||||
get { return m_strSubColColor; } |
||||
} |
||||
|
||||
public string Title |
||||
{ |
||||
get { return m_strTitle; } |
||||
set { m_strTitle = value; } |
||||
} |
||||
|
||||
public bool ShowMilestoneContentImage |
||||
{ |
||||
get { return m_bShowMilestoneContentImage; } |
||||
set { m_bShowMilestoneContentImage = value; } |
||||
} |
||||
|
||||
public string MetaDescription |
||||
{ |
||||
get { return m_strMetaDescription; } |
||||
set { m_strMetaDescription = value; } |
||||
} |
||||
|
||||
public string MetaKeywords |
||||
{ |
||||
get { return m_strMetaKeywords; } |
||||
set { m_strMetaKeywords = value; } |
||||
} |
||||
|
||||
public string MetaAuthor |
||||
{ |
||||
get { return m_strMetaAuthor; } |
||||
set { m_strMetaAuthor = value; } |
||||
} |
||||
|
||||
public string MetaCopyright |
||||
{ |
||||
get { return m_strMetaCopyright; } |
||||
set { m_strMetaCopyright = value; } |
||||
} |
||||
|
||||
public string StaticStyleSheet |
||||
{ |
||||
get { return m_strStaticStyleSheet; } |
||||
set { m_strStaticStyleSheet = value; } |
||||
} |
||||
|
||||
public string ContentBarText |
||||
{ |
||||
get { return m_strContentBarText; } |
||||
set { m_strContentBarText = value; } |
||||
} |
||||
|
||||
public bool ShowLeftMenu |
||||
{ |
||||
get { return m_bShowLeftMenu; } |
||||
set { m_bShowLeftMenu = value; } |
||||
} |
||||
|
||||
public bool ShowRightBox |
||||
{ |
||||
get { return m_bShowRightBox; } |
||||
set { m_bShowRightBox = value; } |
||||
} |
||||
|
||||
public bool ShowContentBar |
||||
{ |
||||
get { return m_bShowContentBar; } |
||||
set { m_bShowContentBar = value; } |
||||
} |
||||
|
||||
private List<MenuItem> TopMenu; |
||||
private List<MenuItem> LeftMenu; |
||||
|
||||
public virtual void PopulateTopMenu() |
||||
{ |
||||
TopMenu.Add(new MenuItem(StringParser.Parse("${res:StartPage.StartMenu.Name}"), "startpage://Start")); |
||||
TopMenu.Add(new MenuItem(StringParser.Parse("${res:StartPage.ChangeLogMenu.Name}"), "startpage://ChangeLog")); |
||||
TopMenu.Add(new MenuItem(StringParser.Parse("${res:StartPage.AuthorsMenu.Name}"), "startpage://Authors")); |
||||
TopMenu.Add(new MenuItem(StringParser.Parse("${res:StartPage.HelpWantedMenu.Name}"), "startpage://HelpWanted")); |
||||
} |
||||
|
||||
public virtual void PopulateLeftMenu() |
||||
{ |
||||
} |
||||
|
||||
public string TopMenuSelectedItem |
||||
{ |
||||
get { return m_strTopMenuSelectedItem; } |
||||
set { m_strTopMenuSelectedItem = value; } |
||||
} |
||||
|
||||
public string LeftMenuSelectedItem |
||||
{ |
||||
get { return m_strLeftMenuSelectedItem; } |
||||
set { m_strLeftMenuSelectedItem = value; } |
||||
} |
||||
|
||||
public string VersionText |
||||
{ |
||||
get { return m_strVersionText; } |
||||
set { m_strVersionText = value; } |
||||
} |
||||
|
||||
public string VersionStatus |
||||
{ |
||||
get { return m_strVersionStatus; } |
||||
set { m_strVersionStatus = value; } |
||||
} |
||||
|
||||
public string RightBoxHtml |
||||
{ |
||||
get { return m_strRightBoxHtml; } |
||||
set { m_strRightBoxHtml = value; } |
||||
} |
||||
|
||||
public virtual void RenderRightBoxHtml(StringBuilder builder) |
||||
{ |
||||
builder.Append(m_strRightBoxHtml); |
||||
} |
||||
|
||||
public ICSharpCodePage() |
||||
{ |
||||
ColorScheme = ICSharpCode.StartPage.ColorScheme.blue; |
||||
|
||||
TopMenu = new List<MenuItem>(); |
||||
PopulateTopMenu(); |
||||
TopMenuSelectedItem = "Home"; |
||||
|
||||
LeftMenu = new List<MenuItem>(); |
||||
PopulateLeftMenu(); |
||||
LeftMenuSelectedItem = ""; |
||||
|
||||
VersionText = "version " + RevisionClass.FullVersion; |
||||
VersionStatus = ""; |
||||
|
||||
RightBoxHtml = ""; |
||||
|
||||
StaticStyleSheet = startPageLocation + "/Layout/default.css"; |
||||
MetaAuthor = "Christoph Wille - christophw@alphasierrapapa.com"; |
||||
MetaCopyright = "(c) 2001-2008 AlphaSierraPapa"; |
||||
|
||||
ShowLeftMenu = false; |
||||
ShowRightBox = false; |
||||
ShowContentBar = true; |
||||
} |
||||
|
||||
public ColorScheme ColorScheme |
||||
{ |
||||
get { return _ColorScheme; } |
||||
set |
||||
{ |
||||
_ColorScheme = value; |
||||
m_bShowMilestoneContentImage = false; |
||||
|
||||
switch (_ColorScheme) |
||||
{ |
||||
case ColorScheme.blue: |
||||
m_nLeftTopImageWidth = 292;//412;
|
||||
m_nRightTopImageWidth = 363; |
||||
m_strSubColColor = "#C2E0FB"; |
||||
m_strMainColColor = "#A8C6E3"; |
||||
m_bShowMilestoneContentImage = true; |
||||
break; |
||||
case ColorScheme.red: |
||||
m_nLeftTopImageWidth = 214;//334;
|
||||
m_nRightTopImageWidth = 438; |
||||
m_strSubColColor = "#a7a9ac"; |
||||
m_strMainColColor = "#d7797d"; |
||||
break; |
||||
case ColorScheme.brown: |
||||
m_nLeftTopImageWidth = 294;//415;
|
||||
m_nRightTopImageWidth = 359; |
||||
m_strSubColColor = "#EEE9E2"; |
||||
m_strMainColColor = "#D5D0C9"; |
||||
break; |
||||
case ColorScheme.green: |
||||
m_nLeftTopImageWidth = 259;//450;
|
||||
m_nRightTopImageWidth = 325; |
||||
m_strSubColColor = "#E7EDBB"; |
||||
m_strMainColColor = "#CED4A2"; |
||||
break; |
||||
case ColorScheme.orange: |
||||
m_nLeftTopImageWidth = 191;//311;
|
||||
m_nRightTopImageWidth = 460; |
||||
m_strSubColColor = "#F4D97B"; |
||||
m_strMainColColor = "#E7CD6F"; |
||||
break; |
||||
} |
||||
} |
||||
} |
||||
|
||||
public virtual void RenderHeaderSection(StringBuilder builder) |
||||
{ |
||||
//if (RightToLeftConverter.IsRightToLeft) {
|
||||
// builder.Append("<html dir=\"rtl\"><head><title>");
|
||||
//} else {
|
||||
builder.Append("<html><head><title>"); |
||||
//}
|
||||
builder.Append(Title); |
||||
builder.Append("</title>\r\n"); |
||||
builder.Append("<link rel='stylesheet' type='text/css' href='"); |
||||
|
||||
builder.Append(PropertyService.DataDirectory + Path.DirectorySeparatorChar + |
||||
"resources" + Path.DirectorySeparatorChar + |
||||
"startpage" + Path.DirectorySeparatorChar + |
||||
"Layout" + Path.DirectorySeparatorChar + |
||||
"default.css"); |
||||
builder.Append("'>\r\n"); |
||||
|
||||
|
||||
|
||||
|
||||
builder.Append("<META HTTP-EQUIV=\"content-type: text/html; charset= ISO-8859-1\">\r\n"); |
||||
builder.Append("<META NAME=\"robots\" CONTENT=\"FOLLOW,INDEX\">\r\n"); |
||||
builder.Append("<meta name=\"Author\" content=\""); |
||||
builder.Append(MetaAuthor); |
||||
builder.Append("\">\r\n<META NAME=\"copyright\" CONTENT=\""); |
||||
builder.Append(MetaCopyright); |
||||
builder.Append("\">\r\n<meta http-equiv=\"Description\" name=\"Description\" content=\""); |
||||
builder.Append(MetaDescription); |
||||
builder.Append("\">\r\n<meta http-equiv=\"Keywords\" name=\"Keywords\" content=\""); |
||||
builder.Append(MetaKeywords); |
||||
builder.Append("\">\r\n<link rel=\"stylesheet\" href=\""); |
||||
builder.Append(StaticStyleSheet); |
||||
builder.Append("\">\r\n</head>\r\n<body bgcolor=\"#ffffff\">\r\n"); |
||||
} |
||||
|
||||
public virtual void RenderPageEndSection(StringBuilder builder) |
||||
{ |
||||
builder.Append("</body>\r\n</html>\r\n"); |
||||
} |
||||
|
||||
public virtual void RenderPageTopSection(StringBuilder builder) |
||||
{ |
||||
builder.Append("<div class=\"balken\" style=\"position:absolute;left:0px;top:0px\">"); |
||||
builder.Append("<table border=0 cellspacing=0 cellpadding=0><TR>\r\n"); |
||||
builder.Append("<td height=72 background=\""+ startPageLocation +"/Layout/"); |
||||
builder.Append(Enum.GetName(typeof(ColorScheme), _ColorScheme)); |
||||
builder.Append("/balken_links.gif\"><img src=\"" + startPageLocation + "/Layout/Common/blind.gif\" width="); |
||||
builder.Append(m_nLeftTopImageWidth.ToString()); |
||||
builder.Append(" height=1></td>\r\n"); |
||||
builder.Append("<td width=\"100%\" background=\""+ startPageLocation + "/Layout/"); |
||||
builder.Append(Enum.GetName(typeof(ColorScheme), _ColorScheme)); |
||||
builder.Append("/balken_mitte.gif\"> </td>\r\n"); |
||||
builder.Append("<td background=\""+ startPageLocation + "/Layout/"); |
||||
builder.Append(Enum.GetName(typeof(ColorScheme), _ColorScheme)); |
||||
builder.Append("/balken_rechts.gif\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width="); |
||||
builder.Append(m_nRightTopImageWidth.ToString()); |
||||
builder.Append(" height=1></td>\r\n</TR></table>\r\n"); |
||||
builder.Append("<table border=0 cellspacing=0 cellpadding=0><tr>"); |
||||
builder.Append("<td width=\"100%\" height=24 align=left bgcolor=\"#DCDDDE\">"); |
||||
builder.Append("<table border=0 cellspacing=0 cellpadding=0 width=\"100%\"><tr>\r\n"); |
||||
builder.Append("<td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=15 height=1></td>\r\n"); |
||||
|
||||
int nTopMenuElements = TopMenu.Count; |
||||
foreach (MenuItem de in TopMenu) |
||||
{ |
||||
--nTopMenuElements; |
||||
|
||||
builder.Append("<td class=\"navi"); |
||||
if (0 == String.Compare(de.Caption, m_strTopMenuSelectedItem, true)) |
||||
{ |
||||
builder.Append("Activ\">"); |
||||
builder.Append(de.Caption); |
||||
builder.Append("</td>\r\n"); |
||||
} |
||||
else |
||||
{ |
||||
builder.Append("\"><a href=\""); |
||||
builder.Append(de.URL); |
||||
builder.Append("\">"); |
||||
builder.Append(de.Caption); |
||||
builder.Append("</a></td>\r\n"); |
||||
} |
||||
|
||||
if (0 != nTopMenuElements) |
||||
{ |
||||
builder.Append("<td width=13><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=5 height=1><img src=\""+ startPageLocation + "/Layout/Common/line_hor_black.gif\" width=1 height=15><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=5 height=1></td>\r\n"); |
||||
} |
||||
} |
||||
|
||||
builder.Append("</tr></table></td></tr></table></DIV>\r\n"); |
||||
} |
||||
|
||||
public virtual void RenderLeftMenu(StringBuilder builder) |
||||
{ |
||||
builder.Append("<td bgcolor=\"White\" valign=\"top\"><table border=0 cellspacing=0 cellpadding=0>"); |
||||
builder.Append("<tr><td width=20 heigth=10><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=20 height=10></td>"); |
||||
builder.Append("<td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=1></td>"); |
||||
builder.Append("</tr><tr><td colspan=2><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=4></td></tr>"); |
||||
|
||||
int nLeftMenuElements = LeftMenu.Count; |
||||
foreach (MenuItem de in LeftMenu) |
||||
{ |
||||
--nLeftMenuElements; |
||||
builder.Append("<tr>"); |
||||
|
||||
if (0 == String.Compare(de.Caption, m_strLeftMenuSelectedItem, true)) |
||||
{ |
||||
builder.Append("<td width=20><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=10 height=1><img src=\""+ startPageLocation + "/Layout/Common/dot_listing.gif\" width=8 height=8><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=2 height=1></td>\r\n"); |
||||
builder.Append("<td class=\"naviListDevelopActiv\">"); |
||||
builder.Append(de.Caption); |
||||
builder.Append("</td></tr>\r\n"); |
||||
} |
||||
else |
||||
{ |
||||
builder.Append("<td><img src=\""+ startPageLocation + "/Layout/Common/allgemein/blind.gif\" width=20 height=1></td>\r\n"); |
||||
builder.Append("<td class=\"naviListDevelop\"><a href=\""); |
||||
builder.Append(de.URL); |
||||
builder.Append("\">"); |
||||
builder.Append(de.Caption); |
||||
builder.Append("</a></td></tr>\r\n"); |
||||
} |
||||
|
||||
if (0 != nLeftMenuElements) |
||||
{ |
||||
builder.Append("<tr><td colspan=2><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=4></td></tr>\r\n"); |
||||
} |
||||
} |
||||
|
||||
builder.Append("</table></td>"); |
||||
builder.Append("<td width=1><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td>"); |
||||
} |
||||
|
||||
public virtual void RenderFirstPageBodySection(StringBuilder builder) |
||||
{ |
||||
builder.Append("<div class=\"text\" style=\"position:absolute;left:0px;top:120px\"><table width=\"100%\" border=0 cellspacing=0 cellpadding=0>\r\n"); |
||||
|
||||
if (ShowContentBar) |
||||
{ |
||||
nTotalColumns = 1; |
||||
builder.Append("<tr>"); |
||||
|
||||
if (ShowLeftMenu) |
||||
{ |
||||
builder.Append("<td height=43 bgcolor=\""); |
||||
builder.Append(m_strSubColColor); |
||||
builder.Append("\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=135 height=1></td>"); |
||||
builder.Append("<td width=1><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td>"); |
||||
nTotalColumns += 2; |
||||
} |
||||
|
||||
builder.Append("<td width=\"100%\" bgcolor=\""); |
||||
builder.Append(m_strMainColColor); |
||||
builder.Append("\" class=\"head\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=15 height=1>"); |
||||
builder.Append(ContentBarText); // TODO for virtual
|
||||
builder.Append("</td>\r\n"); |
||||
|
||||
if (ShowRightBox) |
||||
{ |
||||
builder.Append("<td width=1><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td>"); |
||||
if (ShowMilestoneContentImage) |
||||
{ |
||||
builder.Append("<td height=43 bgcolor=\""); |
||||
builder.Append(m_strSubColColor); |
||||
builder.Append("\"><img src=\""+ startPageLocation + "/Layout/Common/milestone_col_head.gif\" width=138 height=43></td>"); |
||||
} |
||||
else |
||||
{ |
||||
builder.Append("<td height=43 bgcolor=\""); |
||||
builder.Append(m_strSubColColor); |
||||
builder.Append("\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=138 height=43></td>"); |
||||
} |
||||
nTotalColumns += 2; |
||||
} |
||||
|
||||
builder.Append("</tr><tr><td colspan="); |
||||
builder.Append(nTotalColumns.ToString()); |
||||
builder.Append("><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td></tr>"); |
||||
} |
||||
|
||||
builder.Append("<tr>"); |
||||
if (ShowLeftMenu) |
||||
{ |
||||
RenderLeftMenu(builder); |
||||
} |
||||
|
||||
builder.Append("<td bgcolor=\"#d6d7d8\" valign=\"top\" height=270><table width=\"100%\" border=0 cellspacing=0 cellpadding=0>\r\n"); |
||||
builder.Append("<tr><td width=15><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=15 height=15></td>"); |
||||
builder.Append("<td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=1></td>"); |
||||
builder.Append("<td width=15><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=15 height=1></td>"); |
||||
builder.Append("</tr><tr><td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=1></td>"); |
||||
builder.Append("<td class=\"copy\">\r\n"); |
||||
|
||||
|
||||
} |
||||
|
||||
public virtual void RenderFinalPageBodySection(StringBuilder builder) |
||||
{ |
||||
builder.Append("</td><td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=1></td></tr></table></td>\r\n"); |
||||
if (ShowRightBox) |
||||
{ |
||||
RenderRightBox(builder); |
||||
} |
||||
|
||||
builder.Append("</tr><tr><td colspan="); |
||||
builder.Append(nTotalColumns.ToString()); |
||||
builder.Append("><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td></tr><tr>\r\n"); |
||||
|
||||
string strSubColor2Use = "#ffffff"; |
||||
if (ShowLeftMenu) |
||||
{ |
||||
builder.Append("<td height=20 bgcolor=\""); |
||||
builder.Append(strSubColor2Use); |
||||
builder.Append("\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=135 height=1></td>"); |
||||
builder.Append("<td width=1><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td>\r\n"); |
||||
} |
||||
|
||||
builder.Append( "<td width=\"100%\" bgcolor=\""); |
||||
builder.Append(m_strMainColColor); |
||||
builder.Append("\" class=\"copy\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=15 height=1>"); |
||||
builder.Append("<font size=\"-2\">"); |
||||
builder.Append("Copyright ©2000-2008 <A HREF=\"mailto:webmaster@icsharpcode.net\" title=\""); |
||||
builder.Append(StringParser.Parse("${res:StartPage.ContactUs}")); |
||||
builder.Append("\">IC#SharpCode</a>. "); |
||||
builder.Append(ICSharpCode.SharpDevelop.Gui.AboutSharpDevelopTabPage.LicenseSentence); |
||||
builder.Append("</font></td>\r\n"); |
||||
|
||||
if (ShowRightBox) |
||||
{ |
||||
builder.Append("<td width=1><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td>"); |
||||
builder.Append("<td height=20 bgcolor=\""); |
||||
builder.Append(strSubColor2Use); |
||||
builder.Append("\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=138 height=20></td>\r\n"); |
||||
} |
||||
builder.Append("</tr><tr><td colspan="); |
||||
builder.Append(nTotalColumns.ToString()); |
||||
builder.Append("><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td></tr>\r\n"); |
||||
builder.Append("</table></div>\r\n"); |
||||
} |
||||
|
||||
public virtual void RenderRightBox(StringBuilder builder) |
||||
{ |
||||
builder.Append("<td width=1><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td>\r\n"); |
||||
builder.Append("<td valign=\"top\"><table border=0 cellspacing=0 cellpadding=0><tr>"); |
||||
builder.Append("<td valign=\"top\" background=\""+ startPageLocation + "/Layout/Common/klinker_milestone.gif\" width=138 height=113>"); |
||||
builder.Append("<table border=0 cellspacing=0 cellpadding=0><tr><td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=3></td></tr>"); |
||||
builder.Append("<tr><td class=\"milestoneText\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=10 height=1>"); |
||||
builder.Append(VersionText); |
||||
builder.Append("</td></tr>"); |
||||
builder.Append("<tr><td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=52></td></tr>"); |
||||
builder.Append("<tr><td class=\"milestoneText\"><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=75 height=1><font size=\"+2\">"); |
||||
builder.Append(VersionStatus); |
||||
builder.Append("</font></td></tr>"); |
||||
builder.Append("</table></td></tr>"); |
||||
builder.Append("<tr><td width=1><img src=\""+ startPageLocation + "/Layout/Common/pixel_weiss.gif\" width=1 height=1></td></tr>"); |
||||
builder.Append("<tr><td bgcolor=\"#d6d7d8\" valign=\"top\" height=49><table border=0 cellspacing=0 cellpadding=0>"); |
||||
builder.Append("<tr><td width=10><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=5></td>"); |
||||
builder.Append("<td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=1 height=1></td></tr><tr>"); |
||||
builder.Append("<td><img src=\""+ startPageLocation + "/Layout/Common/blind.gif\" width=10 height=1></td><td class=\"copyUnderlineBig\">"); |
||||
RenderRightBoxHtml(builder); |
||||
builder.Append("</td>"); |
||||
builder.Append("</tr></table></td></tr></table></td>"); |
||||
} |
||||
|
||||
internal string[] projectFiles; |
||||
|
||||
public void RenderSectionStartBody(StringBuilder builder) |
||||
{ |
||||
StringBuilder projectSection = builder; |
||||
projectSection.Append("<DIV class='tablediv'><TABLE CLASS='dtTABLE' CELLSPACING='0'>\n"); |
||||
projectSection.Append(String.Format("<TR><TH>{0}</TH><TH>{1}</TH><TH>{2}</TH></TR>\n", |
||||
StringParser.Parse("${res:Global.Name}"), |
||||
StringParser.Parse("${res:StartPage.StartMenu.ModifiedTable}"), |
||||
StringParser.Parse("${res:StartPage.StartMenu.LocationTable}") |
||||
)); |
||||
|
||||
try { |
||||
// Get the recent projects
|
||||
projectFiles = new string[FileService.RecentOpen.RecentProject.Count]; |
||||
for (int i = 0; i < FileService.RecentOpen.RecentProject.Count; ++i) { |
||||
string fileName = FileService.RecentOpen.RecentProject[i].ToString(); |
||||
// if the file does not exist, goto next one
|
||||
if (!System.IO.File.Exists(fileName)) { |
||||
continue; |
||||
} |
||||
projectFiles[i] = fileName; |
||||
projectSection.Append("<TR><TD>"); |
||||
projectSection.Append("<a href=\"startpage://project/" + i + "\">"); |
||||
projectSection.Append(Path.GetFileNameWithoutExtension(fileName)); |
||||
projectSection.Append("</A>"); |
||||
projectSection.Append("</TD><TD>"); |
||||
System.IO.FileInfo fInfo = new System.IO.FileInfo(fileName); |
||||
projectSection.Append(fInfo.LastWriteTime.ToShortDateString()); |
||||
projectSection.Append("</TD><TD>"); |
||||
projectSection.Append(fileName); |
||||
projectSection.Append("</TD></TR>\n"); |
||||
} |
||||
} catch {} |
||||
projectSection.Append("</TABLE></DIV><BR/><BR/>"); |
||||
projectSection.Append(String.Format("<button id=\"opencombine\">{0}</button>\n", |
||||
StringParser.Parse("${res:StartPage.StartMenu.OpenCombineButton}") |
||||
)); |
||||
projectSection.Append(String.Format("<button id=\"newcombine\">{0}</button>\n", |
||||
StringParser.Parse("${res:StartPage.StartMenu.NewCombineButton}") |
||||
)); |
||||
projectSection.Append("<BR/><BR/><BR/>"); |
||||
} |
||||
|
||||
public void RenderSectionAuthorBody(StringBuilder builder) |
||||
{ |
||||
try { |
||||
builder.Append("<iframe name=\"iframe\" src=\"http://wiki.sharpdevelop.net/Contributors.ashx\" width=\"100%\" height=\"1400\" />"); |
||||
//
|
||||
//
|
||||
//
|
||||
// string html = ConvertXml.ConvertToString(Application.StartupPath +
|
||||
// Path.DirectorySeparatorChar + ".." +
|
||||
// Path.DirectorySeparatorChar + "doc" +
|
||||
// Path.DirectorySeparatorChar + "AUTHORS.xml",
|
||||
//
|
||||
// PropertyService.DataDirectory +
|
||||
// Path.DirectorySeparatorChar + "ConversionStyleSheets" +
|
||||
// Path.DirectorySeparatorChar + "ShowAuthors.xsl");
|
||||
// builder.Append(html);
|
||||
} catch (Exception e) { |
||||
MessageBox.Show(e.ToString()); |
||||
} |
||||
} |
||||
|
||||
static string changeLogHtml; |
||||
|
||||
public void RenderSectionChangeLogBody(StringBuilder builder) |
||||
{ |
||||
try { |
||||
if (changeLogHtml == null) { |
||||
XslCompiledTransform transform = new XslCompiledTransform(); |
||||
transform.Load(Path.Combine(PropertyService.DataDirectory, "ConversionStyleSheets/ShowChangeLog.xsl")); |
||||
StringWriter writer = new StringWriter(); |
||||
XmlTextWriter xmlWriter = new XmlTextWriter(writer); |
||||
xmlWriter.Formatting = Formatting.None; |
||||
transform.Transform(Path.Combine(FileUtility.ApplicationRootPath, "doc/ChangeLog.xml"), xmlWriter); |
||||
changeLogHtml = writer.ToString().Replace("\n", "\n<br>"); |
||||
} |
||||
builder.Append(changeLogHtml); |
||||
} catch (Exception e) { |
||||
MessageBox.Show(e.ToString()); |
||||
} |
||||
} |
||||
|
||||
public void RenderSectionHelpWantedBody(StringBuilder builder) |
||||
{ |
||||
try { |
||||
builder.Append("<iframe name=\"iframe\" src=\"http://wiki.sharpdevelop.net/FeaturesWeSolicitHelpFor.ashx\" width=\"100%\" height=\"1000\" />"); |
||||
//
|
||||
// string html = ConvertXml.ConvertToString(Application.StartupPath +
|
||||
// Path.DirectorySeparatorChar + ".." +
|
||||
// Path.DirectorySeparatorChar + "doc" +
|
||||
// Path.DirectorySeparatorChar + "HowYouCanHelp.xml",
|
||||
//
|
||||
// Application.StartupPath +
|
||||
// Path.DirectorySeparatorChar + ".." +
|
||||
// Path.DirectorySeparatorChar + "data" +
|
||||
// Path.DirectorySeparatorChar + "ConversionStyleSheets" +
|
||||
// Path.DirectorySeparatorChar + "ShowHowYouCanHelp.xsl");
|
||||
// builder.Append(html);
|
||||
} catch (Exception e) { |
||||
MessageBox.Show(e.ToString()); |
||||
} |
||||
} |
||||
|
||||
public string Render(string section) |
||||
{ |
||||
startPageLocation = FileUtility.Combine(Application.StartupPath, "..", "data", "resources", "startpage"); |
||||
switch (section.ToLowerInvariant()) { |
||||
case "start": |
||||
ContentBarText = StringParser.Parse("${res:StartPage.StartMenu.BarNameName}"); |
||||
break; |
||||
case "changelog": |
||||
ContentBarText = StringParser.Parse("${res:StartPage.ChangeLogMenu.BarNameName}"); |
||||
break; |
||||
case "authors": |
||||
ContentBarText = StringParser.Parse("${res:StartPage.AuthorsMenu.BarNameName}"); |
||||
break; |
||||
case "helpwanted": |
||||
ContentBarText = StringParser.Parse("${res:StartPage.HelpWantedMenu.BarNameName}"); |
||||
break; |
||||
} |
||||
|
||||
StringBuilder builder = new StringBuilder(2048); |
||||
RenderHeaderSection(builder); |
||||
RenderPageTopSection(builder); |
||||
RenderFirstPageBodySection(builder); |
||||
|
||||
switch (section.ToLowerInvariant()) { |
||||
case "start": |
||||
RenderSectionStartBody(builder); |
||||
break; |
||||
case "changelog": |
||||
RenderSectionChangeLogBody(builder); |
||||
break; |
||||
case "authors": |
||||
RenderSectionAuthorBody(builder); |
||||
break; |
||||
case "helpwanted": |
||||
RenderSectionHelpWantedBody(builder); |
||||
break; |
||||
} |
||||
|
||||
RenderFinalPageBodySection(builder); |
||||
RenderPageEndSection(builder); |
||||
|
||||
return builder.ToString(); |
||||
} |
||||
} |
||||
} |
@ -1,52 +0,0 @@
@@ -1,52 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
// project created on 16.07.2002 at 18:07
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.BrowserDisplayBinding; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.StartPage |
||||
{ |
||||
public class ShowStartPageCommand : AbstractMenuCommand |
||||
{ |
||||
static bool isFirstStartPage = true; |
||||
|
||||
public override void Run() |
||||
{ |
||||
if (isFirstStartPage) { |
||||
isFirstStartPage = false; |
||||
ProjectService.SolutionLoaded += delegate { |
||||
// close all start pages when loading a solution
|
||||
foreach (IViewContent v in WorkbenchSingleton.Workbench.ViewContentCollection.ToArray()) { |
||||
BrowserPane b = v as BrowserPane; |
||||
if (b != null) { |
||||
if (b.Url.Scheme == "startpage") { |
||||
b.WorkbenchWindow.CloseWindow(true); |
||||
} |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
|
||||
foreach (IViewContent view in WorkbenchSingleton.Workbench.ViewContentCollection) { |
||||
BrowserPane b = view as BrowserPane; |
||||
if (b != null) { |
||||
if (b.Url.Scheme == "startpage") { |
||||
view.WorkbenchWindow.SelectWindow(); |
||||
return; |
||||
} |
||||
} |
||||
} |
||||
WorkbenchSingleton.Workbench.ShowView(new BrowserPane(new Uri("startpage://start/"))); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Linq; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.StartPage |
||||
{ |
||||
public class ShowStartPageCommand : AbstractMenuCommand |
||||
{ |
||||
static ShowStartPageCommand() |
||||
{ |
||||
ProjectService.SolutionLoaded += delegate { |
||||
// close all start pages when loading a solution
|
||||
foreach (IViewContent v in WorkbenchSingleton.Workbench.ViewContentCollection.ToArray()) { |
||||
if (v is StartPageViewContent) { |
||||
v.WorkbenchWindow.CloseWindow(true); |
||||
} |
||||
} |
||||
}; |
||||
} |
||||
|
||||
public override void Run() |
||||
{ |
||||
foreach (IViewContent view in WorkbenchSingleton.Workbench.ViewContentCollection) { |
||||
if (view is StartPageViewContent) { |
||||
view.WorkbenchWindow.SelectWindow(); |
||||
return; |
||||
} |
||||
} |
||||
WorkbenchSingleton.Workbench.ShowView(new StartPageViewContent()); |
||||
} |
||||
} |
||||
} |
@ -1,88 +0,0 @@
@@ -1,88 +0,0 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald" email="daniel@danielgrunwald.de"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using ICSharpCode.SharpDevelop; |
||||
using System; |
||||
using System.Windows.Forms; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.BrowserDisplayBinding; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.StartPage |
||||
{ |
||||
public class StartPageScheme : DefaultSchemeExtension |
||||
{ |
||||
ICSharpCodePage page; |
||||
|
||||
public override void InterceptNavigate(HtmlViewPane pane, WebBrowserNavigatingEventArgs e) |
||||
{ |
||||
e.Cancel = true; |
||||
if (page == null) { |
||||
page = new ICSharpCodePage(); |
||||
page.Title = ICSharpCode.Core.StringParser.Parse("${res:StartPage.StartPageContentName}"); |
||||
} |
||||
string host = e.Url.Host; |
||||
if (host == "project") { |
||||
string projectFile = page.projectFiles[int.Parse(e.Url.LocalPath.Trim('/'))]; |
||||
FileUtility.ObservedLoad(new NamedFileOperationDelegate(ProjectService.LoadSolution), projectFile); |
||||
} else { |
||||
pane.WebBrowser.DocumentText = page.Render(host); |
||||
} |
||||
} |
||||
|
||||
public override void DocumentCompleted(HtmlViewPane pane, WebBrowserDocumentCompletedEventArgs e) |
||||
{ |
||||
HtmlElement btn; |
||||
btn = pane.WebBrowser.Document.GetElementById("opencombine"); |
||||
if (btn != null) { |
||||
LoggingService.Debug("Attached event handler to opencombine button"); |
||||
btn.Click += delegate {new ICSharpCode.SharpDevelop.Project.Commands.LoadSolution().Run();}; |
||||
} |
||||
btn = pane.WebBrowser.Document.GetElementById("newcombine"); |
||||
if (btn != null) { |
||||
btn.Click += delegate {new ICSharpCode.SharpDevelop.Project.Commands.CreateNewSolution().Run();}; |
||||
} |
||||
|
||||
pane.WebBrowser.Navigating += pane_WebBrowser_Navigating; |
||||
pane.WebBrowser.Navigated += pane_WebBrowser_Navigated; |
||||
} |
||||
|
||||
void pane_WebBrowser_Navigated(object sender, WebBrowserNavigatedEventArgs e) |
||||
{ |
||||
try { |
||||
WebBrowser webBrowser = (WebBrowser)sender; |
||||
webBrowser.Navigating -= pane_WebBrowser_Navigating; |
||||
webBrowser.Navigated -= pane_WebBrowser_Navigated; |
||||
} catch (Exception ex) { |
||||
MessageService.ShowError(ex); |
||||
} |
||||
} |
||||
|
||||
void pane_WebBrowser_Navigating(object sender, WebBrowserNavigatingEventArgs e) |
||||
{ |
||||
try { |
||||
if (e.Url.IsFile) { |
||||
e.Cancel = true; |
||||
string file = e.Url.LocalPath; |
||||
IProjectLoader loader = ProjectService.GetProjectLoader(file); |
||||
if (loader != null) { |
||||
FileUtility.ObservedLoad(new NamedFileOperationDelegate(loader.Load), file); |
||||
} else { |
||||
FileService.OpenFile(file); |
||||
} |
||||
} |
||||
} catch (Exception ex) { |
||||
MessageService.ShowError(ex); |
||||
} |
||||
} |
||||
|
||||
public override void GoHome(HtmlViewPane pane) |
||||
{ |
||||
pane.Navigate("startpage://start/"); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,69 @@
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<UserControl |
||||
x:Class="ICSharpCode.StartPage.StartPageControl" |
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
||||
xmlns:gui="clr-namespace:ICSharpCode.SharpDevelop.Gui;assembly=ICSharpCode.SharpDevelop" |
||||
xmlns:core="http://icsharpcode.net/sharpdevelop/core" |
||||
Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"> |
||||
<Grid> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition |
||||
Height="72" /> |
||||
<RowDefinition |
||||
Height="*" /> |
||||
<RowDefinition |
||||
Height="Auto" /> |
||||
</Grid.RowDefinitions> |
||||
<DockPanel |
||||
Grid.Row="0"> |
||||
<Image |
||||
MaxWidth="292" |
||||
DockPanel.Dock="Left" |
||||
Stretch="UniformToFill" |
||||
Source="../Resources/balken_links.gif" /> |
||||
<Image |
||||
MaxWidth="363" |
||||
DockPanel.Dock="Right" |
||||
Stretch="UniformToFill" |
||||
Source="../Resources/balken_rechts.gif" /> |
||||
<Image |
||||
Stretch="Fill" |
||||
Source="../Resources/balken_mitte.gif" /> |
||||
</DockPanel> |
||||
<DockPanel Grid.Row="1" VerticalAlignment="Top"> |
||||
<Border DockPanel.Dock="Top" Background="#A8C6E3" Margin="4,20,4,0" CornerRadius="15,15,0,0" Padding="15,0,15,0"> |
||||
<TextBlock Text="{core:Localize StartPage.StartMenu.BarNameName}" |
||||
FontSize="11pt" |
||||
FontWeight="Bold" |
||||
Foreground="White" |
||||
Margin="0,0,0,2"/> |
||||
</Border> |
||||
<Border Background="#DCDDDE" Margin="4,0,4,4" CornerRadius="0,0,15,15"> |
||||
<StackPanel Orientation="Vertical" Margin="15"> |
||||
<ListView Name="lastProjectsListView" SelectionMode="Single" MouseDoubleClick="lastProjectsDoubleClick"> |
||||
<ListView.View> |
||||
<GridView> |
||||
<GridViewColumn DisplayMemberBinding="{Binding Path=Name}" |
||||
Header="{core:Localize Global.Name}" /> |
||||
<GridViewColumn DisplayMemberBinding="{Binding Path=LastModification}" |
||||
Header="{core:Localize StartPage.StartMenu.ModifiedTable}" /> |
||||
<GridViewColumn DisplayMemberBinding="{Binding Path=Path}" |
||||
Header="{core:Localize StartPage.StartMenu.LocationTable}" /> |
||||
</GridView> |
||||
</ListView.View> |
||||
</ListView> |
||||
<StackPanel Orientation="Horizontal" Margin="0,20,0,0"> |
||||
<Button Content="{core:Localize StartPage.StartMenu.OpenCombineButton}" Click="openSolutionClick"/> |
||||
<Button Content="{core:Localize StartPage.StartMenu.NewCombineButton}" Click="newSolutionClick" Margin="8,0,0,0"/> |
||||
</StackPanel> |
||||
</StackPanel> |
||||
</Border> |
||||
</DockPanel> |
||||
<TextBlock Background="#A8C6E3" Grid.Row="2" Padding="4,0,4,0"> |
||||
Copyright ©2000-2008 |
||||
<Hyperlink NavigateUri="mailto:webmaster@icsharpcode.net">IC#SharpCode</Hyperlink> |
||||
<Run Text="{x:Static gui:AboutSharpDevelopTabPage.LicenseSentence}"/> |
||||
</TextBlock> |
||||
</Grid> |
||||
</UserControl> |
@ -0,0 +1,73 @@
@@ -0,0 +1,73 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <owner name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.IO; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
|
||||
using ICSharpCode.SharpDevelop; |
||||
using ICSharpCode.SharpDevelop.Project; |
||||
|
||||
namespace ICSharpCode.StartPage |
||||
{ |
||||
/// <summary>
|
||||
/// Interaction logic for StartPageControl.xaml
|
||||
/// </summary>
|
||||
public partial class StartPageControl : UserControl |
||||
{ |
||||
public StartPageControl() |
||||
{ |
||||
InitializeComponent(); |
||||
|
||||
BuildRecentProjectList(); |
||||
} |
||||
|
||||
void BuildRecentProjectList() |
||||
{ |
||||
List<RecentOpenItem> items = new List<RecentOpenItem>(); |
||||
foreach (string path in FileService.RecentOpen.RecentProject) { |
||||
FileInfo file = new FileInfo(path); |
||||
if (file.Exists) { |
||||
items.Add( |
||||
new RecentOpenItem { |
||||
Name = System.IO.Path.GetFileNameWithoutExtension(path), |
||||
LastModification = file.LastWriteTime.ToShortDateString(), |
||||
Path = path |
||||
}); |
||||
} |
||||
} |
||||
lastProjectsListView.ItemsSource = items; |
||||
} |
||||
|
||||
class RecentOpenItem |
||||
{ |
||||
public string Name { get; set; } |
||||
public string LastModification { get; set; } |
||||
public string Path { get; set; } |
||||
} |
||||
|
||||
void lastProjectsDoubleClick(object sender, RoutedEventArgs e) |
||||
{ |
||||
RecentOpenItem item = (RecentOpenItem)lastProjectsListView.SelectedItem; |
||||
if (item != null) { |
||||
ProjectService.LoadSolutionOrProject(item.Path); |
||||
} |
||||
} |
||||
|
||||
void openSolutionClick(object sender, RoutedEventArgs e) |
||||
{ |
||||
new ICSharpCode.SharpDevelop.Project.Commands.LoadSolution().Run(); |
||||
} |
||||
|
||||
void newSolutionClick(object sender, RoutedEventArgs e) |
||||
{ |
||||
new ICSharpCode.SharpDevelop.Project.Commands.CreateNewSolution().Run(); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,29 @@
@@ -0,0 +1,29 @@
|
||||
// <file>
|
||||
// <copyright see="prj:///doc/copyright.txt"/>
|
||||
// <license see="prj:///doc/license.txt"/>
|
||||
// <author name="Daniel Grunwald"/>
|
||||
// <version>$Revision$</version>
|
||||
// </file>
|
||||
|
||||
using System; |
||||
using ICSharpCode.Core; |
||||
using ICSharpCode.SharpDevelop.Gui; |
||||
|
||||
namespace ICSharpCode.StartPage |
||||
{ |
||||
public class StartPageViewContent : AbstractViewContent |
||||
{ |
||||
StartPageControl content = new StartPageControl(); |
||||
|
||||
public override object Content { |
||||
get { |
||||
return content; |
||||
} |
||||
} |
||||
|
||||
public StartPageViewContent() |
||||
{ |
||||
this.TitleName = StringParser.Parse("${res:StartPage.StartPageContentName}"); |
||||
} |
||||
} |
||||
} |