分类目录
文章索引模板
20070611 .NET Framework Developer’s Guide  how to - 二月 19, 2008 by yippee

20070611 .NET Framework Developer\’s Guide  how to
http://www.yippeesoft.com

.NET Framework Developer\’s Guide
How to: Use Smartphone Menus

To conform to the Smartphone user interface, the .NET Compact Framework enforces the following menu restrictions:

    *

      You can only have two top-level menu items.
    *

      Only the second top-level menu item, on the right side of the form, can have submenus.

Note that the .NET Compact Framework does not enforce these restrictions at design time, but does throw a NotSupportedException at run time if your code does not follow them.

At run time, you cannot delete a top-level menu item. However, you can set Enabled property of a MenuItem to an empty string ("") to make a menu item appear invisible.

Visual Studio automatically adds a MainMenu component to your form when you create Smartphone and Pocket PC applications, but does not add it to child forms. The MainMenu component operates the Smartphone soft keys, but you cannot program their functionality unless you remove the MainMenu component from the form. For more information about programming soft keys, see Using Smartphone Back Key and Soft Keys.

To associate a method with a menu selection, provide code for the Click event for a MenuItem.
Example

This example defines a menu system for a scenario of selecting maps:

    *

      On the left is the Map Help menu item, which has event handling code that displays a message box.
    *

      On the right is the Maps menu item, which has two children: My Maps and Add and Remove. These children have, respectively, five and two children of their own.

Visual Basic

Imports System Imports System.Windows.Forms  Public Class Form1     Inherits System.Windows.Forms.Form     Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu     Private WithEvents mi1 As New MenuItem     Private mi2 As New MenuItem     Private miChildA As New MenuItem     Private miChildB As New MenuItem     Private WithEvents miGrandChildA1 As New MenuItem     Private WithEvents miGrandChildA2 As New MenuItem     Private WithEvents miGrandChildA3 As New MenuItem     Private WithEvents miGrandChildA4 As New MenuItem     Private WithEvents miGrandChildA5 As New MenuItem     Private WithEvents miGrandChildB1 As New MenuItem     Private WithEvents miGrandChildB2 As New MenuItem      Public Sub New()         MyBase.New()          InitializeComponent()          \’Define and add menu items.         MainMenu1.MenuItems.Add(mi1)         MainMenu1.MenuItems.Add(mi2)         mi2.MenuItems.Add(miChildA)         mi2.MenuItems.Add(miChildB)         miChildA.MenuItems.Add(miGrandChildA1)         miChildA.MenuItems.Add(miGrandChildA2)         miChildA.MenuItems.Add(miGrandChildA3)         miChildA.MenuItems.Add(miGrandChildA4)         miChildA.MenuItems.Add(miGrandChildA5)         miChildB.MenuItems.Add(miGrandChildB1)         miChildB.MenuItems.Add(miGrandChildB2)         mi1.Text = "Map Help"         mi2.Text = "Maps"         miChildA.Text = "My Maps"         miChildB.Text = "Add and remove"         miGrandChildA1.Text = "Manhattan"         miGrandChildA2.Text = "Bronx"         miGrandChildA3.Text = "Brooklyn"         miGrandChildA4.Text = "Queens"         miGrandChildA5.Text = "Staten Island"         miGrandChildB1.Text = "Add map"         miGrandChildB2.Text = "Delete map"      End Sub          Public Shared Sub Main()         Application.Run(New Form1)     End Sub      \’Form overrides dispose to clean up the component list.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)         MyBase.Dispose(disposing)     End Sub      Private Sub InitializeComponent()         Me.MainMenu1 = New System.Windows.Forms.MainMenu()         Me.Menu = Me.MainMenu1         Me.Text = "Form1"     End Sub      \’ The following subroutine handles the      \’ Click event for the mi1 MenuItem.     Private Sub mi1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mi1.Click         MessageBox.Show("This is just a test.")     End Sub  End Class

C#

using System; using System.Windows.Forms;  namespace SmartphoneMenus &leftsign;     public class Form1 : System.Windows.Forms.Form     &leftsign;         private System.Windows.Forms.MainMenu mainMenu1;          private MenuItem mi1 = new MenuItem();         private MenuItem mi2 = new MenuItem();         private MenuItem miChildA = new MenuItem();         private MenuItem miChildB = new MenuItem();         private MenuItem miGrandChildA1 = new MenuItem();         private MenuItem miGrandChildA2 = new MenuItem();         private MenuItem miGrandChildA3 = new MenuItem();         private MenuItem miGrandChildA4 = new MenuItem();         private MenuItem miGrandChildA5 = new MenuItem();         private MenuItem miGrandChildB1 = new MenuItem();         private MenuItem miGrandChildB2 = new MenuItem();          public Form1()         &leftsign;             InitializeComponent();               mainMenu1.MenuItems.Add(mi1);             mainMenu1.MenuItems.Add(mi2);             mi2.MenuItems.Add(miChildA);             mi2.MenuItems.Add(miChildB);             miChildA.MenuItems.Add(miGrandChildA1);             miChildA.MenuItems.Add(miGrandChildA2);             miChildA.MenuItems.Add(miGrandChildA3);             miChildA.MenuItems.Add(miGrandChildA4);             miChildA.MenuItems.Add(miGrandChildA5);             miChildB.MenuItems.Add(miGrandChildB1);             miChildB.MenuItems.Add(miGrandChildB2);              // Event handler for the top left menu.             mi1.Click +=new EventHandler(mi1_Click);             // Event handlers for grandchild menu items. This code is commented out            // because this example does not define their event handling methods.             // miGrandChildA1.Click +=new EventHandler(miGrandChildA1_Click);             // miGrandChildB1.Click +=new EventHandler(miGrandChildB1_Click);             // miGrandChildB2.Click +=new EventHandler(miGrandChildB2_Click);             mi1.Text = "Map Help";             mi2.Text = "Maps";             miChildA.Text = "My Maps";             miChildB.Text = "Add and remove";             miGrandChildA1.Text = "Manhattan";             miGrandChildA2.Text = "Bronx";             miGrandChildA3.Text = "Brooklyn";             miGrandChildA4.Text = "Queens";             miGrandChildA5.Text = "Staten Island";             miGrandChildB1.Text = "Add map";             miGrandChildB2.Text = "Remove map";          &rightsign;         protected override void Dispose( bool disposing )         &leftsign;             base.Dispose( disposing );         &rightsign;          private void InitializeComponent()         &leftsign;             this.mainMenu1 = new System.Windows.Forms.MainMenu();             this.Menu = this.mainMenu1;             this.Text = "Form1";          &rightsign;          static void Main()         &leftsign;             Application.Run(new Form1());         &rightsign;          // The following method handles the         // Click event for the mi1 MenuItem.         private void mi1_Click(object sender, EventArgs e)         &leftsign;             MessageBox.Show("This is just a test.");         &rightsign;     &rightsign; &rightsign;

