Пример #1
0
        public MainWindow()
        {
            InitializeComponent();

            BtnLogin.Tag = PackIconOcticonsKind.SignIn;

            textblockLogin.DataContext = changedPropertyNotifier;
            rectLoginIcon.DataContext  = changedPropertyNotifier;

            iliasHandling = new CIliasHandling(this, changedPropertyNotifier);

            tabSync.Content          = new SyncPage(this, iliasHandling, changedPropertyNotifier);
            tabCourseConfig.Content  = new CoursePage(iliasHandling, changedPropertyNotifier);
            tabFolderConfig.Content  = new FolderPage();
            tabGeneralConfig.Content = new GeneralPage();
            tabInfo.Content          = new HelpPage();

            styleChanger = new StyleChanger(config);
            styleChanger.Hide();

            notifyIcon.Icon         = Properties.Resources.dliconWHITEsquare;
            notifyIcon.MouseDown   += new System.Windows.Forms.MouseEventHandler(NotifyIcon_MouseDown);
            notifyIcon.DoubleClick += delegate(object sender, EventArgs e)
            {
                this.Show();
                WindowState = WindowState.Normal;
            };
            notifyIcon.BalloonTipClicked += new EventHandler(NotifyIcon_BalloonTipClicked);
            updater = new CUpdate(notifyIcon, contextMenu);
        }
        public CoursePage(CIliasHandling mainIliasHandling, ChangedPropertyNotifier changedPropNotifier)
        {
            InitializeComponent();

            iliasHandling           = mainIliasHandling;
            changedPropertyNotifier = changedPropNotifier;

            listviewCourse.ItemsSource = iliasHandling.lCourseInfos;
            progressBar.DataContext    = changedPropertyNotifier;
            //listviewCourse.DataContext = changedPropertyNotifier;

            //iliasHandling.lCourseInfos.Add(new CourseInfo() { CourseChecked = true, CourseName = "ET-BS2", CourseOwnName = "BS2", CourseId = "28374" });
            //iliasHandling.lCourseInfos.Add(new CourseInfo() { CourseChecked = false, CourseName = "ET", CourseOwnName = "Bla", CourseId = "28323" });
        }
Пример #3
0
        public SyncPage(MainWindow mainWindow, CIliasHandling mainIliasHandling, ChangedPropertyNotifier changedPropNotifier)
        {
            InitializeComponent();

            window                  = mainWindow;
            iliasHandling           = mainIliasHandling;
            changedPropertyNotifier = changedPropNotifier;

            stackSyncButton.DataContext = changedPropertyNotifier;
            iconSync.DataContext        = changedPropertyNotifier;
            progBarFile.DataContext     = changedPropertyNotifier;
            progBarCourses.DataContext  = changedPropertyNotifier;
            lbProgFile.DataContext      = changedPropertyNotifier;
            lbProgCourses.DataContext   = changedPropertyNotifier;
            lbNewFilesCount.DataContext = changedPropertyNotifier;

            listViewSync.ItemsSource = iliasHandling.lFiles;
            listViewSync.DataContext = changedPropertyNotifier;
        }