Пример #1
0
        void Init()
        {
            Console.WriteLine("Started Init...");
            _current = this;

            _notifyiconmanager = new NotifyIconManager(AddNewNotification);
            SetPanelPos(PanelPosition);
            //Dispatcher.Invoke(() => SetTopMost());
            //_drawer = new AppDrawer();
            DesktopD d = new DesktopD();

            d.Show();
            ClockTimer.Elapsed += ClockTimer_Elapsed;
            ClockTimer.Start();
            d.InitializeDesktop();
            _drawer = new AppDrawer();
        }
Пример #2
0
        void Init()
        {
            Config.Current = new Config(Directory.GetCurrentDirectory() + "\\Config", "config", ".json");

            Dispatcher.Invoke(
              () =>
              {
                  usermenu.Header = Environment.UserName;
                  _appChooser = new AppChooser();

                  _current = this;
                  DesktopD D = new DesktopD();
                  D.Show();
                  Clock.Header = DateTime.Now.ToString("HH:mm:ss");

                  ClockTimer.Elapsed += (object sender, ElapsedEventArgs e) => { Dispatcher.Invoke(() => Clock.Header = DateTime.Now.ToString("HH:mm:ss")); };
                  ClockTimer.Start();
                  menu.ContextMenu = new ContextMenu();
                  MenuItem m = new MenuItem();
                  m.Header = "Choose Items...";
                  m.Click += (object sender, RoutedEventArgs e) => { _appChooser = new AppChooser(); _appChooser.Show(); };
                  menu.ContextMenu.Items.Add(m);
                  try
                  {
                      Volume.Value = defaultPlaybackDevice.Volume;
                  }
                  catch
                  {

                  }
                  D.InitializeDesktop();
                  Dock d = new Dock();
                  d.Show();
              });

            WindowManager wm = new WindowManager(AddNewTaskItem);
            _notifyiconmanager = new NotifyIconManager(AddNewNotification);
            _applist = new List<xApp>();
            SetPanelPos(PanelPosition);
            _appListing = new AppsListing();
            new Thread(new ThreadStart(GetApps)).Start();

           // Dispatcher.Invoke(() => SetTopMost());
        }