Compiling the Code

This example requires references to the following namespaces:

    *

      System
    *

      System.Windows.Forms

How to: Set Smartphone Input Modes

You can set the input mode for a TextBox in a Smartphone application to ABC, T9, and numeric input modes as defined by the InputMode enumeration. The InputModeEditor class provides access to Smartphone input methods for entering text.

The AlphaCurrent mode is the preferred input mode value for text boxes used for alpha characters. This mode matches the mode selected by holding down the star (*) key on the Smartphone.

You cannot use InputModeEditor to explicitly change casing settings for alpha input modes. However, the alpha input mode used (T9 or ABC) are retained by the AlphaCurrent input mode when set with the star key.

You can only use InputModeEditor on a Smartphone, and only with a TextBox control.
Example

The following code example shows setting the input mode on three text boxes: Name, Phone, and City. The Name and City text boxes are set with the AlphaCurrent input mode and the Phone text box is set with the Numeric input mode.

To observe how AlphaCurrent works, perform the following procedure:

   1.

      With the Name text box selected, hold down the star key and enter text using either the T9 or ABC input modes.
   2.

      Enter text in the City text box. Note that the input mode is the same as the Name text box.

Visual Basic

Imports System Imports System.Windows.Forms Imports Microsoft.WindowsCE.Forms    Public Class Form1    Inherits System.Windows.Forms.Form    Private mainMenu1 As System.Windows.Forms.MainMenu    Private mi1 As System.Windows.Forms.MenuItem        \’ Text box for name.    Private textBox1 As System.Windows.Forms.TextBox    \’ Text box for phone number.    Private textBox2 As System.Windows.Forms.TextBox    \’ Text box for city.    Private textBox3 As System.Windows.Forms.TextBox        \’ Labels for name, phone, and city    Private label1 As System.Windows.Forms.Label    Private label2 As System.Windows.Forms.Label    Private label3 As System.Windows.Forms.Label            Public Sub New()              InitializeComponent()              \’ Add a menu to close the application.       mi1 = New MenuItem()       mainMenu1.MenuItems.Add(mi1)       AddHandler mi1.Click, AddressOf mi1_Click       mi1.Text = "Done"              \’ Set input mode for name text box to AlphaCurrent.       InputModeEditor.SetInputMode(textBox1, InputMode.AlphaCurrent)              \’ Set input mode for phone number text box to Numeric.       InputModeEditor.SetInputMode(textBox2, InputMode.Numeric)       \’ Set input mode for city text box to AlphaCurrent.       InputModeEditor.SetInputMode(textBox3, InputMode.AlphaCurrent)    End Sub                 Protected Overrides Sub Dispose(disposing As Boolean)       MyBase.Dispose(disposing)    End Sub            Private Sub InitializeComponent()       Me.mainMenu1 = New System.Windows.Forms.MainMenu()              Me.mainMenu1 = New System.Windows.Forms.MainMenu()       Me.textBox1 = New System.Windows.Forms.TextBox()       Me.textBox2 = New System.Windows.Forms.TextBox()       Me.textBox3 = New System.Windows.Forms.TextBox()              Me.label1 = New System.Windows.Forms.Label()       Me.label2 = New System.Windows.Forms.Label()       Me.label3 = New System.Windows.Forms.Label()       \’       \’ textBox1       \’       Me.textBox1.Location = New System.Drawing.Point(64, 8)       Me.textBox1.Size = New System.Drawing.Size(104, 25)       Me.textBox1.Text = ""       \’       \’ textBox2       \’       Me.textBox2.Location = New System.Drawing.Point(64, 40)       Me.textBox2.Size = New System.Drawing.Size(104, 25)       Me.textBox2.Text = ""       \’       \’ textBox3       \’       Me.textBox3.Location = New System.Drawing.Point(64, 72)       Me.textBox3.Size = New System.Drawing.Size(104, 25)       Me.textBox3.Text = ""       \’       \’ label1       \’       Me.label1.Location = New System.Drawing.Point(8, 8)       Me.label1.Size = New System.Drawing.Size(56, 22)       Me.label1.Text = "Name"       \’       \’ label2       \’       Me.label2.Location = New System.Drawing.Point(8, 40)       Me.label2.Size = New System.Drawing.Size(56, 22)       Me.label2.Text = "Phone"       \’       \’ label3       \’       Me.label3.Location = New System.Drawing.Point(8, 72)       Me.label3.Size = New System.Drawing.Size(56, 22)       Me.label3.Text = "City"       \’       \’ Form1       \’       Me.Controls.Add(textBox1)       Me.Controls.Add(textBox2)       Me.Controls.Add(textBox3)       Me.Controls.Add(label1)       Me.Controls.Add(label2)       Me.Controls.Add(label3)       Me.Menu = Me.mainMenu1       Me.Text = "Input Mode Demo"    End Sub             Shared Sub Main()       Application.Run(New Form1())    End Sub            Private Sub mi1_Click(sender As Object, e As EventArgs)       Me.Close()    End Sub End Class

C#

