Ejemplo n.º 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);
        }
Ejemplo n.º 2
0
 private void BtnStyle_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         styleChanger.Show();
     }
     catch (InvalidOperationException)
     {
         styleChanger = new StyleChanger(config);
         styleChanger.Show();
     }
 }