![]() |
|
Welcome to the HEXUS.community discussion forums forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and other features. By joining our free community you will have access to post topics, respond to polls and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! |
|
|||||||
General discussion Chatter, desires, jokes & rants; some threads are banter some are serious - please show respect for others ![]() |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Seething Cauldron of Hatred
Join Date: Aug 2005
Posts: 6,039
Thanks: 47
Thanked 171 Times in 140 Posts
|
Who's working this Christmas Eve?
Ok so i'm at work. I'm bored.
I'm a front office developer, what that means is i nock up all sorts of applications/software-infrastructure as required for the desk I support. Been the junoir muggins is in today. But not one of the sodding traders is. Not to mention that, but the broker booze i've been given is truely sub-pa. Villalin Quincy 2006. Sometimes i hate been the youngest. Now the problem is, i can't do any real development, as I need more app servers. So i'm left bored, with the only work to be done GUI stuff (I HATE UI WORK!). So, I present you with this offering, the money clock so you can watch it tick by: Code:
namespace Money_Clock
{
class Program
{
static void Main(string[] args)
{
Console.Write("Please Provide Your Hourly Pay In Pounds: ");
decimal rate;
while (true)
if (decimal.TryParse(Console.ReadLine(), out rate))
break;
else
ConsolePlus.WriteError("Invalid Input, Please Provide Hourly Rate as Decimal.");
Console.Clear();
DateTime started = DateTime.Now;
rate = rate/36;
while (true)
{
Console.SetCursorPosition(0,0);
Console.Write("{0} Pence.",(rate * (decimal)(DateTime.Now.Subtract(started).TotalSeconds)).ToString("F"));
Thread.Sleep(1000);
}
}
}
throw new ArgumentException (String, String, Exception)
|
|
|
|
|
|
#2 (permalink) |
|
Seething Cauldron of Hatred
Join Date: Aug 2005
Posts: 6,039
Thanks: 47
Thanked 171 Times in 140 Posts
|
Re: Who's working this Christmas Eve?
And the support class (this is all C# 2.0 or better btw)
Code:
public class ConsolePlus
{
private ConsoleColor _errorColour = ConsoleColor.Red;
/// <summary>
/// Writes to the console using the error 'style'.
/// </summary>
/// <param name="message">The message.</param>
/// <param name="args">The args.</param>
public static void WriteError(string message, params object[] args)
{
using (new ConsoleColorScope(ConsoleColor.Red))
Console.WriteLine(message, args);
}
/// <summary>
/// Gets or sets the error colour.
/// </summary>
/// <value>The error colour.</value>
public ConsoleColor ErrorColour
{
get { return _errorColour; }
set { _errorColour = value; }
}
/// <summary>
/// Sets the ConsoleColor, for only the time indended before reverting to the original.
/// </summary>
public class ConsoleColorScope : IDisposable
{
private readonly ConsoleColor _foregroundCol;
private readonly ConsoleColor _backgroundCol;
/// <summary>
/// Initializes a new instance of the <see cref="ConsoleColorScope"/> class.
/// </summary>
/// <param name="ForegroundColor">Color of the foreground.</param>
public ConsoleColorScope(ConsoleColor ForegroundColor)
{
_foregroundCol = Console.ForegroundColor;
Console.ForegroundColor = ForegroundColor;
_backgroundCol = Console.BackgroundColor;
}
/// <summary>
/// Initializes a new instance of the <see cref="ConsoleColorScope"/> class.
/// </summary>
/// <param name="ForegroundColor">Color of the foreground.</param>
/// <param name="BackgroundColor">Color of the background.</param>
public ConsoleColorScope(ConsoleColor ForegroundColor, ConsoleColor BackgroundColor)
{
_foregroundCol = Console.ForegroundColor;
Console.ForegroundColor = ForegroundColor;
_backgroundCol = Console.BackgroundColor;
Console.BackgroundColor = BackgroundColor;
}
#region IDisposable Members
///<summary>
///Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
///</summary>
///<filterpriority>2</filterpriority>
public void Dispose()
{
Console.BackgroundColor = _backgroundCol;
Console.ForegroundColor = _foregroundCol;
}
#endregion
}
}
throw new ArgumentException (String, String, Exception)
|
|
|
|
|
|
#3 (permalink) |
|
Senior Member
Join Date: Jul 2003
Location: Pasty Land
Posts: 1,512
Thanks: 85
Thanked 43 Times in 39 Posts
|
Re: Who's working this Christmas Eve?
Dude you are bored. What I'm moer amazed about is it's actually been about 6 years since I saw any programming code and kinda understood some of your code. It seems that ND isn't wasted after all.
Oh and no I'm not working today, but I am working on boxing day
|
|
|
|
|
|
#5 (permalink) |
|
laser chasing loonatic
Join Date: Dec 2003
Location: M28, Manchester
Posts: 11,270
Thanks: 123
Thanked 226 Times in 210 Posts
|
Re: Who's working this Christmas Eve?
I'm Working here as well and then I've got to go do the xmas eve present dash for all the relatives
![]() I was going to do it over the weekend, but in the end I ended up travelling down the country, went clubbing and then travelled back yesterday after a small rest.
Lee
---- |
|
|
|
|
|
#6 (permalink) |
|
Senior Member
Join Date: Sep 2003
Location: geordieland
Posts: 2,485
Thanks: 73
Thanked 40 Times in 34 Posts
|
Re: Who's working this Christmas Eve?
I'm at work, sat here wasting time because I can't be arsed to do any real work. yay yetisports.
HEXUS FOLDING TEAM It's EASY
|
|
|
|
|
|
#7 (permalink) |
|
Team HEXUS.net
Join Date: Jul 2003
Location: Liverpool, UK
Posts: 4,307
Thanks: 44
Thanked 37 Times in 35 Posts
|
Re: Who's working this Christmas Eve?
Gifts? What are these things you speak of?
We get a tin of chocolates for the office as our "gift". And yes I'm working. Bah humbug.
Join the HEXUS Folding at Home Team!!
![]() Welcome to HEXUS! - Read this if you're new! hexus trust | joshwaller.co.uk | digicamreview.co.uk | tea review - are you on the Hexus social map? |
|
|
|
|
|
#9 (permalink) |
|
It's good to be bad
Join Date: Oct 2006
Location: Cornwall
Posts: 1,469
Thanks: 45
Thanked 72 Times in 66 Posts
|
Re: Who's working this Christmas Eve?
Not working here today - just putting off going to Asda until the last minute.
@TheAnimus: Nice to see what I could have been earning mounting up though - had to import the Thread class - it's interesting to see how much one of my rollie/coffee breaks earns
My only concern is should I hide my true identity? A costume maybe?
Originally Posted by 0iD
|
|
|
|
|
|
#11 (permalink) |
|
Senior Member
Join Date: Aug 2005
Location: in a box
Posts: 596
Thanks: 4
Thanked 0 Times in 0 Posts
|
Re: Who's working this Christmas Eve?
I work at a college, there are about 8 people in and 4 IT Technicians to support them. The local council have shut for the day so heaven knows y we are in work. Still we have been told we can go at 12.30 and so its not to bad
Permanently confused |
|
|
|
|
|
#14 (permalink) |
|
Chief Nutter
Join Date: Aug 2003
Location: On the HEXUS.social bridge - Warp Speed Mr Warf!
Posts: 6,891
Thanks: 63
Thanked 107 Times in 96 Posts
|
Re: Who's working this Christmas Eve?
Originally Posted by burble
You missed the trifle and the cheesecake and tiramisu... there were leftovers I polished off yesterday! Muahahaha.
Originally Posted by joshwa
Lanson Black label Champers.... I love working corporate again
![]() I'm not working any of xmas this year, for the first time in my working life! It's lovely.
HEXUS.social Co-ordinator & [H3XU5].lan Team Captain
Events coming soon:
FAQ: HEXUS.social FAQ! |
|
|
|
|
|
#15 (permalink) |
|
Senior Member
Join Date: Jul 2004
Location: Somerset
Posts: 1,796
Thanks: 16
Thanked 9 Times in 7 Posts
|
Re: Who's working this Christmas Eve?
I'm 'working' right now, but only a half day today
SO all is good, off to finish the christmas shopping in Bristol later.
|
|
|
|
|
|
#16 (permalink) |
|
Senior Member
Join Date: Jul 2003
Location: Pasty Land
Posts: 1,512
Thanks: 85
Thanked 43 Times in 39 Posts
|
Re: Who's working this Christmas Eve?
Originally Posted by tiggerai
Don't rub it in lol Working boxing day is no fun
|
|
|
|
![]() |
| Breadcrumb | ||||||
|
||||||
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
|
|