Time Select Control 4 available to display null value 4

xiaoxiao2021-03-06  40

#REGION component designer generated code

///

/// Designer supports the required method - do not use the code editor

// / Modify the content of this method.

///

Private vidinitiRizeComponent ()

{

This.Panel3 = new system.windows.Forms.Panel ();

This.Panel1 = new system.windows.Forms.Panel ();

This.Panel2 = new system.windows.Forms.Panel ();

This.lbspace = new system.windows.forms.label ();

THIS.LBSEP3 = new system.windows.forms.label ();

This.tbday = new system.windows.forms.textbox ();

This.lbsep2 = new system.windows.forms.label ();

This.tbmonth = new system.windows.Forms.TextBox ();

THIS.LBSEP1 = New System.windows.Forms.Label ();

This.tbyear = new system.windows.Forms.TextBox ();

THIS.LABEL2 = New System.windows.Forms.label ();

This.btnmain = new system.windows.Forms.Button ();

THIS.UPDOWN = New System.windows.Forms.vscrollbar ();

This.Panel3.suspendlayout ();

This.Panel1.suspendlayout ();

this.Panel2.suspendlayout ();

THIS.SUSPENDLAYOUT ();

//

// panel3

//

This.Panel3.Borderstyle = system.windows.Forms.Borderstyle.fixed3d;

this.Panel3.controls.add (this.Panel1);

This.Panel3.Controls.add (this.btnmain);

this.Panel3.controls.add (this.Updown);

This.Panel3.dock = system.windows.Forms.dockStyle.Fill;

This.Panel3.Location = new system.drawing.point (0, 0);

This.Panel3.Name = "panel3";

This.Panel3.Size = new system.drawing.size (104, 24);

this.Panel3.tabindex = 210;

//

// panel1

//

This.Panel1.controls.add (this.Panel2);

This.Panel1.controls.add (this.label2);

This.Panel1.dock = system.windows.Forms.dockStyle.Fill;

This.Panel1.Location = new system.drawing.point (0, 0);

this.Panel1.name = "panel1";

This.Panel1.size = new system.drawing.size (84, 20);

This.Panel1.tabindex = 212; //

// panel2

//

This.Panel2.controls.add (this.lbspace);

This.Panel2.controls.add (this.lbsep3);

this.Panel2.controls.add (this.tbday);

This.Panel2.controls.add (this.lbsep2);

this.Panel2.controls.add (this.tbmonth);

This.Panel2.controls.add (this.lbsep1);

This.Panel2.controls.add (this.tbyear);

This.Panel2.dock = system.windows.Forms.dockStyle.Fill;

This.Panel2.Location = new system.drawing.point (0, 2);

this.Panel2.name = "panel2";

This.Panel2.size = new system.drawing.size (84, 18);

this.Panel2.tabindex = 207;

//

// lbspace

//

THIS.LBSPACE.BACKCOLOR = system.drawing.systemcolors.window;

This.lbspace.dock = system.windows.forms.dockstyle.fill;

this.lbspace.location = new system.drawing.point (70, 0);

this.lbspace.name = "lbspace";

THIS.LBSPACE.SIZE = New System.drawing.size (14, 18);

THIS.LBSPACE.TABINDEX = 223;

THIS.LBSPACE.TEXTALIGN = system.drawing.contentAlignment.topcenter;

THIS.LBSPACE.CLICK = New System.EventHandler (this.lbspace_click);

This.lbspace.enabledchanged = new system.eventhandler (this.lbsep1_enabledchange);

//

// lbsep3

//

THIS.LBSEP3.AUTOSIZE = TRUE;

THIS.LBSEP3.BACKCOLOR = system.drawing.systemcolors.window;

This.lbsep3.dock = system.windows.forms.dockstyle.Leste;

this.lbsep3.flatstyle = system.windows.forms.flatstyle.flat;

this.lbsep3.location = new system.drawing.point (70, 0);

THIS.LBSEP3.NAME = "lbsep3";

This.lbsep3.size = new system.drawing.size (0, 17);

this.lbsep3.tabindex = 220;

THIS.LBSEP3.ENABLEDCHANGED = New System.EventHandler (this.lbsep1_enabledchange);

//

// TBDAY

//

THIS.TBDAY.AUTOSIZE = false; this.tbday.borderstyle = system.windows.Forms.Borderstyle.none;

This.tbday.dock = system.windows.Forms.dockStyle.Lorm;

this.tbday.location = new system.drawing.point (58, 0);

this.tbday.name = "tbday";

this.tbday.size = new system.drawing.size (12, 18);

this.tbday.tabindex = 219;

THIS.TBDAY.TEXT = "12";

This.tbday.textAlign = system.windows.forms.horizontalalignment.right;

this.tbday.wordwrap = false;

This.tbday.keydown = new system.windows.Forms.keyeventHandler (this.tbmonth_keydown);

This.tbday.keypress = new system.windows.Forms.KeyPressEventHandler (this.tbday_keypress);

//

// lbsep2

//

THIS.LBSEP2.AUTOSIZE = TRUE;

THIS.LBSEP2.BACKCOLOR = system.drawing.systemcolors.window;

THIS.LBSEP2.DOCK = system.windows.forms.dockstyle.left;

THIS.LBSEP2.FLATSTYLE = system.windows.Forms.Flatstyle.FLAT;

this.lbsep2.location = new system.drawing.point (47, 0);

THIS.LBSEP2.NAME = "lbsep2";

This.lbsep2.size = new system.drawing.size (11, 17);

this.lbsep2.tabindex = 218;

THIS.LBSEP2.TEXT = "-";

THIS.LBSEP2.ENABLEDCHANGED = New System.EventHandler (this.lbsep1_enabledchange);

//

// tbmonth

//

THIS.TBMONTH.AUTOSIZE = false;

This.tbmonth.Borderstyle = system.windows.Forms.Borderstyle.none;

This.tbmonth.dock = system.windows.forms.dockstyle.Lorm;

this.tbmonth.location = new system.drawing.point (35, 0);

THIS.TBMONTH.NAME = "TBMONTH";

this.tbmonth.size = new system.drawing.size (12, 18);

THIS.TBMONTH.TABINDEX = 217;

THIS.TBMONTH.TEXT = "12";

This.tbmonth.textalign = system.windows.forms.horizontalalignment.right; this.tbmonth.wordwrap = false;

This.tbmonth.keyDown = new system.windows.forms.keyeventhandler (this.tbmonth_keydown);

This.tbmonth.keypress = new system.windows.Forms.KeyPressEventHandler (this.tbmonth_keypress);

This.tbmonth.Leave = new system.eventhandler (this.tbmonth_leave);

THIS.TBMONTH.Enter = new system.eventhandler (this.tbmonth_enter);

//

// lbsep1

//

THIS.LBSEP1.AUTOSIZE = True;

THIS.LBSEP1.BACKCOLOR = system.drawing.systemcolors.window;

This.lbsep1.dock = system.windows.Forms.dockStyle.LORMS.DOCKSTYLE.EFT;

THIS.LBSEP1.FLATSTYLE = system.windows.Forms.Flatstyle.FLAT;

THIS.LBSEP1.LOCATION = New System.drawing.Point (24, 0);

THIS.LBSEP1.NAME = "lbsep1";

THIS.LBSEP1.SIZE = New System.drawing.size (11, 17);

THIS.LBSEP1.TABINDEX = 216;

THIS.LBSEP1.TEXT = "-";

THIS.LBSEP1.ENABLEDCHANGED = New System.EventHandler (this.lbsep1_enabledchange);

//

// tbyear

//

this.tbyear.autosize = false;

This.Tbyear.Borderstyle = system.windows.Forms.Borderstyle.none;

This.tbyear.dock = system.windows.forms.dockstyle.left;

This.tbyear.font = new system.drawing.font ("Song", 9F, System.drawing.FontStyle.regular, System.drawing.graphicsUnit.Point ((System.byte) (134)))));

