2008年8月14日星期四

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleSample
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello and welcome to the new Console in Visual Studio 2005");
Console.WriteLine();

# region Title

Console.WriteLine("The default title of the Console window is the path to this executable");
Console.Write("Please enter the new Title for the Console Window:");
Console.Title = Console.ReadLine();

Console.WriteLine();
Console.WriteLine();

# endregion Title

# region Size

Console.WriteLine("You can now change the size of the Window");
Console.WriteLine();

int newHeight;
int newWidth;

Console.Write("Enter the Height in Pixels(40 is a good value):");
try
{
newHeight = Int32.Parse(Console.ReadLine());
}
catch
{
Console.WriteLine("You entered an incorrect value. I will set the height to 40 for you");
newHeight = 40;
}
Console.WriteLine();

Console.Write("Enter the Width in Pixels (100 is a good value):");
try
{
newWidth = Int32.Parse(Console.ReadLine());
}
catch
{
Console.WriteLine("You entered an incorrect value. I will set the width to 100 for you");
newWidth = 100;
}

// Make sure the window is not set larger than possible
if (newHeight > Console.LargestWindowHeight)
newHeight = Console.LargestWindowHeight;

if (newWidth > Console.LargestWindowWidth)
newWidth = Console.LargestWindowWidth;

Console.WindowHeight = newHeight;
Console.WindowWidth = newWidth;

Console.Write("New window size is: " + Console.WindowHeight + " x " + Console.WindowWidth);
Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();

Console.Clear();

# endregion Size

# region Color

Console.WriteLine("You can also change the Background and Foreground colors of the Console using one of the following color values:");
Console.WriteLine();

foreach (string colorName in Enum.GetNames(typeof(ConsoleColor)))
{
Console.Write(colorName + ", ");
}

Console.WriteLine();

Console.Write("Enter the new Background Color:");
try
{
string newBackgroundColor = Console.ReadLine();
Console.BackgroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), newBackgroundColor, true);
}
catch
{
Console.Write("You entered an incorrect color choice. I will set the background to Green for you");
Console.BackgroundColor = ConsoleColor.Green;
}

Console.Write("Enter the new Foreground Color:");

try
{
string newForegroundColor = Console.ReadLine();
Console.ForegroundColor = (ConsoleColor)Enum.Parse(typeof(ConsoleColor), newForegroundColor, true);
}
catch
{
Console.Write("You entered an incorrect color choice. I will set the foregound to Yellow for you");
Console.ForegroundColor = ConsoleColor.Yellow;
}

Console.Clear();
Console.WriteLine("You can see how the new colors are applied");
Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();
Console.BackgroundColor = ConsoleColor.Black;
Console.ForegroundColor = ConsoleColor.White;
Console.Clear();

# endregion Color

# region Buffer

Console.WriteLine("In addition to the Window size you can also change the buffer size");
Console.WriteLine("The buffer size can not be smaller than the window size");

int newBufferWidth;
int newBufferHeight;

Console.Write("Enter the new buffer height: ");
try
{
newBufferHeight = Int16.Parse(Console.ReadLine());
}
catch
{
Console.WriteLine("You entered an incorrect value. I will set the buffer height to 50 for you");
newBufferHeight = 50;
}


Console.Write("Enter the new buffer width: ");
try
{
newBufferWidth = Int16.Parse(Console.ReadLine());
}
catch
{
Console.WriteLine("You entered an incorrect value. I will set the buffer width to 120 for you");
newBufferWidth = 120;
}

if (newBufferWidth < Console.WindowWidth)
newBufferWidth = Console.WindowWidth;

if (newBufferHeight < Console.WindowHeight)
newBufferHeight = Console.WindowHeight;

Console.SetBufferSize(newBufferWidth, newBufferHeight);

Console.Write("New Buffer size is: " + Console.BufferWidth + " x " + Console.BufferHeight);

Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();

Console.Clear();

Console.WindowWidth = 120;
Console.WindowHeight = 40;
Console.BufferWidth = 120;
Console.BufferHeight = 40;


Console.WriteLine("@@@@@@@@@@");
Console.WriteLine("@@@@@@@@@@");
Console.WriteLine("@@@@@@@@@@");
Console.WriteLine("@@@@@@@@@@");
Console.WriteLine("@@@@@@@@@@");

Console.WriteLine("You can also move part of the buffer");
Console.WriteLine("The area above is a 10 x 5 matrix");
Console.WriteLine("We will move it from the top left to the bottom right");

Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();


Console.MoveBufferArea(0, 0, 10, 5, Console.BufferWidth - 10, Console.BufferHeight - 5);

Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();

