public TabControlUtil(DesktopForm d) { if (d == null) { throw new Exception("Obrigatório informar a Desktop atual, contate o Suporte"); } desk = d; }
private static void startApplication() { changeUser = false; LoginForm lf = new LoginForm(); SplashScreenManager.CloseForm(false); DialogResult rs = lf.ShowDialog(); if (rs == DialogResult.OK) { DesktopForm desk = new DesktopForm(); desk.ShowDialog(); } else { Exit(0); } if (changeUser) { startApplication(); } }
static void Main() { log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); log.Info("Starting application"); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); PingMonitor InternetPM = new PingMonitor(); InternetPM.Title = "Google"; InternetPM.Host = "8.8.8.8"; InternetPM.Start(); PingMonitor GatewayPM = new PingMonitor(); GatewayPM.Title = "Default Gateway"; GatewayPM.Host = GetDefaultGateway().ToString(); GatewayPM.Start(); DesktopForm Form = new DesktopForm(); //InternetPM.Subscribe(Form.OnPingReceived); Form.InternetPanel.Monitor = InternetPM; InternetPM.Subscribe(Form.InternetPanel.OnPingReceived); Form.GatewayPanel.Monitor = GatewayPM; GatewayPM.Subscribe(Form.GatewayPanel.OnPingReceived); log.Debug("Launching DesktopForm"); Application.Run(Form); InternetPM.Stop(); GatewayPM.Stop(); log.Info("Exiting program"); }
public TCPClientForm() { this.InitializeComponent(); this.MessengerClient = new MessengerClient(); this.desktopForm = new DesktopForm(); }