コード例 #1
0
        public Window1()
        {
            InitializeComponent();

            // string pathToExampleFile = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "winkleExample.xml";

            Winkle.VersionCheck myUpdateChecker  = new Winkle.VersionCheck("Desktop Google Reader", "file:///Q:/Dev/GitHub/Winkle/WinkleExample/winkleExample.xml");
            Winkle.UpdateInfo   myUpdateResponse = myUpdateChecker.checkForUpdate(System.Reflection.Assembly.GetExecutingAssembly(), true);
            Console.WriteLine("bla");
        }
コード例 #2
0
ファイル: Window1.xaml.cs プロジェクト: seboslaw/Winkle
        public Window1()
        {
            InitializeComponent();

               // string pathToExampleFile = System.IO.Path.GetDirectoryName(System.Windows.Forms.Application.ExecutablePath) + "winkleExample.xml";

            Winkle.VersionCheck myUpdateChecker = new Winkle.VersionCheck("Desktop Google Reader", "file:///Q:/Dev/GitHub/Winkle/WinkleExample/winkleExample.xml");
            Winkle.UpdateInfo myUpdateResponse = myUpdateChecker.checkForUpdate(System.Reflection.Assembly.GetExecutingAssembly(), false);
            Console.WriteLine("bla");
        }
コード例 #3
0
ファイル: MainWindow.xaml.cs プロジェクト: svenwal/Paw
        public MainWindow()
        {
            InitializeComponent();
            appDataPath    = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\Tlhan Ghun\\Paw\\";
            appProgramPath = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().CodeBase);
            try
            {
                if (Properties.Settings.Default.useAutomaticUpdate)
                {
                    Winkle.VersionCheck myUpdateChecker  = new Winkle.VersionCheck("Paw", "http://tlhan-ghun.de/files/pawWinkle.xml");
                    Winkle.UpdateInfo   myUpdateResponse = myUpdateChecker.checkForUpdate(System.Reflection.Assembly.GetExecutingAssembly(), true);
                    Console.WriteLine("Update check done");
                }
            }
            catch
            {
            }
            passwordManager = new PasswordManager();
            registeredApps  = new Dictionary <string, GrowlApplication>();
            pawIconPath     = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location) + "\\Paw.ico";
            if (!System.IO.Directory.Exists(appDataPath))
            {
                System.IO.Directory.CreateDirectory(appDataPath);
            }
            Growl.Connector.Application pawApp     = new Growl.Connector.Application("Paw");
            List <NotificationType>     pawClasses = new List <NotificationType>();

            pawClasses.Add(new NotificationType("General notifications"));
            pawClasses.Add(new NotificationType("Growl server messages"));
            pawClasses.Add(new NotificationType("Error messages"));
            pawApp.Icon = Growl.CoreLibrary.ImageConverter.ImageFromUrl(appProgramPath + "\\Paw.ico");


            GrowlApplication comWindow = new GrowlApplication(pawApp, pawClasses);

            registeredApps.Add("Paw", comWindow);

            m_notifyIcon        = new System.Windows.Forms.NotifyIcon();
            m_notifyIcon.Text   = "Paw - a GNTP to Snarl bridge";
            m_notifyIcon.Icon   = new System.Drawing.Icon(pawIconPath);
            m_notifyIcon.Click += new EventHandler(trayClick);

            m_notifyMenu = new System.Windows.Forms.ContextMenu();
            m_notifyMenu.MenuItems.Add("Paw");
            m_notifyMenu.MenuItems.Add("-");
            m_notifyMenu.MenuItems.Add(new System.Windows.Forms.MenuItem("Start / stop", new System.EventHandler(trayStartStop)));
            m_notifyMenu.MenuItems.Add(new System.Windows.Forms.MenuItem("Preferences", new System.EventHandler(trayClick)));
            m_notifyMenu.MenuItems.Add("-");
            m_notifyMenu.MenuItems.Add(new System.Windows.Forms.MenuItem("Quit", new System.EventHandler(trayClose)));

            m_notifyIcon.ContextMenu = m_notifyMenu;
        }