Console.Clear();


# endregion Buffer

# region Cursor

Console.SetWindowSize(120, 40);

Console.WriteLine("With the new Console class you can also change the cursor postions, size and make the cursor invisible");
Console.WriteLine();
Console.WriteLine("The beginning of this line is at Left = " + Console.CursorLeft + " Top = " + Console.CursorTop);
Console.WriteLine();
Console.WriteLine("Press Enter to move the cursor to Left = 20, top = 20");
Console.ReadLine();
Console.CursorLeft = 20;
Console.CursorTop = 20;
Console.Write("The beginning of this line is at Left = " + Console.CursorLeft + " Top = " + Console.CursorTop);
Console.WriteLine();
Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();

Console.Clear();

Console.WriteLine("Adjusting the Cursor size and visibility");
Console.WriteLine();
Console.WriteLine("The cursor size is now = " + Console.CursorSize);
Console.WriteLine();

int newCursorSize;

Console.Write("Enter the new cursor size: ");
try
{
newCursorSize = Int32.Parse(Console.ReadLine());
}
catch
{
Console.WriteLine("You entered an incorrect value. I will set the cursor size to 60 for you");
newCursorSize = 60;
}

if (newCursorSize <= 0 | newCursorSize > 100)
{
Console.WriteLine("The cursor size must be between 1 and 100. I will set the cursor size to 50 for you");
newCursorSize = 50;
}

Console.CursorSize = newCursorSize;
Console.WriteLine();
Console.WriteLine("The cursor size is now = " + Console.CursorSize);
Console.WriteLine();
Console.Clear();

Console.WriteLine("The cursor can be made invisible");
Console.CursorVisible = false;
Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();

Console.WriteLine("And visible again");
Console.CursorVisible = true;

Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();
Console.Clear();

Console.Clear();

# endregion Cursor

# region Beep

Console.WriteLine("Adjusting the Beep frequency and duration");
Console.WriteLine();

int frequency;
int duration;

Console.Write("Enter a frequency value between 37 and 32767: ");
try
{
frequency = Int32.Parse(Console.ReadLine());

if (frequency < 37 | frequency > 32767)
{
Console.WriteLine("You entered an incorrect value. I will set the frequency to 1000 for you");
frequency = 1000;
}

}
catch
{
Console.WriteLine("You entered an incorrect value. I will set the frequency to 1000 for you");
frequency = 1000;
}
Console.WriteLine();

Console.Write("Enter a duration in milliseconds (1000 = 1 second): ");
try
{
duration = Int32.Parse(Console.ReadLine());
}
catch
{
Console.WriteLine("You entered an incorrect value. I will set the duration to 500 for you");
duration = 500;
}

Console.Beep(frequency, duration);

Console.WriteLine();
Console.WriteLine("Press Enter to continue");
Console.ReadLine();

Console.Clear();


# endregion Beep

Console.WriteLine();
Console.WriteLine("Press Enter to end this demo");
Console.ReadLine();
}

static void Console_CancelKeyPress(object sender, ConsoleCancelEventArgs e)
{
Console.WriteLine("Now CTRL+C is used as the cancel key");
Console.ReadLine();
e.Cancel = true;
}
}
}

Bookmarks

个性网站

Defrag Magazine
Greetings from MIX.COM !!
MIX MIX Online
[ City Corner - 都市的角落裡... ]
个性网站 - Google 搜索

丽水

丽水同城交易网丽水最大的同城交易平台! 丽水免费网上商城网上开店网上逛街丽水购物网丽水购物论坛

免费域名

my

alva.web4.a48.cn

2008万网CN英文域名免费注册体验活动-优惠促销-中国万网(www.net.cn)
www.1a.cn
www.5944.net
www.gnway.com
www.oray.cn
以勒科技(www.yileidc.com)---电信IDC数据中心 服务器租用,主机托管,整机租用,域名注册,虚拟主机,软件开发,网站推广,电子商务信息服务平台,上海网站制作,上海服务器托管,上海服务器租用
欢迎访问备案网站管理系统

基金

广发基金—广发增强债券型证券投资基金

娱乐

优酷
土豆网
我乐网
爆米花视频
迅雷在线
迅雷看看
酷6网

学校

丽水学院体育系
丽水学院图书馆-首页
丽水学院大学生创业计划大赛网站
丽水学院软件下载
什么是IP多路广播?--丽水学院邬伟民
计算机与信息工程学院

广告联盟系统

广告联盟 搜索结果 - 站长下载

新闻报纸