this.tbyear.location = new system.drawing.point (0, 0);

this.tbyear.name = "tbyear";

This.tbyear.rightToleft = system.windows.Forms.rightToleft.no;

This.tbyear.size = new system.drawing.size (24, 18);

this.tbyear.tabindex = 211;

this.tbyear.text = "2004";

This.tbyear.textalign = system.windows.Forms.horizontalalignment.right;

this.tbyear.Wordwrap = false;

This.tbyear.keyDown = new system.windows.Forms.keyeventhandler (this.tbmonth_keydown);

This.tbyear.keypress = new system.windows.Forms.KeyPressEventHandler (this.tbyear_keypress);

This.tbyear.leave = new system.eventhandler (this.tbyear_leave);

this.tbyear.Enter = new system.eventhandler (this.tbmonth_enter);

//

// label2

//

THIS.LABEL2.BACKCOLOR = system.drawing.systemcolors.window;

This.Label2.dock = system.windows.Forms.dockStyle.top;

THIS.LABEL2.LOCATION = New System.drawing.Point (0, 0);

THIS.LABEL2.NAME = "label2";

THIS.Label2.size = new system.drawing.size (84, 2);

THIS.Label2.tabindex = 206;

THIS.Label2.enableDChanged = new system.eventhandler (this.lbsep1_enabledchange);

