2 Star 1 Fork 0

songworld / ImageService

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

##轻量级图片服务器ImageService使用说明 ###0x00 引用DLL 在主程序中引用图片服务器的DLL,\ImageService\bin\Release\ImageService.dll,如下图

图01

###0x01 使用方法 1.初始化图片服务器对象

<!-- lang: c# -->
public CarImageServer(int port, string path)

- port 图片服务器监听端口,默认为1987
- path 图片服务器物理路径,默认为空

2.启动图片服务器

<!-- lang: c# -->
public bool Start() 

-返回类型bool,是否启动成功

3.使用示例

<!-- lang: c# -->
打开浏览器输入http://localhost:1987/test.jpg即可访问到图片

###0x02 调用示例

<!-- lang: c# -->
using ImageService;

int port = 1987;
Int32.TryParse(Properties.Settings.Default.port, out port); // 
string path = Properties.Settings.Default.path ?? "";

CarImageServer cis = new CarImageServer(port, path);
if (cis.Start())
{
     this.lbStatus.Text = "图片服务器运行中...";
}
else {
      this.lbStatus.Text = "图片服务器启动失败";
}

第一版,写的比较简陋,有问题欢迎大家指出

项目地址 http://git.oschina.net/songworld/ImageService

空文件

简介

轻量级图片服务器 展开 收起
C#
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
C#
1
https://gitee.com/songworld/ImageService.git
git@gitee.com:songworld/ImageService.git
songworld
ImageService
ImageService
master

搜索帮助