Trying to report error to Sharepoint ToolPane

1
2
3
4
5
6
/// <summary>
/// A custom editor part for picking data fields for a table web part
/// </summary>
class CustomEditorPart:EditorPart
{
#region Declarations
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
// In addition to other controls, etc, declare an error variable

string _errorText = string.Empty;

#endregion Declarations

#region Apply Changes

/// <summary>
/// Applies the changes to the web part properties
/// </summary>
/// <returns></returns>
public override bool ApplyChanges()
{
try
{

// You code goes here

return true;
}
catch (Exception ex)
{
_errorText = ex.Message;
return false;
}
}

#endregion Apply Changes

#region Rendering (Error Text)

/// <summary>
/// Update the error text if needed
/// </summary>
/// <param name="e"></param>
protected override void OnPreRender(EventArgs e)
{
if (_errorText != string.Empty)
{
this.Zone.ErrorText += Environment.NewLine + _errorText;
}

base.OnPreRender(e);
}
1
2
#endregion Rendering (Error Text)
}

来源: http://goo.gl/IbOo

Cloud left, sunshine coming

来丹麦后, 第一次看到太阳
来丹麦后, 每天晚上下雨, 白天多云. 同事开玩笑说, 因为他来到了这里, 所以没有了太阳. 等他回去太阳就出来了. 昨天晚上九点, 这个同事登上回家的飞机. 今天下午两点到北京. 于是今天太阳如约而至. 这个笑话并不好笑, 只是这个同事名叫Cloud.
PS: 猜猜闯入镜头的这个美女是谁?

午(餐)后的阳光
手机像素太低, 只能是这样了. 明天带着相机出门.

java api 的帮助文档

Sun 公司提供的Java API Docs是学习和使用Java语言中最经常使用的参考资料之一。但是长期以来此文档只有英文版,对于中国地区的Java开发者来说相当的不便。目前Sun 公司正在组织多方力量将此文档翻译成中文,并于2005年10月31日在Sun 中国技术社区(http://gceclub.sun.com.cn)正式发布第一批中文版Java API文档(包括java.lang和java.util类库API 文档的中文版)。经过将近10个月的努力,目前我们已经将Java SE 5.0的全部API文档中文化。开发人员可以通过Sun 中国技术社区的网站在线浏览相关文档,也可以将全部文档下载到本地以方便检索和使用。
J2SE DK & API下载
————————-
http://java.sun.com/j2se/1.3/download.html
http://java.sun.com/j2se/1.4.2/download.html
http://java.sun.com/javase/downloads/index_jdk5.jsp
http://java.sun.com/javase/downloads/index.jsp

J2EE DK & API下载
————————-
http://java.sun.com/j2ee/1.3/index.jsp
http://java.sun.com/j2ee/1.3/download.html
http://java.sun.com/j2ee/1.4/index.jsp
http://java.sun.com/j2ee/1.4/download.html
http://java.sun.com/javaee/downloads/index.jsp

JDK1.6API中文版(全)
————————-
* HTML 格式(在线英文) http://java.sun.com/javase/6/docs/
* HTML 格式(在线中文) http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/publish/1.6.0/html/zh_CN/api/index.html
* zip 格式(中文) http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/publish/1.6.0/html_zh_CN.zip
* CHM 格式(中文)  http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/publish/1.6.0/chm/JDK_API_1_6_zh_CN.CHM

JDK1.5API中文版(全)
————————-
* HTML 格式(在线英文) http://java.sun.com/javase/5/docs/
* HTML 格式(在线中文)  http://gceclub.sun.com.cn/Java_Docs/html/zh_CN/api/index.html
* zip 格式(中文) http://gceclub.sun.com.cn/Java_Docs/html_zh_CN.zip
* CHM 格式(中文) http://download.java.net/jdk/jdk-api-localizations/jdk-api-zh-cn/builds/JDK_API_1_5_zh_CN.CHM

相关网站
————————-
http://java.sun.com
http://gceclub.sun.com.cn/
http://developers.sun.com/downloads/
http://java.sun.com/javaee/downloads/
http://java.sun.com/javase/downloads/
http://www.netbeans.info/downloads/

来源: http://www.52fad.com.cn/viewthread.php?tid=1518