东方报
中华网—网罗心中的华彩
中国广播网
中国新闻网新闻中心
人民网
北青网
新华报业网江苏新闻
新闻中心首页_新浪网
早报网 Zaobao.com
欢迎访问扬子晚报网!

游戏网游

17173.com网络游戏第一门户站
52pk游戏网
CEG电子竞技中文门户
Gamesh.com 上游游戏中心
VS竞技游戏平台
亿赛网
太平洋游戏网
新浪游戏
浩方对战平台
游戏_天极Yesky
网易游戏频道
联众世界-快乐每一天!
腾讯游戏频道
雅虎游戏

爱国者安全

2008年3月14,15日本周五,六VIP授课通知(密码1415)[爱国者安全论坛]
dvd论坛
Foundstone - A division of McAfee
mail
新手
爱国者安全网-会员800G资源下载中心
短训班
首页

电脑网络

免费邮箱

Hotmail
TOM免费邮箱
搜狐网站
新浪邮箱
网易126免费邮
网易163邮箱
邮箱-21CN.COM
雅虎免费邮箱

博客空间

MSN Spaces
博客园
博客网-Bokee.com-
和讯博客
搜狐博客
新浪博客
波普播客-播客天下

电脑教程

eNet网络学院
ezIT学院频道
goEway.com
中华网--科技频道--网络教室
天极网---软件频道
巧巧读书-电脑教程
洪恩在线 - 电脑乐园
电脑爱好者之家
科技时代首页
网易学院
网狐学园-搜狐IT
豆豆技术网-

电脑硬件

DIY硬件_天极Yesky
IT168首页
IT世界网 IT.com.cn
太平洋电脑网
新华网-IT

系统光盘

无人值守Windows XP安装光盘 - 介绍

17173.com网络游戏第一门户站
CBINEWS-电脑商情在线
eNet硅谷动力
IT 数 码
ZDNet China Home Page
中国IT权威门户-赛迪网(ccidnet.com)
互联网实验室(chinalabs.com)
天极ChinaByte_中国的中文电脑科技资讯网
天极Yesky_全球中文IT第一门户
太平洋电脑网 PConline.com.cn-IT世界 由此精彩
泡泡网_PCPOP.COM_帮你正确购买和使用IT产品
电脑之家 PChome 科技引领生活
计世网--专业价值 行业网群--首页

论坛系列

BT之家
Discuz! Board PHPBBS论坛
PCPChina 先锋网
[THEMEX.NET 极限主题] - powered by vBulletin
[THEMEX.NET 极限主题]
≡ 拂晓雅阁 ≡
姑苏生活论坛
安兴论坛
手机论坛
无忧团购网-篱笆论坛
星星精品论坛
汉化新世纪论坛
深度技术论坛
狂人论坛
番茄花园论坛
穆族社区
索迪论坛
胡同口 - 西祠胡同
落伍者 im286.com
赢征天下论坛
雷傲超级论坛
霏凡论坛
龙族联盟论坛

银行网站

中国交通银行
中国农业银行
中国工商银行
中国建设银行
中国招商银行
中国民生银行
中国银行
华夏银行网站

门户

eNetIT
IT.com.cn
奇虎首页
新浪
笔记本中关村在线
网易
腾讯首页

20Click
51web
MENSTYLE
Mofile网络硬盘
MyBtDB.com
oBlog--后台管理
Oblog官方中文网—中国最专业的博客系统提供商
PC蛋蛋
PC蛋蛋幸运28每日数据分析图
Uspace官方站点 ---- 全球第一套Web2.0全面解决方案
VeryCD
vgimm.com
www.shedewang.cn
一呼百应 更懂商机——专业供求信息搜索引擎
丁香鱼工作室——瑞星
世界编程大赛头名程序-太平洋电脑网Pconline-[其它平台]
世纪东方--虚拟主机全国9强!
中国站长论坛
天眼通官方网 - 远程视频强制监控连接...... QQ暴力强制视频.远程视频强制监控连接..免费视频远程嗅探强制连接
好空间虚拟主机运营网
开复学生网
快门
我的图书馆登录
方乾坤Blog
李开复给中国学生的六封信_网易教育
电子样本
舍得网
返利网
连线速度
金山爱词霸在线翻译

2008年7月28日星期一

迅雷vod_cache_data

磁盘里老有 vod_cache_data文件夹怎么删也删不掉!请高手赐解!