//

// btnmain

//

This.btnmain.dock = system.windows.forms.dockstyle.right;

this.btnmain.location = new system.drawing.point (84, 0);

THIS.BTNMAIN.NAME = "btnmain";

This.btnmain.size = new system.drawing.size (16, 20);

This.btnmain.tabindex = 811;

This.btnmain.click = new system.Eventhandler (this.btnmain_click);

This.btnmain.paint = new system.windows.forms.painteventhandler (this.btnmain_paint);

//

// updown

//

This.Updown.dock = system.windows.Forms.dockStyle.right;

This.Updown.location = new system.drawing.point (100, 0);

this.Updown.name = "updown";

This.Updown.size = new system.drawing.size (0, 20);

this.updown.tabindex = 210;

this.updown.visible = false;

This.Updown.scroll = new system.windows.Forms.scrolleventHandler (this.Updown_scroll);

//

// DateInput

//

This.Controls.add (this.Panel3);

THIS.NAME = "DateInput"; this.size = new system.drawing.size (104, 24);

This.Leave = new system.eventhandler (this.dateInput_leave);

This.Panel3.ResumeLayout (false);

this.Panel1.ResumeLayout (false);

This.Panel2.ResumeLayout (false);

This.ResumeLayout (false);

}

#ndregion

Private void Tbyear_KeyPress (Object Sender, System.Windows.KeypressEventArgs E)

{

IF (this.Designmode)

Return;

TextBox Obj = (TextBox) Sender;

Obj.selectedText = ""

String strign = Obj.text;

INT ILEN = STRVALUE.TOSTOSTOSTRING ();

INT key = (int) (e.keychar);

Switch (key)

{

Case 48: // 0

Case 49: // 1

Case 50: // 2

Case 51: // 3

Case 52: // 4

Case 53: //5

Case 54: // 6

Case 55: // 7

Case 56: // 8

Case 57: // 9

E.handled = false;

IF (ilen == 3)

Obj.Parent.selectNextControl (Obj, true, true, false, true);

Else IF (Ilen == 4)

e.handled = true;

Break;

Case 45: //

e.handled = true;

Break;

Case 8: // backss

Case 27: // ESC

E.handled = false;

Break;

DEFAULT:

e.handled = true;

Break;

}

}

Private void TBMONTH_KEYPRESS (Object Sender, System.Windows.MMS.KeypressEventArgs E)

{

IF (this.Designmode)

Return;

TextBox Obj = (TextBox) Sender;

Obj.selectedText = ""

String strign = Obj.text;

INT ILEN = STRVALUE.TOSTOSTOSTRING ();

INT key = (int) (e.keychar);

Switch (key)

{

Case 48: // 0

Case 49: // 1

Case 50: // 2

Case 51: // 3

Case 52: // 4

Case 53: //5

Case 54: // 6

Case 55: // 7

Case 56: // 8

Case 57: // 9

IF (ilen == 0)

E.handled = false;

Else IF (ilen == 1) // has been entered

{

E.handled = true; / / The default is not processed, and the following analysis needs to be processed.

IF (key == 48) // Now is 0

{

IF (Obj.SelectionStart == 0) // Insert {

IF (strValue! = "0") // is not 0

E.handled = false;

}

Else IF (Strvalue == "1") // Added and has been entered 1

E.handled = false;

}

ELSE // Enter non-0 numbers

{

IF (Strvalue == "0") // has been entered a 0

{

IF (Obj.SelectionStart == 0) // Insert a number front

{

IF (key == 49) // can only insert 1

E.handled = false;

}

Else

E.handled = false;

}

Else IF (Strvalue == "1") // has been entered 1

{

IF (Obj.SelectionStart == 0) // Insert a number front

{

IF (key == 49) // can only insert 0, 1 (the case has been processed in front)

E.handled = false;

}

Else IF (key == 49 || key == 50) // 0, 1, 2

E.handled = false;

}

ELSE IF (Strvalue == "2") // has been entered 2

{

IF (Obj.SelectionStart == 0 && (key == 49)) // The previous insertion number can only insert 0, 1

E.handled = false;

}

}

IF (e.hand == false)

Obj.Parent.selectNextControl (Obj, true, true, false, true);

}

Else

e.handled = true;

Break;

Case 45: //

e.handled = true;

Break;

Case 8: // backss

IF (ilen == 0)

Obj.Parent.selectNextControl (Obj, False, True, False, true);

Break;

Case 27: // ESC

E.handled = false;

Break;

DEFAULT:

e.handled = true;

Break;

}

}

转载请注明原文地址:https://www.9cbs.com/read-70613.html

New Post(0)