Ejemplo n.º 1
0
        // Constructor
        public MainClass()
        {
            // create tray menu
            trayMenu = new ContextMenu();
            trayMenu.MenuItems.Add("Exit", OnExit);
            trayMenu.MenuItems.Add("Settings", OnSettings);

            // create tray icon
            trayIcon = new NotifyIcon();
            trayIcon.Text = "org-mode reminder";
            trayIcon.Icon = new Icon("app.ico", 40, 40);
            trayIcon.ContextMenu = trayMenu;
            //display tray icon
            trayIcon.Visible = true;

            InitialzeSnarl();

            // if settigs file does not exits then create them.
            if (!System.IO.File.Exists(Settings.configFile)) {
                Settings settingForm = new Settings();
                settingForm.FormClosed += new FormClosedEventHandler(settingForm_IsClosed);
                settingForm.Show();
            } else {
                startMainLoop();
            }
        }
Ejemplo n.º 2
0
 // If user click on "Settings" button from context menu
 private void OnSettings(object sender, EventArgs e)
 {
     Settings SettingsForm = new Settings();
     SettingsForm.Show();
 }
Ejemplo n.º 3
0
 public OrgFile()
 {
     Settings s = new Settings();
     FilePath = s.getOrgFilesPath();
 }