Exemple #1
0
        public Main(Login loginWindow)
        {
            this.loginWindow = loginWindow;

              InitializeComponent();
              var resources = new ComponentResourceManager(typeof(Main));
              notifyIconBase = notifyIcon.Icon;
              notifyIconLoading = (Icon)resources.GetObject("notifyIconLoading.Icon");
              notifyIconUpdate = (Icon)resources.GetObject("notifyIconUpdate.Icon");

              Application.ThreadException += (sender, ex) =>
              Util.HandleException(ex.Exception);

              InitializeContextMenu();
              InitializeSSH();

              balloonTips = new Queue<BalloonTip>();
              notifyIcon.BalloonTipClosed += BalloonTipClosed;
              notifyIcon.BalloonTipClicked += BalloonTipClicked;

              projectMonitor = new ProjectMonitor(this);
              projectMonitor.updateCallbacks.Add(UpdateContextMenu);
              projectMonitor.projectAddedCallbacks.Add(ProjectAdded);
              projectMonitor.projectRemovedCallbacks.Add(ProjectRemoved);
              projectMonitor.projectAutoUpdatedCallbacks.Add(ProjectAutoUpdated);
              projectMonitor.projectUpdatedCallbacks.Add(ProjectUpdated);
              projectMonitor.projectEditedCallbacks.Add(ProjectEdited);
              projectMonitor.messageCallback = DisplayBalloonTip;
              projectMonitor.loadedCallbacks.Add(OnProjectMonitorLoaded);
              projectMonitor.failureCallbacks.Add(OnProjectMonitorFailure);
              projectMonitor.disconnectCallbacks.Add(OnProjectMonitorDisconnect);
              projectMonitor.StartMonitoring();

              updateChecker = new UpdateChecker(this);
              updateChecker.Start();

              // Show the intro if it's the first load.
              if (!Settings.Default.Loaded) {
            GettingStarted gs = new GettingStarted();
            ShowTop(gs);
            Settings.Default.Loaded = true;
            Settings.Default.Save();
              }
        }
Exemple #2
0
 private void GettingStartedClick(object sender, EventArgs e)
 {
     var gs = new GettingStarted();
       gs.Show();
 }