最近D盘(或许是其他盘)根目录总是莫名其妙的出现vod_cache_data迅雷的官方解释:  vod_cache_data是迅雷看看的数据缓存文件夹,这个版本的迅雷会自动选择用户机器剩余空间最大的分区进行保存,该文件夹从支持迅雷看看的第一个版本就存在,只是放在操作系统的临时目录而已,大家没注意到,现在我们开放了设置,大家可以任意设置他的所在目录,如果你不使用迅雷看看,那么它里面不会存在数据文件。
目前的解决方法也比较猥琐,只是眼不见为净罢了将以下文本复制到 新建 文本文档 中,并更改扩展名为.reg,双击导入注册表 复制内容到剪贴板 代码:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE/SOFTWARE/Thunder Network/ThunderOem/thunder_backwnd]"Cache"="C://Documents and Settings//All Users//Application Data//vod_cache_data//"
当让,如果你使用的防毒软体有阻止进程访问文件的功能就可以完全阻止它的生成了,比如我用的McAfee,新建一条规则阻止Thunder.exe创建D:/*vod_cache_data*/**,就可以防止再次在D盘生成vod_cache_data了
用迅雷看看来看电影的话,还是会生成的,只是换了地方而已
如果用不着迅雷看看,用的McAfee的,新建一条规则阻止Thunder.exe创建D:/*vod_cache_data*/**,就可以防止再次在D盘生成vod_cache_data了
迅雷看看,其实也就是用迅雷边下边看,很吃带宽的!
解决迅雷435自动生成vod_cache_data文件夹的补丁
新版迅雷会在D盘(据zow315说是在有最大剩余空间的盘上,具体适个人情况而定)自动生成一个vod_cache_data的文件夹,存放缓存的数据用于给迅雷看看等数据下载。即使删除了这个文件夹迅雷也会在启动后自动建立。
使用本补丁可以使迅雷不在重新建立这个文件夹。同时也可以使迅雷不再建立任何缓冲文件夹。作用吗?不言而喻,没有缓冲,怎么上传数据给别人呢呵呵……
注意安装了迅雷看看的就不要用这个补丁了,因为本人没有安装迅雷看看所以自己没有测试会对看看起什么反作用。
说明:使用后就可以删除D盘下的vod_cache_data文件夹了,这个本程序不会自动删除,请各位手动删除吧。另外就是由于每个版本的迅雷数据都不一样的所以有了版本号验证。绿色版的用户可能没有注册表项。如果确认你是435版的话,同时又提示您版本号不对请到下面下这个注册表文件双击导入即可。

通过修改了streammedialib.dll是这个缓冲文件夹指向了C:/Documents and Settings/All Users/Application Data/thunder_vod_cache/文件夹下 使其眼不见为净
那么其实大家如果不用这个补丁的话也可以通过自己改注册表实现
附在迅雷官方论坛发的方法 其实也是应用了“眼不见为净”的伎俩
临时解决办法 更改注册表:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE/SOFTWARE/Thunder Network/ThunderOem/thunder_backwnd]"Cache"="C://Documents and Settings//All Users//Application Data//vod_cache_data//"
把以上内容保存为.reg文件导入注册表就行了以上部分可更换为你自己的任意目录,注意使用'//'而不是'/',这样vod_cache_data文件夹就在你指定的目录中生成了

e:\vod_cache_data

快速清除迅雷看看缓存文件【整理】

想必大家都喜欢在迅雷里看高清晰的大片猛片吧,但是你们知道吗?


【一】

每次打开使用迅雷看看在线观看免费电影后,迅雷看看将会在系统盘生成大量的临时缓存文件,这些文件可能会引发“磁盘空间不足”的提示。



您可以按照以下方法清除迅雷看看的临时文件,以解决“磁盘空间不足”的问题。



如果是旧版本(5.7.7.441)
具体步骤如下:



第一步:打开我的电脑

第二步:菜单栏,找到工具,然后文件夹选项

第三步:点击查看标签

第四步:找到隐藏文件和文件夹,选择显示所有文件和文件夹



最后访问:C:\Documents and Settings\All Users\Application Data\thunder_vod_cache

直接删除既可。

删除前,请先退出迅雷5.

注:迅雷看看占用您机器里的硬盘空间最大为600M



【二】

如果是5.7.7.435以上版本,你又修改了缓存目录
,有些人把迅雷看看的缓存位置改了,比如改在E盘的文件夹了,但是为什么在那个文件夹里却找不到任何东西?但右键属性里却显示有316MB。缓存内容被隐藏了?那么怎么查看这个文件里的缓存内容并删除掉?



步骤如下:

在IE浏览器里输入“E:\vod_cache_data“,按回车键。然后你就会看到那些“失踪”的缓存全都现身了,删除里面的所有东西,然后在E盘里再建一个新文件夹起名VOD什么的,把默认的定在这个文件夹里就OK了。不过文件夹里的东西是看不到的,看完都得把文件夹删除,然后再重新建就行了,挺麻烦!



