|
using System;
using OverlayMgr;
using OverlayWrapper;
namespace TimePlugin {
/// <summary>
/// Time Plugin
/// </summary>
[Serializable]
public class TimePlugin : IPlugin {
private bool active;
protected bool m_ShowDate = false;
protected bool m_ShowTime = true;
///<summary>
/// Time
///</summary>
public bool ShowTime {
get { return m_ShowTime; }
set { m_ShowTime = value; }
}
///<summary>
/// ShowDate
///</summary>
public bool ShowDate {
get { return m_ShowDate; }
set { m_ShowDate = value; }
}
#region IPlugin Members
public string Name {
get { return "Time"; }
}
public string Description {
get { return "Displays the current Time"; }
}
public bool Load() {
return true;
}
public bool Unload() {
return true;
}
public void ShowConfig() {
new Settings(this).ShowDialog();
}
public bool Active {
get { return active; }
set { active = value; }
}
public void Tick() {
if (ShowTime)
Overlay.Data.CustomString += " " + DateTime.Now.ToLongTimeString();
if (ShowDate)
Overlay.Data.CustomString += " " + DateTime.Now.ToShortDateString();
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.