using System; using System.Drawing; using System.Collections; using System.Windows.Forms; using Microsoft.WindowsCE.Forms;  public class Form1 : System.Windows.Forms.Form &leftsign;  private System.Windows.Forms.MainMenu mainMenu1;  private System.Windows.Forms.MenuItem mi1;   // Text box for name.  private System.Windows.Forms.TextBox textBox1;  // Text box for phone number.  private System.Windows.Forms.TextBox textBox2;  // Text box for city.  private System.Windows.Forms.TextBox textBox3;   // Labels for name, phone, and city  private System.Windows.Forms.Label label1;  private System.Windows.Forms.Label label2;  private System.Windows.Forms.Label label3;   public Form1()  &leftsign;    InitializeComponent();    // Add a menu to close the application.   mi1 = new MenuItem();   mainMenu1.MenuItems.Add(mi1);   mi1.Click +=new EventHandler(mi1_Click);   mi1.Text = "Done";    // Set input mode for name text box to AlphaCurrent.   InputModeEditor.SetInputMode(textBox1, InputMode.AlphaCurrent);    // Set input mode for phone number text box to Numeric.   InputModeEditor.SetInputMode(textBox2, InputMode.Numeric);    // Set input mode for city text box to AlphaCurrent.   InputModeEditor.SetInputMode(textBox3, InputMode.AlphaCurrent);    &rightsign;   protected override void Dispose( bool disposing )  &leftsign;   base.Dispose( disposing );  &rightsign;   private void InitializeComponent()  &leftsign;   this.mainMenu1 = new System.Windows.Forms.MainMenu();    this.mainMenu1 = new System.Windows.Forms.MainMenu();   this.textBox1 = new System.Windows.Forms.TextBox();   this.textBox2 = new System.Windows.Forms.TextBox();   this.textBox3 = new System.Windows.Forms.TextBox();    this.label1 = new System.Windows.Forms.Label();   this.label2 = new System.Windows.Forms.Label();   this.label3 = new System.Windows.Forms.Label();   //   // textBox1   //   this.textBox1.Location = new System.Drawing.Point(64, 8);   this.textBox1.Size = new System.Drawing.Size(104, 25);   this.textBox1.Text = "";   //   // textBox2   //   this.textBox2.Location = new System.Drawing.Point(64, 40);   this.textBox2.Size = new System.Drawing.Size(104, 25);   this.textBox2.Text = "";   //   // textBox3   //   this.textBox3.Location = new System.Drawing.Point(64, 72);   this.textBox3.Size = new System.Drawing.Size(104, 25);   this.textBox3.Text = "";   //   // label1   //   this.label1.Location = new System.Drawing.Point(8, 8);   this.label1.Size = new System.Drawing.Size(56, 22);   this.label1.Text = "Name";   //   // label2   //   this.label2.Location = new System.Drawing.Point(8, 40);   this.label2.Size = new System.Drawing.Size(56, 22);   this.label2.Text = "Phone";   //   // label3   //   this.label3.Location = new System.Drawing.Point(8, 72);   this.label3.Size = new System.Drawing.Size(56, 22);   this.label3.Text = "City";   //   // Form1   //   this.Controls.Add(this.textBox1);   this.Controls.Add(this.textBox2);   this.Controls.Add(this.textBox3);   this.Controls.Add(this.label1);   this.Controls.Add(this.label2);   this.Controls.Add(this.label3);   this.Menu = this.mainMenu1;   this.Text = "Input Mode Demo";   &rightsign;   static void Main()  &leftsign;   Application.Run(new Form1());  &rightsign;   private void mi1_Click(object sender, EventArgs e)  &leftsign;   this.Close();  &rightsign; &rightsign;

Compiling the Code

This example requires references to the following namespaces:

    *

      System
    *

      System.Windows.Forms

How to: Scroll a Form of Labels

Because a Label control does not receive the focus and does not support tabbing, a Smartphone application of only Label controls does not allow the user to navigate to labels beyond the visible client area of the form. The user of a Pocket PC application can tap the scroll bars to navigate, but this capability is not available on the Smartphone.