或者:文件夹选项→查看→把显示系统保护内容和隐藏受保护的操作系统文件,前者勾了,后者去掉→再选择显示所有文件和文件夹,
vod_cache_data文件夹就出来了。删除vod_cache_data里面的文件就行!



【三】

不管是旧版本还是新版, 以上2种方法你都嫌烦的话,那就不妨试试第三种方法。在你不改变迅雷看看缓存默认目录的情况下,一键快捷轻松的删除所有缓存文件,只要你按照下面写的做就OK 了!



将下列代码用记事本保存为bat文件,即后缀名改为.bat 运行即可!



@echo 正在结束迅雷进程...

@taskkill /im Thunder5.exe /f

@echo 结速迅雷进程结束...

@ping -n 2 127.1>nul

@echo ------------D盘-------------

@echo 开始删除D盘迅雷看看缓存目录...

@D:

@echo 切换到D盘根目录...

@echo 切换到迅雷看看缓存目录所有文件夹...

@echo 开始删除缓存目录...

@RMDIR /S/Q vod_cache_data

@echo 删除完成....

@echo ------------在E盘请继续-------------

@pause

@echo 开始删除E盘迅雷看看缓存目录...

@E:

@echo 切换到E盘根目录...

@echo 切换到迅雷看看缓存目录所有文件夹...

@echo 开始删除缓存目录...

@RMDIR /S/Q vod_cache_data

@echo 删除完成....

@echo ------------在F盘请继续-------------

@pause

@echo 开始删除F盘迅雷看看缓存目录...

@F:

@echo 切换到F盘根目录...

@echo 切换到迅雷看看缓存目录所有文件夹...

@echo 开始删除缓存目录...

@RMDIR /S/Q vod_cache_data

@echo 删除完成....

@echo ------------在G盘请继续-------------

@pause

@echo 开始删除G盘迅雷看看缓存目录...

@G:

@echo 切换到G盘根目录...

@echo 切换到迅雷看看缓存目录所有文件夹...

@echo 开始删除缓存目录...

@RMDIR /S/Q vod_cache_data

@echo 删除完成....

@echo ------------你还有H盘吗-------------

@pause

@echo 开始删除H盘迅雷看看缓存目录...

@H:

@echo 切换到H盘根目录...

@echo 切换到迅雷看看缓存目录所有文件夹...

@echo 开始删除缓存目录...

@RMDIR /S/Q vod_cache_data

@echo 删除完成....

@pause




搞定收工!!!

d:\vod_cache_data

我在迅雷看看上看完一部电影时,在"D:vod_cache_data(这是迅雷看看的缓存文件夹)"的文件夹里,选中里面的全部的文件夹,按Shift+Del只能删除一小部分的文件(其他部分无法删除,提示信息说这文件正在使用,我重新启动电脑,在删除还是一样的结果,删不了),有什么方法能删除完这些缓存文件。

在日常电脑使用中,我们会经常遇到当删除某一个文件夹时,会删除不了,删除时弹出这样的提示:文件夹访问被拒绝,请确定磁盘未满。你反复删除也是删除不了,白费心机。这时你需要找出症结的所在。很多时候是因为这文件夹被占用或权限不够的问题。到底是属于哪一个,就需要追根究底。笔者经过多次问题的排除,总结出下面的解决方法。   
1.注消或重启电脑,然后再试着删除。   
2.进入“安全模式删除”。   
3.在纯DOS命令行下使用DEL,DELTREE和RD命令将其删除。   
4.如果是文件夹中有比较多的子目录或文件而导致无法删除.............

删除vod_cache_data

od_cache_data文件夹可以删除吗?我的vod_cache_data文件夹出现在D盘。 可是我好像没有设置过。 为什么这个文件的占空间这么大? 到底是干什么用的?他会自行减肥吗?

vod_cache_data是迅雷看看的数据缓存文件夹,这个版本的迅雷会自动选择用户机器剩余空间最大的分区进行保存,该文件夹从支持迅雷看看的第一个版本就存在,只是放在操作系统的临时目录而已,大家没注意到,现在我们开放了设置,大家可以任意设置他的所在目录,如果你不使用迅雷看看,那么它里面不会存在数据文件。 无法删除,除非你不用迅雷了。不过可以更改所在盘符。具体的解决在迅雷官方论坛。

vod_cache_data文件夹

磁盘里老有 vod_cache_data文件夹怎么删也删不掉!请高手赐解!

这是迅雷的缓存文件夹,只要你上迅雷看看看电影或电视,这个文件夹就会被自动创建