Monday, July 26, 2010

Visuanl C # 2005 Quick Start of the while statement (1)



Use while statements can be true in a Boolean expression is subject to repeat the run a statement.
while statement syntax is as follows:
while (booleanExpression)

statement


First, the Boolean expression will be evaluated, if it is true, on the run statement, then the Boolean expression is evaluated again. If the expression is still true, to run the statement again, and again the expression is evaluated. This process will continue repeatedly until the boolean expression evaluates to false; time, while statement will exit, and from the first statement after the while continue. while statement syntax with if statements have many similarities (in fact, in addition to the two different keywords, the syntax is exactly the same):

鈼?expression must be a Boolean expression.

鈼?Boolean expression must be placed within parentheses.

鈼?If the first value, the Boolean expression is false, statement is not run.

鈼?If you want to in a while under the control of the implementation of two or more statements, you must use braces to group into a block statement.

The following while statement is written to the console the value 0 to 9:
int i = 0;

while (i! = 10)

(

Console.WriteLine (i);

i + +;

)


All the while statement should be terminated at some point. Novice common mistake is to forget to add a special statement, it would eventually result in a Boolean expression evaluates to false and terminate the cycle. In the example, i + +; on this situation.

Note that while loop variable i controls the final number of cycles. This is a very popular representation, has the effect of the variable is sometimes called the sentinel variable (Sentinel variable).

In the following exercise, preparing to write a while loop, it is time to read from a source file line content, and write each line of a text box.

鈼?use the while statement

1. WhileStatement open Visual Studio 2005 project, which is located in My Documents folder under the Microsoft PressVisual CSharp Step by StepChapter 5WhileStatement subfolders.

2. Select "Debug" | "to start (not debugging)."

Visual Studio 2005 to build and run the Windows application. Application itself is a simple text file viewer that allows you to select a file to display its contents.

3. Click the "Open File" (Open File) button.

Then there are "Open" dialog box

4. Switch to the My Documents folder under the Microsoft PressVisual CSharp Step by Step Chapter 5WhileStatementWhileStatement subfolders.

5. Select the Form1.cs file, and then click "Open."

Form1.cs file name will be displayed in small text box, but the contents of the file does not display in the large text box. This is because we have not achieved the appropriate code to read the contents of the source file and display those in the large text box contents. The following steps will add this feature.

6. Close the form, return to Visual Studio 2005.

7. In the "Code and Text Editor" window displays the file Form1.cs code, find openFileDialog_FileOk method.

Users in the "Open" dialog box, select a file, and click "Open" button, call the method. Method is currently the subject:
string fullPathname = openFileDialog.FileName;

FileInfo src = new FileInfo (fullPathname);

filename.Text = src.Name;

/ Bin / boot / dev / etc / home / lib / lost + found / media / misc / mnt / net / opt / proc / root / sbin / selinux / srv / sys / tmp / u01 / usr / var / vmware add while loop here backup / bin / conf / data / log / maint / svn / tmp /


The first statement declares a string variable, named fullPathname, and it is initialized to openFileDialog object FileName property. The statement fullPathname initialized to "Open" dialog box, select the source file's full name (including path).

Note openFileDialog object is from the "toolbox" of selected components of an instance of the OpenFileDialog. This component provides the methods used, you can display to the user a standard Windows "Open" dialog box, allowing users to choose a file, and get selected file name and path.







相关链接:



3D TV is a pie or a bubble?



"Plant Wars zombie" Endlss50 splash breakthrough detailed Raiders



Sneak Peek! VIDEOSTUDIO 10 Plus the first to experience



First Financial Weekly: Direct Supply In The Shadow Of Digital China



Audio file converter



Multimedia courseware in teaching and learning and its CORRECTION



Streaming Media common sense: the basic principles of stream



M4v to flv



Converter mp4 to 3gp free download



ISV Tomorrow Where?



Fax Tools Reviews



evaluation Multimedia Creation TOOLS



flv to mp3 converter free download



To-day thinking of a fulcrum, it will HOLD up the entire dagali



Infomation Shell Tools



China's largest drilling company defectors brush out of legal counsel, the Credit risk of specul



Monday, July 12, 2010