You can implement navigation by providing code in the event handler for the KeyDown event that adjusts the AutoScrollPosition property.
To scroll a form of Label controls

   1.

      Add several Label controls to the form so that some are below the visible client area. Use arrow keys in the Microsoft Visual Studio 2005 designer or write initialization code to position them.
   2.

      In the form\’s constructor, set the KeyPreview and AutoScroll properties to true. C# users must attach a delegate for the KeyDown event handler.
      Visual Basic

      Me.KeyPreview = True Me.AutoScroll = True

      C#

      this.KeyPreview = true;             this.KeyDown += new KeyEventHandler(Form1_KeyDown);             this.AutoScroll = true;

   3.

      Set the AutoScrollPosition property to move vertically by a set number of pixels for the y point coordinate. The following code example uses 16. Note that the code is complex because AutoScrollPosition is offset by negative values, but the provided point values must be expressed as positive.
      Visual Basic

      Private Sub Form1_KeyDown(ByVal Sender As System.Object, _     ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown     If e.KeyCode = System.Windows.Forms.Keys.Up Then         Me.AutoScrollPosition = New Point(0, -Me.AutoScrollPosition.Y – 16)     End If     If e.KeyCode = System.Windows.Forms.Keys.Down Then         Me.AutoScrollPosition = New Point(0, -Me.AutoScrollPosition.Y + 16)     End If End Sub

      C#

      private void Form1_KeyDown(object sender, KeyEventArgs e) &leftsign;     if ((e.KeyCode == System.Windows.Forms.Keys.Up))     &leftsign;         this.AutoScrollPosition = new Point(0, -this.AutoScrollPosition.Y – 16);     &rightsign;     if ((e.KeyCode == System.Windows.Forms.Keys.Down))     &leftsign;         this.AutoScrollPosition = new Point(0, -this.AutoScrollPosition.Y + 16);     &rightsign;

Compiling the Code

This example requires references to the following namespaces:

    *

      System
    *

      System.Windows.Forms

How to: Override the Smartphone Back Key

NoteNote

Note that back key functionality is critical for navigating between Smartphone applications. In most cases, it is contrary to Smartphone user interface guidelines to alter the default navigation behavior of the back key. Use discretion in determining when to override this functionality.

You can customize the back key in Smartphone applications, such as for a game. It operates according depending on the context of the key press, as described in the following table.
Back Key Operation  Context

Cancels modal dialog boxes.
 

Always.

Cancels shortcut menus.
 

Always.

Performs a backspace operation.
 

When the focus is on an editable control, such as a text box, or on an editable custom control.

Navigates to the next window in the z-order.

Note that when the focus is on a form or custom control, the back key raises a KeyPress event that you can handle to provide your own functionality, as demonstrated in the example.

If you do not handle the event, the focus navigates to the next window in the z-order.
 

When the focus is on a form, non-editable control (such as a radio button), or non-editable custom control.

The back key operates the same way regardless of whether there is a menu bar. A menu bar exists if the form contains a MainMenu component.
Example

The following code example shows how to implement custom back key functionality. When the back key is pressed on a form or custom control, it raises the KeyPress event with the KeyChar value equal to the ESC key (27). In the event handling code, determine whether the ESC key value was raised. If it was, cancel the default back key operation by setting the Handled property to true. If the event arguments are not handled, the back key navigates to the next window in the z-order.

Visual C# users need to define an event hander for the KeyPress event in the form\’s constructor.
C#

// Connect an event handler to the KeyPress event this.KeyPress += new KeyPressEventHandler(OnKeyPress);

Visual Basic

Private Sub keypressed(ByVal o As [Object], _     ByVal e As KeyPressEventArgs) Handles MyBase.KeyPress     \’ Determine if ESC key value is raised.     If e.KeyChar = ChrW(Keys.Escape) Then         \’ Handle the event to provide your own functionality.         e.Handled = True          \’ Add  your event handling code here.         MsgBox("Custom back key functionality.")     End If End Sub

C#

private void OnKeyPress(object sender, KeyPressEventArgs ke) &leftsign;     // Determine if ESC key value is pressed.     if (ke.KeyChar == (Char)Keys.Escape)     &leftsign;         // Handle the event to provide functionality.         ke.Handled = true;          // Add your event handling code here.         MessageBox.Show("Back key was pressed.");     &rightsign; &rightsign;

Compiling the Code

This example requires references to the following namespaces:

    *

      System
    *

      System.Windows.Forms

标签:, , , , ,

1014 WM_DEVICECHANGE GUID OK 2 - 三月 25, 2007 by yippee

1014 WM_DEVICECHANGE GUID OK 2

终于搞定了USB PHONE的热插拔检测。原来是GUID的问题

Pay extra attention to line 8. the NotificationFilter.dbcc_classguid. From Doron Holan\’s blog

A PnP device is typically associated with two different GUIDs, a device interface GUID and a device class GUID.

A device class GUID defines a broad category of devices. If you open up device manager, the default view is "by type." Each type is a device class, where each class is uniquely ID\’s by the device class GUID. A device class GUID defines the icon for the class, default security settings, install properties (like a user cannot manually install an instance of this class, it must be enumerated by PNP), and other settings. The device class GUID does not define an I/O interface (see Glossary), rather think of it as a grouping of devices. I think a good clarifying example is the Ports class. Both COM and LPT devices are a part of the Ports class, yet each has its own distinct I/O interface which are not compatible with each other. A device can only belong to one device class. The device class GUID is the GUID you see at the top of an INF file.

A device interface GUID defines a particular I/O interface contract. It is expected that every instanceof the interface GUID will support the same basic set of I/Os. The device interface GUID is what the driver will register and enable/disable based on PnP state. A device can register many device interfaces for itself, it is not limited to one interface GUID. If need be, the device can even register multiple instances of the same GUID (assuming each have their own ReferenceString), although I have never seen a real world need for this. A simple I/O interface contract is the keyboard device interface to the raw input thread. Here is the keyboard device contract that each instance of the keyboard device interface GUID must support.

You can see the current list of device classes and device interface classes at the following registries

\\\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Class

\\\\HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\DeviceClasses

A list of common device interface class GUIDs are listed as follows:

Device Interface Name GUID
USB Raw Device &leftsign;a5dcbf10-6530-11d2-901f-00c04fb951ed&rightsign;
Disk Device &leftsign;53f56307-b6bf-11d0-94f2-00a0c91efb8b&rightsign;
Network Card &leftsign;ad498944-762f-11d0-8dcb-00c04fc3358c&rightsign;
Human Interface Device (HID) &leftsign;4d1e55b2-f16f-11cf-88cb-001111000030&rightsign;
Palm &leftsign;784126bf-4190-11d4-b5c2-00c04f687a67&rightsign;

It seems by using the dbcc_name, we can know what device has been plugged into the system. Sadly, the answer is NO, dbcc_name is for OS internal use and is an identity, it is not human readable. A sample of dbcc_name is as follows:

\\\\?\\USB#Vid_04e8&Pid_503b#0002F9A9828E0F06#&leftsign;a5dcbf10-6530-11d2-901f-00c04fb951ed&rightsign;

\\\\?\\USB: USB means this is a USB device class
Vid_04e8&Pid_053b: Vid/Pid is VendorID and ProductID (but this is device class specific, USB use Vid/Pid, different device classes use different naming conventions)
002F9A9828E0F06: seems to be a unique ID (not sure about how this got generated)
&leftsign;a5dcbf10-6530-11d2-901f-00c04fb951ed&rightsign;: the device interface class GUID
Now, by using these decoded information, we can get the device description or device friendly name by two methods:

Read the registry directly: for our example dbcc_name, it will be, \\\\HKLM\\SYSTEM\\CurrentControlSet\\Enum\\USB\\Vid_04e8&Pid_503b\\0002F9A9828E0F06 
Use SetupDiXxx

所以最终的代码:
static const GUID GUID_DEVINTERFACE_LIST[] =
&leftsign;
 // GUID_DEVINTERFACE_USB_DEVICE
 // &leftsign; 0xA5DCBF10, 0×6530, 0×11D2, &leftsign; 0×90, 0×1F, 0×00, 0xC0, 0×4F, 0xB9, 0×51, 0xED &rightsign; &rightsign;,

 // GUID_DEVINTERFACE_DISK
 // &leftsign; 0×53f56307, 0xb6bf, 0×11d0, &leftsign; 0×94, 0xf2, 0×00, 0xa0, 0xc9, 0×1e, 0xfb, 0×8b &rightsign; &rightsign;,

 // GUID_DEVINTERFACE_HID,
 &leftsign; 0×4D1E55B2, 0xF16F, 0×11CF, &leftsign; 0×88, 0xCB, 0×00, 0×11, 0×11, 0×00, 0×00, 0×30 &rightsign; &rightsign;,
   
 // GUID_NDIS_LAN_CLASS
 // &leftsign; 0xad498944, 0×762f, 0×11d0, &leftsign; 0×8d, 0xcb, 0×00, 0xc0, 0×4f, 0xc3, 0×35, 0×8c &rightsign; &rightsign;

 //// GUID_DEVINTERFACE_COMPORT
 //&leftsign; 0×86e0d1e0, 0×8089, 0×11d0, &leftsign; 0×9c, 0xe4, 0×08, 0×00, 0×3e, 0×30, 0×1f, 0×73 &rightsign; &rightsign;,

 //// GUID_DEVINTERFACE_SERENUM_BUS_ENUMERATOR
 //&leftsign; 0×4D36E978, 0xE325, 0×11CE, &leftsign; 0xBF, 0xC1, 0×08, 0×00, 0×2B, 0xE1, 0×03, 0×18 &rightsign; &rightsign;,

 //// GUID_DEVINTERFACE_PARALLEL
 //&leftsign; 0×97F76EF0, 0xF883, 0×11D0, &leftsign; 0xAF, 0×1F, 0×00, 0×00, 0xF8, 0×00, 0×84, 0×5C &rightsign; &rightsign;,

 //// GUID_DEVINTERFACE_PARCLASS
 //&leftsign; 0×811FC6A5, 0xF728, 0×11D0, &leftsign; 0xA5, 0×37, 0×00, 0×00, 0xF8, 0×75, 0×3E, 0xD1 &rightsign; &rightsign;
&rightsign;;
void RegisterForDevChange(HWND hDlg, PVOID *hNotifyDevNode)
&leftsign;
 // HDEVNOTIFY hDevNotify;
 //    DEV_BROADCAST_DEVICEINTERFACE NotificationFilter;
 //    ZeroMemory( &NotificationFilter, sizeof(NotificationFilter) );
 //    NotificationFilter.dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
 //    NotificationFilter.dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
 // for(int i=0; i<sizeof(GUID_DEVINTERFACE_LIST)/sizeof(GUID); i++) &leftsign;
 //  NotificationFilter.dbcc_classguid = GUID_DEVINTERFACE_LIST[i];
 //  hDevNotify = RegisterDeviceNotification(hDlg, &NotificationFilter, DEVICE_NOTIFY_WINDOW_HANDLE);
 //  if( !hDevNotify ) &leftsign;
 //   AfxMessageBox(CString("Can\’t register device notification: ") );
 //   return ;
 //  &rightsign;
 // &rightsign;

[hide] www.yippeesoft.com [/hide]

标签:, , ,
1013 WM_DEVICECHANGE GUID OK 1 - 三月 24, 2007 by yippee

1013 WM_DEVICECHANGE GUID OK 1

终于搞定了USB PHONE的热插拔检测。原来是GUID的问题

原来的代码是:

DEV_BROADCAST_DEVICEINTERFACE *pFilterData =
  (DEV_BROADCAST_DEVICEINTERFACE*)
  _alloca(sizeof(DEV_BROADCAST_DEVICEINTERFACE));
    ASSERT (pFilterData);
 
 UUID GUID_CLASS_INPUT;        
 UuidFromString((unsigned char*)"4D1E55B2-F16F-11CF-88cb-001111000030", &GUID_CLASS_INPUT);
  
    ZeroMemory(pFilterData, sizeof(DEV_BROADCAST_DEVICEINTERFACE));
 
    pFilterData->dbcc_size = sizeof(DEV_BROADCAST_DEVICEINTERFACE);
    pFilterData->dbcc_devicetype = DBT_DEVTYP_DEVICEINTERFACE;
    pFilterData->dbcc_classguid  = GUID_CLASS_INPUT;
 /*
 USB dbcc_classguid  :&leftsign;36FC9E60-C465-11CF-8056-444553540000&rightsign;
 可以在注册表中查询 HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Enum\\USB\\ROOT_HUB
 此键值下面有你的设备列表你可以查到的,只能用那个*/
 
    *hNotifyDevNode = RegisterDeviceNotification(hDlg, pFilterData, DEVICE_NOTIFY_WINDOW_HANDLE);

从注册表来看也是如此:
[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Enum\\USB\\Vid_6993&Pid_b001\\5&248b3ac&0&1]
"DeviceDesc"="USB Composite Device"
"LocationInformation"="VOIP USB Phone           "
"Capabilities"=dword:00000084
"UINumber"=dword:00000000
"ClassGUID"="&leftsign;36FC9E60-C465-11CF-8056-444553540000&rightsign;"
"Class"="USB"
"Driver"="&leftsign;36FC9E60-C465-11CF-8056-444553540000&rightsign;\\\\0023"
"Mfg"="(标准 USB 主控制器)"
"Service"="usbccgp"
"ConfigFlags"=dword:00000000
"ParentIdPrefix"="6&354c7d77&0"

[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Enum\\USB\\Vid_6993&Pid_b001&MI_00\\6&354c7d77&0&0000]
"DeviceDesc"="USB Audio Device"
"Capabilities"=dword:000000a4
"UINumber"=dword:00000000
"ClassGUID"="&leftsign;4D36E96C-E325-11CE-BFC1-08002BE10318&rightsign;"
"Class"="MEDIA"
"Driver"="&leftsign;4D36E96C-E325-11CE-BFC1-08002BE10318&rightsign;\\\\0029"
"Mfg"="(通用 USB 音频)"
"Service"="usbaudio"
"ConfigFlags"=dword:00000000

[HKEY_LOCAL_MACHINE\\SYSTEM\\ControlSet001\\Enum\\USB\\Vid_6993&Pid_b001&MI_03\\6&354c7d77&0&0003]
"DeviceDesc"="USB 人体学输入设备"
"LocationInformation"="VOIP USB Phone 䐀ȅఅ慆硴⮀歶耀"
"Capabilities"=dword:00000084
"UINumber"=dword:00000000
"ClassGUID"="&leftsign;745A17A0-74D3-11D0-B6FE-00A0C90F57DA&rightsign;"
"Class"="HIDClass"
"Driver"="&leftsign;745A17A0-74D3-11D0-B6FE-00A0C90F57DA&rightsign;\\\\0000"
"Mfg"="(标准系统设备)"
"Service"="HidUsb"
"ConfigFlags"=dword:00000000
"ParentIdPrefix"="7&32b06744&2"

[hide] www.yippeesoft.com [/hide]

标签:, , ,
TortoiseCVS 用户手册UserGuide_cn.CHM - 七月 19, 2005 by yippee

昨天给TCVS作者发了一份EMAIL,询问了一下翻译事宜,对方回答if you
create a CHM version of your Chinese user guide, I will be happy to add
it to the distribution. 我就开始做了,不过他好像提到:the
English and French user guides are created from an XML file, which is
processed by a toolchain in order to produce CHM.

我不明白这些东东,继续按照我的既定步骤开始www.yippeesoft.com

1、反编译 UserGuide_en.chm 利用HH.EXE反编译: 用法:c:\\windows\\hh.exe -decompile 源文件的保存路径 要反编译的chm 也可以 HTML Help Workshop

2、Microsoft Office FrontPage 2003 编辑HTML文件,将翻译文本替换英文文本,所有连接的地方保留因为文本,刚开始忘了修改TITLE标题,结果CHM目录显示的还是英文。只好又修改了一遍

3、用CHM制作软件,HTML Help Workshop好像太麻烦了。试验了 www.yippeesoft.com

htm2chm is a useful program that allows you to convert html pages with graphics as well as whole sites (for example, retrieved by offline browsers) into a single CHM file. 但是好像太简单了,什么东西都不能设置

WekaSoft Visual CHM v4.3 Visual CHM 将帮助您非常容易的制作出具有非常专业水准的CHM文件,而且是“所见即所得”。 好像比较容易非法错误,致命的一点是我生成不了CHM文件,总是出错;而且TCVS的HTML文件编码很奇怪 例如 <title>
&#31532;&#19968;&#31456;. &#20837;&#38376;</title>  第一章. 入门 ,它就没有办法认识

最后使用 EasyCHM是国华软件推出的一款强大的CHM电子书或CHM帮助文件的快速制作工具。这个不错,简单方便快捷,但是好像图片总是显示不了,因为HTML文件调用的图片在IAMGES目录下,而它好像是把它弄到了根目录,最后利用它去掉 CHM 设置-常规-自动删除在CHM的生成过程中产生的HHP/HHC/HHK文件选项,再把 html.HHP 文件 用 HTML Help Workshop 打开,然后再 change project option,在option -COMPLIER里面的 DON\’T INCLUDE FOLDERS IN COMPILED FILE选项去除掉,这下生成的CHM文件正常了。可以显示图片了。www.yippeesoft.com

最开始碰到HTML不能显示图片的问题的时候,试图把HTML转换成为MHT文件,呵呵,最后生成的CHM文件居然有33M?!

试验了两种编程方法:www.yippeesoft.com

WebBrowser1.Navigate "127.0.0.1"
WebBrowser1.ExecWB OLECMDID_SAVEAS, OLECMDEXECOPT_DONTPROMPTUSER, "4", "c:\\1.mht" 试图采用WEBBROWSER进行另存

Dim message As New CDO.message
Dim Outstream As ADODB.Stream
Dim ii As String
ii = Dir("P:\\html\\html\\*.html")
While ii <> ""
    Call message.CreateMHTMLBody("file://P:/html/html/" + ii, CDO.CdoMHTMLFlags.cdoSuppressNone, "", "")
    Set Outstream = message.GetStream
    Call Outstream.SaveToFile("P:\\html\\1\\" + Left(ii, Len(ii) – 4) + "mht", ADODB.SaveOptionsEnum.adSaveCreateOverWrite)
    ii = Dir
Wend
在工程中必须要引用一个库:www.yippeesoft.com
Library CDO  D:\\WINNT\\System32\\cdosys.dll
Microsoft CDO for Windows 2000 Library
其次,需要Stream对应的接口的支持,如果你一时找不到就使用支持这个的较新的ADO就行了,如
Library ADODB  D:\\Program Files\\Common Files\\system\\ado\\msado15.dll
Microsoft ActiveX Data Objects 2.5 Library

最新版本的TCVS集成了我翻译的用户手册

标签:, , , ,
Dietary Guidelines for Americans美国饮食指导3 - 七月 2, 2005 by yippee

6. Choose a diet moderate in salt and sodium. This can be accomplished by learning to enjoy the flavors of unsalted foods, adding little or no salt during cooking or at the table, flavoring foods with herbs or spices, and limiting intake of foods that are obviously salty or contain significant amounts of hidden salt. (The relationship between sodium intake and high blood pressure is discussed later in this chapter.)

选择适中的含盐和钠的食品。学习享用新鲜食物的自然风味,在烹制和食用的时候、用药草或者香料调味食品的时候,少加盐或不加盐.以及减少摄入明显比较咸的食物,或者 www.yippeesoft.com ?关于钠摄入量和高血压病的关系将在本章稍后讨论

7. If you drink alcoholic beverages, do so in moderation. Alcohol itself contains seven calories per gram, and alcoholic beverages provide contain few or no nutrients. Moderate drinking (no more than one drink per day for women and two drinks per day for men) is associated with a lower-than-average risk of coronary heart disease, but higher levels of alcohol intake increase the risk of high blood pressure and stroke and can cause many other problems. Complete abstention is advisable for women who are pregnant or trying to conceive and for people planning to drive a car, engage in another activity that requires attention or skill, or use medications that can enhance alcohol\’s effects.

喝酒请适度,每克酒精7卡路里,并且酒精饮品没有什么营养。适度饮酒,男人每天不超过两次,女人不超过一次,可以使冠状心脏病发生概率低于平均水平。如果超过这个限度,那么将引发高血压以及其他一些问题。以下人等应该完全节制:孕妇、准备怀孕的女性、准备开车的人、从事需要集中注意力工作的人,或者正在服药,而药会增强酒精作用的人。www.yippeesoft.com

Single copies of Nutrition and Your Health: Dietary Guidelines for Americans (HG 232, 1995) are available for 50¢ from the Consumer Information Center, Department 378-C, Pueblo, CO 81009. Detailed suggestions for implementing the guidelines are included in Dietary Guidelines and Your Diet (HG-252, 1992), available from the Superintendent of Documents, U.S. Government Printing Office, Washington, DC 20402. They are also available online.

关于营养和健康的??:美国食品指南在消费者信息中心用50美分购买,具体实施的详细条款在 饮食指导和你的食物 这本,可以从文档负责人那里获得,美国政府印刷所办公室。你也可以在线获得。www.yippeesoft.com

标签:, , , , ,
Dietary Guidelines for Americans美国饮食指导2 - 七月 2, 2005 by yippee

Dietary Guidelines for Americans 美国饮食指导www.yippeesoft.com
2. Balance the food you eat with physical activity — maintain or improve your weight. Obesity is associated with many serious illnesses. Being too thin is linked to osteoporosis in women. For those who are overweight, the recommended loss of 1/2 to 1 pound per week should be accomplished by increasing physical activity and eating less fatty foods; more fruits, vegetables and cereals; less sugar and sweets; and little or no alcohol.

均衡的饮食和身体运动可以保持或者改善你的体重,肥胖往往和一些重大疾病有关。而对于女性而言,过于苗条往往意味着骨质疏松。对于那些超重的人来说,如果逐渐增加运动量和减少施用高脂肪食物,那么每周将会减少0.5到1磅;多吃水果和蔬菜,少吃甜食和糖果,最好不要喝酒。www.yippeesoft.com

3. Choose a diet with plenty of grain products, vegetables, and fruits. Most of the calories in the diet should come from these foods, which also are low in fat and provide fiber. The daily average for adults should include at least six servings of grain products, three servings of vegetables, and two servings of fruit. Because foods differ in the kinds of fiber they contain, it is best to include a variety of fiber-rich foods. Fiber should be obtained from foods, not supplements.

选择多吃谷类食物、水果、蔬菜,这些食物可以提供大部分能量来源卡路里,并且低脂肪高纤维。成人每天平均应该包括六份谷类、三份蔬菜、两份水果。各种不同的食物含有不同的纤维,所以最好食用多种高纤维食品。纤维可以从食物中获取,不需要补充。www.yippeesoft.com

我一直翻译不好 servings ,在SOHU看到:Nutrition FactsServing Size 5 pieces (55 g)Servings Per Container About 5 翻译为中文 营养明细每份五片(55克)每包约5份

low in fat and provide fiber 我差点翻译成为中文 保持苗条www.yippeesoft.com

4. Choose a diet low in fat, saturated fat, and cholesterol. Diets low in fat are associated with a lower risk of heart disease and certain cancers. The recommended limits are a fat intake of no more than 30% of calories, with less than 10% of the calories as saturated fat, and no more than 300 mg of cholesterol daily.

应该选择低脂肪、饱和脂肪、胆固醇的食物。低脂肪食物可以降低得心脏病和一些癌症的风险。建议每天不得超过300毫克的胆固醇,脂肪提供的卡路里不能超过30%,饱和脂肪的要少于10%。www.yippeesoft.com

5. Choose a diet moderate in sugars. The only legitimate concern with sugar consumption is tooth decay. However, the risk of tooth decay does not depend simply on the amount of sugar consumed but on the frequency of consumption of sugars and starches and how long they remain in contact with the teeth. Frequent eating of foods high in sugars and starches may be more harmful to teeth than eating them at meals and then brushing. Regular daily dental hygiene, including brushing, flossing, and an adequate intake of fluoride, will help prevent tooth decay. Children who live in communities whose water is not fluoridated should take a fluoride supplement. Individuals whose caloric needs are low should be cautious about eating high-sugar foods that contain unnecessary calories and few nutrients.

请选择中糖食品。食糖过多导致牙齿损坏。牙病的风险不是简单的因为摄入糖份的多少,还与食用糖、淀粉的频率有关,以及这些东西在牙齿保留的时间有关。经常吃高糖淀粉的食物对牙齿损坏很大,最好在饭间食用并饭后刷牙。定期作口腔卫生清理。包括刷牙、牙线、适量的氟。将有效的防止牙病。如果小孩子居住的地方公共饮用水中没有加F,那么应该适度补充。每个人需要的卡路里不是很高的,请谨慎食用高糖食品,它包含多余的卡路里和很少的营养。www.yippeesoft.com

标签:, , , , ,
Dietary Guidelines for Americans美国饮食指导1 - 七月 1, 2005 by yippee

Dietary Guidelines for Americans 美国饮食指导www.yippeesoft.com
Although early versions of food-group systems provided practical guidelines for avoiding nutrient deficiencies, they did not directly address the prevention of other diet-related health problems. To deal with this matter, the U.S. Department of Agriculture and the U.S. Department of Health and Human Services have published Dietary Guidelines for Americans to help individuals meet nutrient requirements, promote health, support active lives, and reduce chronic disease risks. The current (1995) report notes that eating is one of life\’s great pleasures, but that diet is important to health at all stages of life. The Dietary Guidelines apply to food intake over several days and not to single meals or foods. They are:

尽管早期的食品组织已经为了避免营养不良而提供了实际可行的指导方针,但是这些还不能直接预防其他和食品相关的健康问题。为了处理这些问题,美国农业部门、美国健康和公共事业部门发布了美国饮食指导,以帮助那些有如下需求的人:营养需求、促进健康、积极生活、降低慢性病风险,1995年报告指出:吃是生活中最重要的事情。通常所吃的食物在人的整个生命周期中对健康有重大影响。饮食指导方针应用于一段时间之类的食物摄入量,而不是仅对于个别的食物或膳食。www.yippeesoft.com

1. Eat a variety of foods. No single food can supply all the nutrients in needed amounts. To ensure variety and a well-balanced diet, choose foods each day from the five major food groups displayed in the Food Guide Pyramid: vegetables (3-5 servings); fruits (2-4 servings); breads, cereals, rice, and pasta (6-11 servings); milk, yogurt, and cheese (2-3 servings); and meat, poultry, fish, dry beans, eggs, and nuts (2-3 servings). Since foods within each group vary somewhat in nutrient content, it is best to vary one\’s choices within each group. Vitamin or mineral supplements at or below the RDA are safe but rarely needed by people who eat an appropriate variety of foods. Supplements may be appropriate for certain people, but they are not a substitute for proper food choices.

吃的食物要多样化。没有一种食物能够提供一个人所必须的所有营养。为了保证多样性和营养均衡性,每天应该从食物指南金字塔中的五种主要食品类别挑选食物:蔬菜;水果;面包、谷类、米饭、以及面食;牛奶、酸奶酪、干酪;肉类、家禽、鱼、干豆、蛋;坚果。由于每种食物类别含有不同的营养成份,所以最好每种食物类别交叉搭配。维生素和矿物质补充量在符合日推荐摄食量或者以下都是安全的,很少有平时饮食合理搭配适度变化的人需要补充。补充只是适应于某些人,但是绝对不能替换正确的食物选择。www.yippeesoft.com

美国的巴瑞特医师被认为是江湖郎中的克星,“我认为近10年来,江湖郎中越来越多,而且增加之快是现代史上前所未见。本世纪需要监视的江湖郎中源源不绝。”只要人类想治病,就总有人提供万灵丹药。时代突飞猛进,如今要找江湖郎中只需用鼠标一点,网络中散布着提供各种治疗的网站。巴瑞特医师在1995年设立Quackwatch.corn网站,他的任务就是揭发那些江湖郎中,他们推销缺乏充分科学证据且未经实验的治疗手段。在巴瑞特医师看来,江湖郎中涉及保健领域和营养食品的夸大宣传,有些非常离谱,而许多江湖郎中都是从卖营养食品起家。
全球最佳健康网站的热门指数
美国《新闻与世界报道》杂志评出了“最佳健康类网站50佳”,最佳理由:识别江湖郎中的疗法是否有效并非易事,但斯蒂芬·巴瑞特会帮忙。这位已退休的心理学家曾因揭露虚假疗法,获得了食品与药物管理署颁发的奖章。他对非传统疗法如芳香疗法、磁石疗法和指触疗法进行了评论。

标签:, , , , ,
TortoiseCVS User’s Guide翻译-沙盒 - 六月 30, 2005 by yippee

Sandboxes 沙盒
CVS has a unique method of working from most other version control systems in that developers can edit the same files concurrently. First you Checkout a version of the source code from the repository into a local copy on your computer. This local copy is called a sandbox.

CVS与其他大多数版本控制系统与众不同的地方在于它允许开发者同时编辑同一个文件,首先你应该从仓库取出一份源码拷贝到你的本地计算机www.yippeesoft.com,这份本地拷贝称之为沙盒。

You then simply edit the files that you want to change. You can Add new files or remove files you no longer require. When you\’re done you Commit the changes to the repository.

然后你仅仅修改你想要修改的部分,你可以添加新文件或者移除一些你已经不再需要的文件,当你整理完后你应该提交你的这些修改到CVS仓库中去。

If someone else has changed the same file while you were working on it, then the commit will fail. You must then Update all your source code files from the repository. This will automatically merge the other developers changes into your copy of the file.

当你编辑修改一份文件的时候,如果有人已经对这份文件做了修改,那么你的提交将会失败,你必须重新从CVS仓库中更新所有你的源代码,CVS将自动合并其他用户的修改到你的本地拷贝文件中。www.yippeesoft.com

Sometimes CVS cannot do this automatically, for example if you both changed the same line of code. This is called a Conflict. Conflicts happen much less often than you might expect. CVS puts both versions of the conflicting code in the file, with markings separating them. Then you manually edit the file to resolve the conflict before you can commit the changes.

有时候CVS将无法自动完成这个操作,例如,如果你们修改的是同一行代码,我们称之为冲突,你大可不必过于担忧,冲突出现的次数将大大少于你的预期,CVS将把版本的冲突代码合并在一起,通过标志进行分隔,你应该手工编辑文件,解决冲突的地方,然后再提交这些修改。www.yippeesoft.com

This method of working has lots of advantages. Each developer lives in a sandbox. Changes that another developer makes are isolated from you until you want to check in your changes. It stops bottlenecks where people cannot do things because someone else has the file checked out. Any developer can work on files without direct access to the server, they only need to connect to update or commit.

这种工作方式有很大的优越性,每个开发员都工作于一个沙盒之中。其他开发员所作的修改与你无关,除非你提交你的修改的时候,这样我们就突破了一个瓶颈:如果有人将一个文件取出了,其他人将无法对这个文件作任何操作。每一个开发员不需要连接到服务器上直接存取文件,他们只需要在更新和提交的时候再连接服务器。

VSS这点就很讨厌,一个人CHECK OUT,文件就被锁定了,如果他只是更新而没有CHECK IN的话,那么这个文件别人永远动不了,还得一个一个找过去看是谁没有签入。

标签:, , , , ,
TortoiseCVS User’s Guide翻译2TCVS简介3从何开始 - 六月 29, 2005 by yippee

What is TortoiseCVS?

TortoiseCVS简介 Tortoise 的意思是 乌龟 :)www.yippeesoft.com

