Ejemplo n.º 1
0
        public MainWindow()
        {
            InitializeComponent();
            browser.LoadCompleted  += browser_LoadCompleted;
            cBoxGetMaster.IsChecked = Properties.Settings.Default.GET_MASTER;

            notifyIcon         = new SimpleTrayIcon(this);
            notifyIcon.Visible = true;
            WindowState        = WindowState.Minimized;
            Visibility         = Visibility.Hidden;
        }
 public MainWindow()
 {
     InitializeComponent();
     notifyIcon          = new SimpleTrayIcon(this, true, Properties.Resources.viewer_image);
     notifyIcon.TrayText = "Bordlerless Graphic Viewer Starter";
     notifyIcon.Visible  = true;
     WindowState         = WindowState.Minimized;
     Visibility          = Visibility.Hidden;
     timer.Elapsed      += (_, __) => Process();
     timer.Interval      = 500;
     StartWatching();
 }
Ejemplo n.º 3
0
        public MainWindow()
        {
            InitializeComponent();

            Volume = Properties.Settings.Default.VOLUME;

            MemoryStream ms = new MemoryStream();

            (Properties.Resources.rss_circle_color).Save(ms);
            BitmapImage image = new BitmapImage();

            image.BeginInit();
            ms.Seek(0, SeekOrigin.Begin);
            image.StreamSource = ms;
            image.EndInit();


            Icon = image;

            notifyIcon         = new SimpleTrayIcon(this, Properties.Resources.rss_circle_color);
            notifyIcon.Visible = true;

            WindowState = WindowState.Minimized;
            Visibility  = Visibility.Hidden;
            try
            {
                string    olddata = File.ReadAllText(OLD_DATA_FILE_NAME);
                XDocument doc     = XDocument.Parse(olddata);
                oldCourseList = XDocToILIASCourseList(doc);
            }
            catch (Exception)
            {
            }
            getDataAndCompareWithOld();

            DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();

            dispatcherTimer.Tick    += new EventHandler(dispatcherTimer_Tick);
            dispatcherTimer.Interval = new TimeSpan(0, 0, 1, 0);
            dispatcherTimer.Start();
        }