1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Test

Discussion in 'Testing Area' started by ouflak, Feb 5, 2004.


  1. SoonerLVZ

    SoonerLVZ New Member

    test
     
    Last edited: Oct 15, 2010
  2. TUSooner

    TUSooner SoonerFans.com Elite Member

  3. wbxl

    wbxl New Member

    That year hurry-55[/b][/b]
    The next day go to school, party ugg bailey button into the class, Zhao Ye and Chen are seeking to do about yesterday, Chiai-Mo side pulled back a piece of fennel to sit down to listen. Ye Zhao have taken the timberland waterproof boots to say it again, this knows about side fennel.
    "My God, fortunately no mbt m walks!" Scared fennel pale side up, firmly grasps the hand of Chiai-Mo said.
    "Is not so! I was almost air max 2010 to death!" Said Chiai-Mo clutching his chest.
    "If I did yesterday in the like, and help you to block a air max 2011 of them! I just dislike the post of the East, they robbed the old junior high school students in our school the money here."
    "You do not tease them!" Side of nike shox uncharacteristically, anxiously seeking Chen said.

    Chen looked at side fennel worry about finding the moncler jackets women, and my heart secretly delighted, he waved his ugg classic cardy, said: "Relax, I'm fine why mess with them!"
    "The next time I met them, never timberland boots meal Ah!" Zhao Ye "creaks" and squeezed hand.
    "C'mon!" Chiai-Mo glared at him, "You mbt boost how to say the Sukhumi? If it were not so red you yesterday, all right."
    "Well they are not closed on you! Say what I think of that nike dun high, ah, I Wang Shushing a film, a group of people stood up behind the Hula!" Zhao Ye jumped down off the table and said excitedly, "but shape ups we did not go back weakness, Liu Bo center of our team, so he took a piece of board child bricks, a string of rapid mouth '**** **** you' to nike shox turbo into the go! "
    "The nerve to say! Side moncler jackets outlet you do not see, yesterday, ran back to Jaures, he that takes! Do not I run fast!"
    "I talk to you more than we!" ugg boots [/i][/b]Ye painted in his own back side than that "such a high fence, I turned it, Mo Ka passed a leg, I said, how do you catch in the back were so ah Ling She said she is timberland waterproof boots in the original meter hurdles in high school! "
    We laugh together.

    Half past seven in the early study hall bell mbt shoes, everyone sat back in the seat. Fang fennel for students to pass the air jordan operating over from back to front, Chiai-Mo to help her teachers holding the office.
    In the corridor, nike shox deliver -Mo mystery to the other fennel, said: "You're not friends! Actually important things without telling me so!"
    Fang nike shox monster puzzled and said: "What is without telling you now?"
    "Remind you of key words bracelet!" moncler vest men -Mo bad brisk walking two steps forward with a smile, "This morning I saw someone on the wrist, oh, you can not say is a coincidence, I remember that day, but only a glass of red rose the last one out. "
     
  4. stooperfan

    stooperfan New Member

    testes
     
    ouflak likes this.
  5. TUSooner

    TUSooner SoonerFans.com Elite Member

    [Youtube]HdP2G7UtS9I[/Youtube]
     
    SicEmBaylor likes this.
  6. thecynic

    thecynic New Member

  7. En_Fuego

    En_Fuego New Member

    [youtube]<object width="960" height="745"><param name="movie" value="http://www.youtube.com/v/FgHSk91RhL8?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/FgHSk91RhL8?fs=1&amp;hl=en_US&amp;rel=0&amp;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="960" height="745"></embed></object>[/youtube]
     
    Last edited: Nov 22, 2010
  8. ouflak

    ouflak Oh wow! Oh wow! Oh wow!

  9. En_Fuego

    En_Fuego New Member

    [youtube]<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/vJOlzDJiaDw?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/vJOlzDJiaDw?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>[/youtube]
     
  10. budbarrybob

    budbarrybob New Member

  11. ouflak

    ouflak Oh wow! Oh wow! Oh wow!

    Embarcadero C++ Builder. How to build a Borland equivalent Smooth progress bar. This code is basically the translation of the description given for a SmoothProgress Bar at the Microsoft Support site http://support.microsoft.com/kb/816195.
    The SmoothProgressBar replaces the standard windows default progress indicator for custom GUI's and answers several drawbacks to not only the default progressbar, but many other Windows-default components such as lack of customization, even in development environments such as Microsoft's own Visual Studio.

    I will only post the the key methods Set_Value and OnPaint as they are the critical sections anyway and provide all the examples needed to code the other simpler sections described in the Microsoft article above. I should note this code, though it will be compilable working C++, will nonetheless still be a bit pseudo codish. This is because I had to do some tweaks and fudges here and there to get some more finesse behavior. Part of this is due to the fact that I derived this progress bar directly from TProgressBar. I had to 'hide' some of its base properties and replace them with my own equivalent. I also had to play around a bit with the drawing of some boundary lines to get this to fit into the default TProgressBar border properly. You could most certainly do this deriving directly from the more generic TComponent as well (similar to the article above).

    Set_Value(...):

    Code:
    [COLOR=Gray]
    	/// <summary>
    	/// [COLOR=Green]Set_Value[/Color]
    	/// </summary>
    	/// <param name="NewValue">[COLOR=Green]The new value of the progressbar.[/COLOR]</param>
    [/Color]	void __fastcall SmoothProgressBar::Set_Value(int NewValue)
    	{
    		int oldValue = value;
    
    		[COLOR=green]// Make sure that the value does not stray outside the valid range.[/COLOR]
    		if (NewValue < minimum)
    		{
    			value = minimum;
    		}
    		else if (NewValue > maximum - 1)
    		{
    			value = maximum - 1;
    			shrinkVertical = 3;
    			lastLineFlag = true;
    		}
    		else
    		{
    			value = NewValue;
    		}
    
    		[COLOR=green]// Invalidate only the changed area.[/COLOR]
    		float percent;
    
    		TRect newValueRect(this->ClientRect);
    		TRect oldValueRect(this->ClientRect);
    
    		newValueRect.Left = newValueRect.Left;
    		[COLOR=green]// Use a new value to calculate the rectangle for progress.[/COLOR]
    		percent = (float)(value - minimum) / (float)(maximum - minimum);
    		newValueRect.Right = newValueRect.Left + (int)((float)newValueRect.Width()
    				* percent);
    		newValueRect.Top = newValueRect.Top + shrinkVertical;
    		newValueRect.Bottom = newValueRect.Bottom - shrinkVertical;
    
    		oldValueRect.Left = oldValueRect.Left;
    		[COLOR=green]// Use an old value to calculate the rectangle for progress.[/COLOR]
    		percent = (float)(oldValue - minimum) / (float)(maximum - minimum);
    		oldValueRect.Right = oldValueRect.Left + 2 + (int)((float)oldValueRect.Width()
    				* percent);
    		oldValueRect.Top = oldValueRect.Top + shrinkVertical;
    		oldValueRect.Bottom = oldValueRect.Bottom - shrinkVertical;
    
    		TRect updateRect;
    
    		[COLOR=green]// Find only the part of the screen that must be updated.[/COLOR]
    		if (newValueRect.Width() > oldValueRect.Width())
    		{
    			updateRect.Left = oldValueRect.Width();
    			updateRect.IntersectRect(newValueRect, oldValueRect);
    		}
    		else
    		{
    			updateRect.Left = newValueRect.Width();
    			updateRect.IntersectRect(oldValueRect, newValueRect);
    		}
    
    		InvalidateRect(this->Handle, &updateRect, 1);
    		SmoothProgressBar::OnPaint(this);
    	}
    
    This, on the face of things, looks like (and pretty much is) a line for line translation. Borland clearly has some of its own little ways of doing things, but the equivalents are obvious (though not so easy to find! Hence my post here for others that may be looking). One thing that may jump out is the explicit call to OnPaint. TProgressBar does not seem to inherit this handler from its parent. I probably could have created a custom event without much additional complexity, but this was already simple, so I figured a direct call wouldn't hurt.

    OnPaint(...):

    Code:
    [COLOR=Gray]
    	/// <summary>
    	/// [COLOR=green]On Paint[/COLOR]
    	/// </summary>
    	/// <param name="Sender">[COLOR=green]The sender of this event[/COLOR]</param>[/COLOR]
    	void __fastcall SmoothProgressBar::OnPaint(TObject *Sender)
    	{
    		HDC dc;
    
    		HPEN dcPen;
    		dc = GetDC(this->Handle);
    		this->Brush->Color = this->progressBar_Color;
    		float percent = (float)(value - minimum) / (float)(maximum - minimum);
    		TRect clientRect(this->ClientRect);
    		FillRect(dc, &clientRect, this->Brush->Handle);
    		dcPen = CreatePen(PS_SOLID, 1, this->progressBar_Color);
    		SelectObject(dc, dcPen);
    		SetBkColor(dc, this->progressBar_Color);
    
    		if (lastLineFlag == true) [COLOR=green]// Global flag[/COLOR]
    		{
    			MoveToEx(dc, clientRect.Right - 1, clientRect.Top + 1, NULL);
    			LineTo(dc, clientRect.Right - 1, clientRect.Bottom - 1);
    			MoveToEx(dc, clientRect.Right, clientRect.Top + 1, NULL);
    			LineTo(dc, clientRect.Right, clientRect.Bottom - 1);
    		}
    
    		lastLineFlag = false;
    	}
    
    Embarcadero clearly relies heavily on the Windows API here for basic graphical functions. What stands out that is different from the Microsoft example is that I don't draw a border. Since I inherited directly from TProgressBar, I got that border for free. However, I did have to do some fudging to get my colored rectangles to fit (not shown) and in particular to not overwrite the base class progress bar boundary at the end (the line logic in the code above).

    I hope this saves somebody some time in trudging through Google search results, questionably useful help files, and quite a bit of raw source code looking for similar examples to what I was trying to accomplish.

    Just one more little blip. Since I derived this from TProgressBar (which is really just a shell around the Windows Progress bar), I did have to hide and lock-in the defaults of some of the base properties. I will give an example of hiding the Position property:

    Code:
    [B][Color=DarkBlue]public:
    	__property int[/B][/Color] Position = {read = position, default = 0}; [Color=green]// Hide the base[/Color]
    
    This is pretty straightforward... and the only direct example you will find on the net. Notice that to override the property, you must override it in the equivalent access section (public or published). Also, I left out the 'write' section, rendering the property read-only.
     
  12. TheChucker

    TheChucker New Member

    <object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/RkkTeAP8d5o?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/RkkTeAP8d5o?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>
     
    ouflak likes this.
  13. sooner ngintunr

    sooner ngintunr Well-Known Member

  14. ouflak

    ouflak Oh wow! Oh wow! Oh wow!

    Keywords: WPF, XAML, Static properties, dependency properties.
    It would seem that a class that is derived from System.Windows.DependencyObject cannot have static properties (???). It will compile, but any call to the constructor or to that particular property throws up an exception.
     
  15. Sooner5030

    Sooner5030 Well-Known Member

  16. Sooner5030

    Sooner5030 Well-Known Member

  17. lewissooner14

    lewissooner14 New Member

    test
     
    mgsooner likes this.
  18. soonerthanu

    soonerthanu Member

  19. ouflak

    ouflak Oh wow! Oh wow! Oh wow!

    WPF DataGrid Binding. It seems that you can't bind to internal properties. They *must* be public.
     
  20. SoCaliSooner

    SoCaliSooner Well-Known Member

Share This Page