TortoiseCVS is a front-end client to make using CVS easier and more intuitive. It allows developers to work with files controlled by CVS directly from Windows Explorer?.

TCVS是一个彻头彻尾的CVS客户端程序,它让CVS使用变得非常简易和直观。它允许开发者直接通过WINDOWS的资源管理器使用CVS对文件进行版本控制。www.yippeesoft.com

One of the major drawbacks of CVS is the command-line interface that is provided. Many developers today are becoming more accustomed to the graphical integrated development environments (IDEs). TortoiseCVS aims to provide that "point-and-click" environment in a clever and intuitive way.

CVS使用上一个主要的障碍就是它提供的是命令行接口。如今的许多开发者越来越习惯图形开发环境,TCVS就能够提供一个提供灵巧直观的 点击 环境。www.yippeesoft.com

Note that TortoiseCVS is a CVS client, not a server. This document assumes that you either know how to set up your own server, or that you are using a server that somebody else set up. If you want to learn about setting up a CVS server, see Chapter 8, Resources.

请注意:TCVS是一个CVS客户端,不是一个服务器端,本文档假设您满足如下两个条件之一:您知道如果架设自己的服务器端;或者已经有人架设了服务器端,而您正在使用。请见 第八章:资源。www.yippeesoft.com

Where to Begin? 从何开始
The best way to learn how to use TortoiseCVS is to play with it. Start by installing ortoiseCVS. 学习如何使用TCVS的最好方法就是开始使用它,首先安装TCVS