ASP.net (C #) bulk upload



Upload pictures for this site needs, refer to a lot of mature experience in the ASP.net platform using C # language, to do this automatically bulk upload images. ASPX file, and by the debugged, the use of this site, are sent to for your reference, I hope more master pointers.
The program main features are:

(1) can upload their own need to change the directory to the server, upload the source image, thumbnails, text watermark, image watermark charts to map and set the directory into the different directories;

(2) automatically checks the directory, such as nothing to the selected directory, will automatically create them;

(3) the size of thumbnails generated its own set;

(4) can choose whether to need to generate a text watermark, image watermark, watermark map not generated by default;

(5) can add, delete needed to upload pictures.

In this process the relevant comments were added, so issue a code, no explanation.

Daemon:
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;

/ / /
/ / / FileUpload1.HasFile If this is true, is that there are files to upload to the control
/ / / FileUpload1.FileName return to upload the file name, does not contain path information
/ / / FileUpload1.FileContent returns a pointer to the uploaded file stream object
/ / / FileUpload1.PostedFile return has a reference to upload files
/ / / FileUpload1.PostedFile.ContentLength return to upload the file that the file size in bytes
/ / / FileUpload1.PostedFile.ContentType return to upload the file MIME content type, that is, file type, such as return "image / jpg"
/ / / FileUpload1.PostedFile.FileName file on the client to return the full path (including file name full name)
/ / / FileUpload1.PostedFile.InputStream returns a pointer to the uploaded file stream object
/ / / FileInfo object that location on the disk or network files. Providing file path, you can create a FileInfo object:
/ / /

public partial class BackManagement_ImagesUpload: System.Web.UI.Page
(
public string treePath = "";
public int imageW = 100;
public int imageH = 100;
protected void Page_Load (object sender, EventArgs e)
(
this.Button5.Attributes.Add ("Onclick", "window.close ();"); / / in the local close the current page, without the need to send to the server to close the current page
if (! Page.IsPostBack)
(
Label2.Text = Server.MapPath ("/");
TextBox3.Text = "ImageUpload";
treePath = Server.MapPath ("/") + TextBox3.Text.Trim () + "/";
TextBox4.Text = imageW.ToString ();
TextBox5.Text = imageH.ToString ();
)
)
protected void btnload_Click (object sender, EventArgs e)
(
/ / If you save the image directory does not exist, create it by the
treePath = Server.MapPath ("/") + TextBox3.Text.Trim () + "/";
imageW = Convert.ToInt32 (TextBox4.Text.ToString ());
imageH = Convert.ToInt32 (TextBox5.Text.ToString ());
if (! File.Exists (treePath + "images")) / / if / ImageUpload / images do not exist, create / ImageUpload / images, used to store the source image
(
System.IO.Directory.CreateDirectory (treePath + "images");
)
if (! File.Exists (treePath + "thumbnails")) / / if / ImageUpload / thumbnails do not exist, create / ImageUpload / thumbnails, thumbnail images for storage
(
System.IO.Directory.CreateDirectory (treePath + "thumbnails");
)
if (! File.Exists (treePath + "textImages")) / / if / ImageUpload / textImages

Does not exist, create / ImageUpload / textImages, used to store text watermark image
(
System.IO.Directory.CreateDirectory (treePath + "textImages");
)
if (! File.Exists (treePath + "waterImages")) / / if / ImageUpload / waterImages does not exist, then create / ImageUpload / waterImages, used to store graphic image watermark
(
System.IO.Directory.CreateDirectory (treePath + "waterImages");
)

if (FileUpload1.HasFile) / / If this is true, is that there are files to upload the control
(
string fileContentType = FileUpload1.PostedFile.ContentType;
if (fileContentType == "image / bmp" | | fileContentType == "image / gif" | | fileContentType == "image / pjpeg")
(
string name = FileUpload1.PostedFile.FileName; / / return files on the client's full path (including file name full name)

FileInfo file = new FileInfo (name); / / FileInfo object that location on the disk or network files. Providing file path, you can create a FileInfo object:
string fileName = file.Name; / / file name
string fileName_s = "x_" + file.Name; / / thumbnail file name







Recommand Link:



free converter Mp4 to 3gp



Youtube to Cell Phone Pro



avi to 3gp CONVERTER free download



Mp4 Converter To Avi



Hot Nature - Screen Savers



Hope DVD Google Video MPEG Editor



Infomation Games Board



comparison GENEALOGY



Plato iPhone PACKAGE



Hot Real Video Converter



My favorite Management And Distribution



M4v



Christmas-Idea VCD DAT To Xbox 360



SecondLife DVD Cloner



Merry CD-R Sound CDA to WMA Creator



Tuesday, June 29, 2010

Youtube Movie to Xbox Help

Hot popluar youtube video Converter + download + player tool. With YouTube tool you can also convert downloaded YouTube videos to a format compatible with your favorite portable device; including - iPod Video, iPod Touch, iPod Nano, iPhone, Zune, PSP, as well as video capable MP3 players, video capable mobile phones, and Pocket PC, And finally... YouTube tool's embedded player will allow you to watch all your favorite YouTube videos off-line. So now you can enjoy any .flv and .swf videos anytime!
Supports YouTube video or any .flv and .swf file as input file. Supports not only YouTube video, but also various video formats as input file, including avi, DivX, XviD, rm, rmvb, MOV, MPEG, WMV. Supports a wide variety of output file format., including avi, DivX, XviD, rm, rmvb, MOV, MPEG, WMV. Provides various profiles, these profiles can meet the needs of most people. - is the most powerful YouTube assistant on the planet.



Recommand Link:



PSP Movie Creator Pro 3.62



Lenogo DVD Movie to iPod Video Converter



Happiness DVD 3GPP to RM



Youtube FLV to VHS Utility



News about CHAT And Instant Messaging



Convert HD to Sony NWZ-S639F



Youtube To Ipod



WorldCup VCD to DVD



Review Basic Or VB Or VB DotNet



Comments File And Disk Management



Video To Zune HD Software



DVD To Zune Video Suite



Silver DVD to PSP Converter



Friday, June 25, 2010

Youtube Movie to Blackberry Pro

It's most popular and very easy to use YouTube tools. helps you Fast download, convert, play, manage your favorite YouTube videos. If you're a YouTube fan, you'll love YouTube tool! is the most powerful YouTube assistant on the planet. YouTube tool easily: 1. Fast downloads YouTube videos, 2. Supports unlimited simultaneous downloads (a real time saver!), 3. Automatically names the downloaded video the same as the YouTube title, 4. Converts YouTube videos to various video formats, including Video, DVD, VCD, AVI, MPG, MPEG, Divx, Xvid, WMV, RM, RMVB, MOV, MP4, 3GP, SWF, DAT, H264, VOB, Flash, PDA, M4V, 3G2, AMV, CDA, DV,QuickTime, ASX, TV, VHS, FLV, H264, BDMV, MAC, Apple TV, Zune, iPod, PDA, PSP, PS2, PS3, Xbox, Xbox 360, Mobile Phone, Cell Phone, Blackberry, Wii, Laptops, Printers, Palm OS, Pocket PC, PPC, Treo, Psion, EPOC, iphone.
Easily Convert all popular video formats. Provides the highest speed to download YouTube video. Support unlimited simultaneous downloading tasks. Supports auto-name your downloaded video title as the YoutTube page shows. Offers you the most convenient task management and the easiest control capability. About Conversion Features. - is the most powerful YouTube assistant on the planet.



Recommand Link:



video format



New Cataloging



for you Personal Interest



AllRipper DVD TO WMV



How to convert flac to mp3



Lohan DivX CONVERTER



Bluesea DivX FLV Converter



River Past Video Perspective



Bliss MPC AMR to M4P Convert



Avex-DVD TO Apple TV Video Suite



HAPPINESS Youtube Deconde



Video to iRiver E150



CHRISTMASGIFT DVD to FLV



Education for you



Audio Record Expert



Wednesday, June 16, 2010

Lohan DivX Converter

Lohan DivX Converter - A fast video to DVD VOB converter which can convert and burn AVI, MPG, MPEG 1/2/4, WMV, MOV, MP4, RM, RMVB, DivX, Xvid, ASF, 3GP, Youtube FLV Converter easily. With this DVD VCD SVCD converter, you will know how to make a DVD video. You can use it to convert and burn DivX, Xvid, AVI, MPG, MPEG 1/2/4, WMV, MOV, MP4, RM, RMVB files to DVD with chapter Menu. With that, you can convert downloaded videos and burn files into DVD, which means Internet become the storehouse of your home theater! Get Free download now!

Lohan DivX Converter - What a powerful and attractive AVI, MPG, MPEG 1/2/4, WMV, MOV, MP4, RM, RMVB, DivX, Xvid, ASF, 3GP, Youtube FLV converter. This software can burn DivX to DVD and convert DivX to VOB and finish all your tasks with the fastest speed possible and the best quality available. No one will ask how to make a DVD video anymore once they try this great DivX to VOB converter. We highly recommend this program because we think it will make your multimedia life a lot easier and more enjoyable. It allows you to specify NTSC or PAL format, adjust 4:3 or 16:9 video aspect, and burn either DVD disc or ISO file. By setting bitrate and framerate, you can get excellent quality on TV screen. Just free download and enjoy it right now!



Recommand Link:



SuperBurner DVD To WMV



Easy to use Science - Screen Savers



PeonySoft WAV Converter



Explosion DVD To PSP



ISofter DVD to Zune Converter



refreshing linq Datacontext



Youtube to Palm OS Shareware



Audio File Cutter



Specialist Source Editors



Simple Help Tools



Power Flash Decompiler



CSS iPhone Video Converter 77.71.987



YOUTUBE to Treo Software



Merry MP3 M4A Audio To M4P Ripper



Bluesea CDA M3U WMA to Music Copier



How-to AVI to DVD



SuperBurner DVD to Flash



Friday, June 11, 2010

Youtube Movie to Flash Online

Hot popluar youtube video Converter + download + player tool. With YouTube tool you can also convert downloaded YouTube videos to a format compatible with your favorite portable device; including - iPod Video, iPod Touch, iPod Nano, iPhone, Zune, PSP, as well as video capable MP3 players, video capable mobile phones, and Pocket PC, And finally... YouTube tool's embedded player will allow you to watch all your favorite YouTube videos off-line. So now you can enjoy any .flv and .swf videos anytime!
Easily Convert all popular video formats. Provides the highest speed to download YouTube video. Support unlimited simultaneous downloading tasks. Supports auto-name your downloaded video title as the YoutTube page shows. Offers you the most convenient task management and the easiest control capability. About Conversion Features. - is the most powerful YouTube assistant on the planet.



Recommand Link:



Video To Audio Cutter



Merry RM AMR To MPC Recorder



Youtube Video Backup + Player Pack



Photo SCREENSAVER Maker



LENOGO Video to iPhone pro



Youtube FLV to Cell Phone Pro



Flash to PSP CONVERTER



mkv to avi



LasVegas DVD to DivX



Simple Network And Internet



Master Hammond B3 VSTI



Recommend Anti-Virus Tools



Youtube to M4V Mixer



Log ANALYSERS comparison



Eztoo DVD To 3GP Converter



Largest freeware site



Sunday, May 30, 2010

Explosion DVD to iPod

Explosion DVD to iPod is a professional video converter to convert almost all popular video/movie formats to iPhone MP4 format. The output iPod MP4 video files can be played on your Apple iPod. All popular video/movie formats are supported, including AVI, MPEG/MPG/DAT, WMV, ASF, MP4, M4V, 3GP, 3G2, H264, MPEG4, AVC, MOV, QT, DivX, XviD, VOB, FLV, etc. The amazing output quality with super fast conversion speed is brough you by the built-in power MPEG4 encoder. All the output iPod MP4 videos fit your Apple iPhone.



Recommand Link:



Evaluate SCREEN Capture



Hope PS2 VCD Deconde



Storage Source Editors



Extra DVD Copy + RIPPER



AllRipper DVD To WMV



Ultra AVI Converter



Ever CD AMR AAC to VQF Editor



HOPE MPEG to Wii



New Office SUITES And Tools



free Programs download



MP3Resizer Express



Youtube FLV Save + Converter Today



How-to PS3 Converter



Christmasgift DVD Burner



VJDirector