2006年1月10日

如果你的Openwave 7.0显示是乱码?
按照以下设置进行试试


打开Openwave 7.0->

Settings -> Device Settings - > Font

将Back Fonts 换成 如
SIMYOU.TTF 

是幼园字体,可以改成你自己喜欢的字体.
PS:不要在里面打入[幼圆]这样..第一次可以正常启动..第二次就可以能启动失败了.

保存
Restart

Ok.

10:29 | 评论 (11)

2006年1月9日

有关于Openwave 4.1.1及6.2.2与VS2003的集成可以参考于

Integrating Openwave Simulators with Microsoft Visual Studio .NET

但如果按上面的方法将OpenWave 4.1.1集成至VS2005将产生如下错误.
点击放大[图1]
VS2005将会验证路径是否正确..所以不可以象在VS2003中直接添加
[图2]


[图3]

而在VS2005中添加Openwave 7.0,只是象Openwave 6.2.2一样只是添加

[图4]
发送到Openwave中的只是http://localhost/test/default.aspx而已.而这个命令会直接被 ignoring掉..
点击放大[图5]
而在路径中又无法直接添加 -go等额外的commands [象Openeave4.1.1一样添加"C:\Program Files\Openwave\V7 Simulator\bin\phone.exe" -go可以在View in Browser中正确显示..但是如果F5 start-debugging时会产生如图一的错误.. .ok..为了能够正确的开始dubugging。。开始下面的工作
新建一在C:\Program Files\Openwave\V7 Simulator\bin\新建一phone.bat文件..
@echo off
C:
CD C:\Program Files\Openwave\V7 Simulator\bin\
echo loading..
phone -go %1
exit


C:\及CD是为了phone.exe能正在确的workdir下. 使用修改为相对应的path.. 然在在添加C:\Program Files\Openwave\V7 Simulator\bin\phone.bat"至Browsers中 Now...Ok... 最少能让我的习惯舒服的F5一下...

17:10 | 评论 (2)

2005年12月30日

最近由于工作上的需要开发一Outlook Add-in,本来对VSTO一片空白到现在有初步的了解..所以把期间一些东西记录下来



最开始入门可以先看一下这个文章可以有个初步的了解


An Introduction to Programming Outlook 2003 Using C#
Hello Word Outlook Add-In using C#


打开Office2003的对象模型参考会非常有用.. D:\Program Files\Microsoft Office\OFFICE11\2052下 VBAOF11.CHM和VBAOL11.CHM的

http://www.outlookcode.com/是个非常不错的专业outlook开发站点. 当然而MSDN上更有大量的资料 Visual Studio 2005 Tools for Office Training: Outlook Hands-on Labs
Visual Studio 2005 Tools for Office Sample: Outlook Snippets
Visual Studio 2005 Tools for Office Sample: Outlook Samples
Introducing Outlook Add-in Support for Visual Studio 2005 Tools for Office
Creating an Outlook Task Add-in Solution with Visual Studio 2005 Tools for Office
Visual Studio Tools for the Microsoft Office System
其中的Sample建议一定下来看看


看完上面资料基础功能开上都会很轻松的解决.


注意一点的时候foreach时

foreach(Outlook.Attachment att in item.Attachments)

{

}

时并不能正确的返回..而要使用

foreach(object att in item.Attachments)

{

}

而使用.for时

则要

for (int i = 1; i <= item.Attachments.Count; i++)

如果 i = 0则会抛出IndexOutOfRangeException错误...这二点可以注意一下.

 

安装



但安装的时候注意一下Code Access Security,我就在上面花了不少时间

所以下面几篇文章是专门对Install时你可能产生的问题..无法正确加载组件的问题


VSTO Outlook: the Complete Setup Solution
Make VSTO for Outlook solutions run right off the MSI


下面是我修改后的代码.大家可以参考一下


using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Configuration.Install;

using System.Security.Policy;

using System.Security;

using System.Collections;

 

namespace TayeWorks.TEMP

{

    [RunInstaller(true)]

    public partial class Installer : System.Configuration.Install.Installer

    {

        public Installer()

        {

            InitializeComponent();

        }

 

 

        private string codeGroupName = "TayeWorks TEMP";

        private PolicyLevel _currentPolicyLevel = null;

        protected PolicyLevel CurrentPolicyLevel

        {

            get

            {

                if (_currentPolicyLevel == null)

                {

                    IEnumerator en = SecurityManager.PolicyHierarchy();

 

                    while (en.MoveNext())

                    {

                        PolicyLevel pl = en.Current as PolicyLevel;

 

                        if (pl != null)

                        {

                            if (pl.Label == "User")

                            {

                                _currentPolicyLevel = pl;

                                break;

                            }

                        }

                    }

 

 

                    if (_currentPolicyLevel == null)

                        throw new ApplicationException("未找到相关PolicyLevel");

                }

               

                return _currentPolicyLevel;

            }

        }

 

        protected override void OnAfterInstall(System.Collections.IDictionary savedState)

        {

 

            base.OnAfterInstall(savedState);

 

            try

            {

                //生成FullTrust

                PermissionSet permissionSet = new NamedPermissionSet("FullTrust");

 

                //安装目录

                string assemblyPath = this.Context.Parameters["assemblypath"];

                string installDirectory =

                    assemblyPath.Substring(0, assemblyPath.LastIndexOf("\\"));

                if (!installDirectory.EndsWith(@"\"))

                    installDirectory += @"\";

                installDirectory += "*";

 

                //生成UrlMembershipCondition

                IMembershipCondition membershipCondition = new UrlMembershipCondition(installDirectory);

 

                //生成CodeGroup添加相关权限

                PolicyStatement policyStatement = new PolicyStatement(permissionSet);

                CodeGroup codeGroup = new UnionCodeGroup(membershipCondition, policyStatement);

                codeGroup.Description = "TayeWorks.TEMP";

                codeGroup.Name = codeGroupName;

 

                //删除以前可能的存在

                foreach( CodeGroup cg in CurrentPolicyLevel.RootCodeGroup.Children)

                {

                    if (cg.Name == codeGroup.Name)

                    {

                        CurrentPolicyLevel.RootCodeGroup.RemoveChild(cg);

                    }

                }

 

                //添加保存

                CurrentPolicyLevel.RootCodeGroup.AddChild(codeGroup);

                SecurityManager.SavePolicy();

 

            }

            catch (Exception ex)

            {

                System.Windows.Forms.MessageBox.Show(ex.ToString());

            }

 

        }

 

        protected override void OnAfterUninstall(System.Collections.IDictionary savedState)

        {

            base.OnAfterUninstall(savedState);

 

            //删除存在CodeGroup

            foreach (CodeGroup cg in CurrentPolicyLevel.RootCodeGroup.Children)

            {

                if (cg.Name == codeGroupName)

                {

                    CurrentPolicyLevel.RootCodeGroup.RemoveChild(cg);

                    SecurityManager.SavePolicy();

                }

            }

 

        }

 

 

    }

}


安装正确将在Code Access Security Policy中的User下添加一个CodeGroup
这样才可以加载正确..

2005-12-30年底了..新年..

15:30 | 评论 (105)

2005年12月23日

..安装了ASP.NET 2.0 碰到Failed to access IIS metabase. 实在是很郁闷的问题 如果你的机通过一些 aspnet_regiis -i aspnet_regiis -ga aspnet 之类无法解决问题无法解决问题. 记得上面的命令后要restart 一下 IIS.否则还是会让你很惨. 试着打开IIS右键-->属性-->服务器扩展->手工管理权限 到Internet信息服务 -> WWW服务 -->操作员..添加ASPNET用户. [ 这里我的机里有个很怪的用户是头象是红色用户是 Taye\ .我把这个用户删掉了.不知道是什么DD.. ] OK. Restart一下...终于OK了..

16:00 | 评论 (1)

2005年3月18日

http://hddhddhdd.mblogger.cn家发现了这个好东西
http://www.nhacks.com/email/index.php
一个E-Mail Icon Generator
如果你没有的话可以去生成几个
更有趣的它竟然有QQ的:)

Hotmail/MSN:


Gmail:


QQ:



9:05 | 评论 (6)

Copyright taye.