If you are new to CVS start following along with Basic Usage of TortoiseCVS. 如果你刚刚开始学习CVS,那么请从TCVS基本用法开始www.yippeesoft.com

Once you\’ve learned the ropes check out the advanced features in Advanced Usage of TortoiseCVS. 如果您已经学完了基本的,那么请从 TCVS高级指南 处学习高级技巧。

For pure reference, the chapters Command Reference for TortoiseCVS and Dialog Reference for TortoiseCVS will help you get the most out of TortoiseCVS. 纯粹作为参考,您可以从 TCVS命令行列表和对话框列表 获得更多信息www.yippeesoft.com

And finally checkout Articles, Tips and Tricks for a complete and enjoyable version control experience. 最后,您可以看看 条款、技巧、窍门,作为结束,祝您有一个愉快的版本控制体验。

标签:, , , , ,
TortoiseCVS User’s Guide翻译1CVS简介 - 六月 28, 2005 by yippee

What is CVS? CVS简介

CVS, or the Concurrent Versioning System, is a version control system. Version control systems are generally used as part of the software development cycle to track and co-ordinate source code changes among a team of developers.

CVS,并发版本系统,是一个版本控制系统,它通常作为软件开发周期的一部分,用来跟踪和定位开发团队的源代码修改历程。www.yippeesoft.com

