StephaneLenclud@123: //
StephaneLenclud@123: // Copyright (C) 2014-2015 Stéphane Lenclud.
StephaneLenclud@123: //
StephaneLenclud@123: // This file is part of SharpDisplayManager.
StephaneLenclud@123: //
StephaneLenclud@123: // SharpDisplayManager is free software: you can redistribute it and/or modify
StephaneLenclud@123: // it under the terms of the GNU General Public License as published by
StephaneLenclud@123: // the Free Software Foundation, either version 3 of the License, or
StephaneLenclud@123: // (at your option) any later version.
StephaneLenclud@123: //
StephaneLenclud@123: // SharpDisplayManager is distributed in the hope that it will be useful,
StephaneLenclud@123: // but WITHOUT ANY WARRANTY; without even the implied warranty of
StephaneLenclud@123: // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
StephaneLenclud@123: // GNU General Public License for more details.
StephaneLenclud@123: //
StephaneLenclud@123: // You should have received a copy of the GNU General Public License
StephaneLenclud@123: // along with SharpDisplayManager.  If not, see <http://www.gnu.org/licenses/>.
StephaneLenclud@123: //
StephaneLenclud@123: 
StephaneLenclud@123: 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:         /// <summary>
sl@18:         /// The main entry point for the application.
sl@18:         /// </summary>
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: }