ImageVerifierCode 换一换
格式:DOCX , 页数:35 ,大小:1.45MB ,
资源ID:24641012      下载积分:3 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/24641012.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

本文(outlook插件开发.docx)为本站会员(b****4)主动上传,冰豆网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰豆网(发送邮件至service@bdocx.com或直接QQ联系客服),我们立即给予删除!

outlook插件开发.docx

1、outlook插件开发向outlook2010中开发一个计算器的插件1. 开发环境介绍:VS 2010、outlook 20102. 具体步骤如下:1) 新建一个插件项目,如下图所示:2) 点击确定按钮,进入如下页面:3) 选择解决方案中的“OutlookAddIn1”右键添加-新建项,如下图所示:4) 点击新建项目,进入以下页面:5) 选择“功能区(可视化设计器)”,出现如下页面6) 拖一个button控件到group1中,如下图所示:7) 新建一个winform页面命名为“Calculate”,如下图所示:8) 向Calculate页面中添加控件,设计成如下图所示的页面:9) 实现计算器的

2、功能:Calculate.cs文件的源代码如下:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;namespace OutlookAddIn1 public partial class Calculator : Form double a, b; string m; bool flag = fa

3、lse; public Calculator() InitializeComponent(); / / 清?除y / / / private void btnClear_Click(object sender, EventArgs e) txtValue.Text = ; / / 数y值7 / / / private void btn7_Click(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 7; else txtValue.Text = 7; / / 数y值8 / / / privat

4、e void btn8_Click(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 8; else txtValue.Text = 8; / / 数y值9 / / / private void btn9_Click(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 9; else txtValue.Text = 9; / / 数y值4 / / / private void btn4_Clic

5、k(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 4; else txtValue.Text = 4; / / 数y值5 / / / private void btn5_Click(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 5; else txtValue.Text = 5; / / 数y值6 / / / private void btn6_Click(object sender,

6、 EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 6; else txtValue.Text = 6; / / 数y值1 / / / private void btn1_Click(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 1; else txtValue.Text = 1; / / 数y值2 / / / private void btn2_Click(object sender, EventArgs e) if

7、 (txtValue.Text.Trim() != 0) txtValue.Text += 2; else txtValue.Text = 2; / / 数y值3 / / / private void btn3_Click(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 3; else txtValue.Text = 3; / / 点? / / / private void btn10_Click(object sender, EventArgs e) if (txtValue.Text.T

8、rim() != & txtValue.Text.IndexOf(.)= 0) txtValue.Text += .; / / 数y值0 / / / private void btn0_Click(object sender, EventArgs e) if (txtValue.Text.Trim() != 0) txtValue.Text += 0; else txtValue.Text = 0; / / 等于号? / / / private void btn11_Click(object sender, EventArgs e) Calculators(); / / 退?位? / / /

9、private void btnRemove_Click(object sender, EventArgs e) string value = txtValue.Text.Trim(); if (value.Length 0) txtValue.Text = value.Substring(0, value.Length - 1); / / 除y号? / / / private void btn12_Click(object sender, EventArgs e) Operation(btn12.Text); / / 乘?号? / / / private void btn13_Click(o

10、bject sender, EventArgs e) Operation(btn13.Text); / / 减?号? / / / private void btn14_Click(object sender, EventArgs e) Operation(btn14.Text); / / 加号? / / / private void btn15_Click(object sender, EventArgs e) Operation(btn15.Text); / / 计?算?函数y / private void Calculators() b = Convert.ToDouble(txtValu

11、e.Text.Trim(); switch (m) case (/): if (b != 0) txtValue.Text = (a / b).ToString(); else txtValue.Text = 0; flag = false; break; case (X): txtValue.Text = (a * b).ToString(); flag = false; break; case (+): txtValue.Text = (a + b).ToString(); flag = false; break; case (-): if (b a) txtValue.Text = -

12、+ (b - a).ToString(); else txtValue.Text = (a - b).ToString(); flag = false; break; / / 运?算?符? / / private void Operation(string strValue) if (flag) Calculators(); a = Convert.ToDouble(txtValue.Text.Trim(); txtValue.Text = ; m = strValue; flag = true; Calculator.Desinger.cs代码如下:namespace OutlookAddI

13、n1 partial class Calculator / / Required designer variable. / private System.ComponentModel.IContainer components = null; / / Clean up any resources being used. / / true if managed resources should be disposed; otherwise, false. protected override void Dispose(bool disposing) if (disposing & (compon

14、ents != null) components.Dispose(); base.Dispose(disposing); #region Windows Form Designer generated code / / Required method for Designer support - do not modify / the contents of this method with the code editor. / private void InitializeComponent() this.txtValue = new System.Windows.Forms.TextBox

15、(); this.btn7 = new System.Windows.Forms.Button(); this.btn8 = new System.Windows.Forms.Button(); this.btn9 = new System.Windows.Forms.Button(); this.btnClear = new System.Windows.Forms.Button(); this.btn6 = new System.Windows.Forms.Button(); this.btn5 = new System.Windows.Forms.Button(); this.btn4

16、= new System.Windows.Forms.Button(); this.btn3 = new System.Windows.Forms.Button(); this.btn2 = new System.Windows.Forms.Button(); this.btn1 = new System.Windows.Forms.Button(); this.btn11 = new System.Windows.Forms.Button(); this.btn0 = new System.Windows.Forms.Button(); this.btn10 = new System.Win

17、dows.Forms.Button(); this.btnRemove = new System.Windows.Forms.Button(); this.btn12 = new System.Windows.Forms.Button(); this.btn13 = new System.Windows.Forms.Button(); this.btn14 = new System.Windows.Forms.Button(); this.btn15 = new System.Windows.Forms.Button(); this.SuspendLayout(); / / txtValue

18、/ this.txtValue.BackColor = System.Drawing.Color.Black; this.txtValue.Font = new System.Drawing.Font(宋?体?, 30F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)(134); this.txtValue.ForeColor = System.Drawing.SystemColors.Info; this.txtValue.Location = new System.Drawing.Po

19、int(13, 13); this.txtValue.Multiline = true; this.txtValue.Name = txtValue; this.txtValue.ReadOnly = true; this.txtValue.Size = new System.Drawing.Size(432, 56); this.txtValue.TabIndex = 0; this.txtValue.TextAlign = System.Windows.Forms.HorizontalAlignment.Right; / / btn7 / this.btn7.Cursor = System

20、.Windows.Forms.Cursors.Hand; this.btn7.Font = new System.Drawing.Font(宋?体?, 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)(134); this.btn7.Location = new System.Drawing.Point(12, 144); this.btn7.Name = btn7; this.btn7.Size = new System.Drawing.Size(70, 52); this.btn7.T

21、abIndex = 1; this.btn7.Text = 7; this.btn7.UseVisualStyleBackColor = true; this.btn7.Click += new System.EventHandler(this.btn7_Click); / / btn8 / this.btn8.Cursor = System.Windows.Forms.Cursors.Hand; this.btn8.Font = new System.Drawing.Font(宋?体?, 20F, System.Drawing.FontStyle.Bold, System.Drawing.G

22、raphicsUnit.Point, (byte)(134); this.btn8.Location = new System.Drawing.Point(109, 144); this.btn8.Name = btn8; this.btn8.Size = new System.Drawing.Size(70, 52); this.btn8.TabIndex = 2; this.btn8.Text = 8; this.btn8.UseVisualStyleBackColor = true; this.btn8.Click += new System.EventHandler(this.btn8

23、_Click); / / btn9 / this.btn9.Cursor = System.Windows.Forms.Cursors.Hand; this.btn9.Font = new System.Drawing.Font(宋?体?, 20F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, (byte)(134); this.btn9.Location = new System.Drawing.Point(200, 144); this.btn9.Name = btn9; this.btn9.Size = new System.Drawing.Size(70, 52); this.btn9.TabIndex = 3; this.btn9.Text = 9; this.btn9.UseVisualStyleBackColor = true; this.btn9.Click += new System.EventHandler(this.btn9_Click); / / btnClear / this.btnClear.Cursor = System.Windows.Forms.Cursors.Hand; this.btnCl

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1