For example, bugs sometimes creep in when software is modified, and you might not detect the bug until a long time after you make the modification. With CVS, you can easily retrieve old versions to see exactly which change caused the bug. This can sometimes be a big help.

例如,当修改软件的时候,经常会有BUG偷偷地混入近来,经常在你修改完毕很久以后才发现这个BUG的存在,如果使用CVS,你就可以很容易的找回旧版本,并且准确的定位谁的修改导致这个BUG。这样的话是一个很好的帮助。www.yippeesoft.com

You could of course save every version of every file you have ever created. This would however waste an enormous amount of disk space. CVS stores all the versions of a file in a single file in a clever way that only stores the differences between versions.

当然,你也可以把你每次创建的每一个文件的每一个版本都保存起来,但是显而易见,这将浪费很大的硬盘空间。CVS保存一个文件的所有版本的时候,它仅仅只要一个文件,它每次只是保存文件版本之间的差异。

CVS also helps you if you are part of a group of people working on the same project. It is all too easy to overwrite each others\’ changes unless you are extremely careful. Some editors, like GNU Emacs, try to make sure that the same file is never modified by two people at the same time. Unfortunately, if someone is using another editor, that safeguard will not work. CVS solves this problem by insulating the different developers from each other. Every developer works in his own sandbox, and CVS merges the work when each developer is done.

