Exemplo n.º 1
0
        public static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            if (IsAlreadyRunning())
            {
                MessageBox.Show("An instance of " + Application.ProductName + " is already running.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            MessageForm messageForm = new MessageForm();

            UserNotifications.init(
                messageForm
                );
            Debug.WriteLine("now showing form...");
            UserNotifications.Notify(
                "PTM TEST", "starting... and veeeery long string passed.... .... .... yep. very long. really. you must see it."
                );

            Thread.Sleep(3000);
            Debug.WriteLine("main execution done");

            messageForm.stop();
        }
Exemplo n.º 2
0
        public TrayIcon()
        {
            InitializeComponent();

            // If plink.exe is not found, show the settings.
            this.settingsForm = new SettingsForm();
            if (!PuttyTunnelManagerSettings.Instance().HasPlink)
            {
                this.notifyIcon.ShowBalloonTip(5, Application.ProductName, "Could not find plink.exe. Please locate it via the settings window.", ToolTipIcon.Info);
                settingsForm.ShowDialog();
            }

            this.tipForm   = new TipForm();
            this.aboutForm = new AboutForm();
            MessageForm messageForm = new MessageForm();

            UserNotifications.init(
                messageForm
                );
            UserNotifications.Notify(
                "PTM", "starting..."
                );

            this.UpdateSessions(); // we need to enum sessions automaticaly for start some sessions
        }