sl@18: using System; sl@18: using System.Collections.Generic; sl@18: using System.Linq; sl@18: using System.Threading.Tasks; sl@18: using System.Windows.Forms; StephaneLenclud@106: using System.Drawing; sl@18: sl@18: namespace SharpDisplayClient sl@18: { sl@25: static public class Program sl@18: { sl@18: /// sl@18: /// The main entry point for the application. sl@18: /// sl@18: [STAThread] sl@25: static public void Main() sl@18: { sl@27: //Set high priority to our process to avoid lags when rendering to our screen sl@27: System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal; sl@27: sl@18: Application.EnableVisualStyles(); sl@18: Application.SetCompatibleTextRenderingDefault(false); StephaneLenclud@106: Application.Run(new MainForm()); sl@18: } StephaneLenclud@106: StephaneLenclud@106: [STAThread] StephaneLenclud@106: static public void MainWithParams(object aParams) StephaneLenclud@106: { StephaneLenclud@106: //Set high priority to our process to avoid lags when rendering to our screen StephaneLenclud@106: System.Diagnostics.Process.GetCurrentProcess().PriorityClass = System.Diagnostics.ProcessPriorityClass.AboveNormal; StephaneLenclud@106: StephaneLenclud@106: Application.EnableVisualStyles(); StephaneLenclud@106: Application.SetCompatibleTextRenderingDefault(false); StephaneLenclud@106: MainForm mainForm = new MainForm(); StephaneLenclud@106: mainForm.Params = (StartParams)aParams; StephaneLenclud@106: Application.Run(mainForm); StephaneLenclud@106: } StephaneLenclud@106: sl@18: } StephaneLenclud@106: StephaneLenclud@106: public class StartParams StephaneLenclud@106: { StephaneLenclud@106: public StartParams(Point aLocation, string aTopText="", string aBottomText="") StephaneLenclud@106: { StephaneLenclud@106: TopText = aTopText; StephaneLenclud@106: BottomText = aBottomText; StephaneLenclud@106: Location = aLocation; StephaneLenclud@106: } StephaneLenclud@106: StephaneLenclud@106: public string TopText { get; set; } StephaneLenclud@106: public string BottomText { get; set; } StephaneLenclud@106: public Point Location { get; set; } StephaneLenclud@106: } sl@18: }