
C#学习
Li_Yurun
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hellow world
using System; //引用system命名空间namespace mytest //namespace 空间命名{ class Program //Program 类,包含多个方法,比如main { static void Main(string[] args) //具体的方法 { /*第一个程序包*...原创 2019-03-26 10:27:47 · 147 阅读 · 0 评论 -
C# 读取txt
打开文件,读取所有数据,对数据进行划分 //find the txt and read // 打开文件准备读取数据 StreamReader rd = File.OpenText("D:\\ak_xls_txt.txt"); ...原创 2019-05-21 13:35:58 · 285 阅读 · 0 评论 -
C# 打开指定文件夹下的excel
先弹出一个对话框 if (MessageBox.Show("EXCEL will open", "Sure", MessageBoxButtons.YesNo) == DialogResult.Yes) { System.Diagnostics.Process p = new System.Diagnosti...原创 2019-05-21 13:33:00 · 1969 阅读 · 0 评论 -
C# 创建Excel文件
//excel 路径创建文件 try { //string fileTest = "D:\\openexcel.xlsx"; string fileTest = Gloable.excel_path; if (Fi...原创 2019-05-21 13:24:23 · 4933 阅读 · 1 评论 -
C# processbar设置
拖一个bar,然后按照以下语句 progressBar1.Maximum = 10+6*N;//设置最大长度值 10+10N progressBar1.Value = 0;//设置当前值 progressBar1.Step = 1;//设置没次增长多少 progressBar1.Value += progressBar1.Step * 10;//让进度条增加一次 ...原创 2019-05-21 13:23:27 · 1329 阅读 · 0 评论 -
C# 输入选择文件夹
对于C#选择文件夹,代码//弹出选择路径对话框 FolderBrowserDialog dialog = new FolderBrowserDialog();//对话框的名字 dialog.Description = "Please choose the path "; string foldPath = ""; //点击...原创 2019-05-20 21:44:17 · 985 阅读 · 0 评论 -
读取数据 Ocean
using System;using Slb.Ocean.Core;using Slb.Ocean.Petrel;using Slb.Ocean.Petrel.UI;using Slb.Ocean.Petrel.Workflow;using Slb.Ocean.Petrel.DomainObject;using Slb.Ocean.Petrel.DomainObj...原创 2019-04-19 19:09:33 · 553 阅读 · 1 评论 -
C#datagidview创立数据库,实现读写数据视频
https://www.51zxw.net/show.aspx?id=49911&cid=548转载 2019-04-18 21:07:23 · 518 阅读 · 0 评论 -
C# 处理excel 大全
using System;using System.Data;using System.Configuration;using System.Web;using Microsoft.Office.Interop;using Microsoft.Office.Core;namespace Microsoft.Office.Interop.ExcelEdit{ /// &l...转载 2019-04-22 21:04:27 · 2410 阅读 · 0 评论 -
C# 写数据 excel 保持 退出
Microsoft.Office.Interop.Excel.Application excel = new Microsoft.Office.Interop.Excel.Application(); Microsoft.Office.Interop.Excel.Workbook sheet = excel.Workbooks.Open("D:\\...原创 2019-04-22 20:53:33 · 317 阅读 · 0 评论 -
VSTO 加载TASKPANE
using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Xml.Linq;using Excel = Microsoft.Office.Interop.Excel;using System.ComponentModel;using System.Dr...原创 2019-04-17 18:48:08 · 650 阅读 · 0 评论 -
VSTO 绘制Excel图形
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Office.Tools.Ribbon;using Microsoft.Office.Interop.Excel;namespace ExcelAddIn1{ public pa...原创 2019-04-15 22:03:07 · 874 阅读 · 0 评论 -
读取单元的值,并用对话框
using System;using System.Collections.Generic;using System.Linq;using System.Text;using Microsoft.Office.Tools.Ribbon;//-----< using >-----------using Microsoft.Office.Tools.Ribbon;using...原创 2019-04-15 19:37:03 · 138 阅读 · 0 评论 -
C# button 添加logo
建立一个button private void Form1_Load(object sender, EventArgs e) { //设立一个按钮背景 button1.BackgroundImage = PetrelImages.Comments;//对按钮背景的位置进行设定 button1.Back...原创 2019-05-21 13:40:35 · 1209 阅读 · 0 评论