Exemplo n.º 1
0
 public TabControlUtil(DesktopForm d)
 {
     if (d == null)
     {
         throw new Exception("Obrigatório informar a Desktop atual, contate o Suporte");
     }
     desk = d;
 }
Exemplo n.º 2
0
        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();
            }
        }
Exemplo n.º 3
0
        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");
        }
Exemplo n.º 4
0
 public TCPClientForm()
 {
     this.InitializeComponent();
     this.MessengerClient = new MessengerClient();
     this.desktopForm     = new DesktopForm();
 }