作为开发同一个项目的项目团队的一员,CVS可以帮助你,在团队开发中,除非你是一个非常仔细,否则覆盖别人的修改是一个非常简单的事情。许多编辑器,例如GNU EMACS,它的解决方法是当一个文件在同一时间被两个人打开的时候提示需要确认。但是不幸的是,如果有人使用的是另外一种编辑器,这个安全机制将毫无作用。CVS解决了这个问题,它使每个开发者之间彼此绝缘互不干扰,每个开发者都工作于他自己的沙盒,当他们工作完成之后,CVS再合并他们的工作。www.yippeesoft.com

沙盒:是Wiki系统里专门用于练习编辑页面技术的试验页面。意思类似于古代人以沙为纸,以苇为笔,当写完一遍后,将沙摩平,又可以重新再写。 www.yippeesoft.com

今天报纸上说 中文 呱呱坠地 一般人都是 拼音为 GUA1 GUA1 ZHUI4 DI4,实际上应该是 GU1 GU1。

呱 gū  〈名〉
婴儿的啼哭声 [the cry of a baby]
诞置之寒冰,鸟覆翼之。鸟乃去矣,后稷呱矣。——《诗·大雅·生民》。诞,语助词,表示赞美的语气
又如:呱呱坠地(形容婴儿出生);呱啼;呱泣(婴儿啼哭)

标签:, , , , ,