示例#1
0
        private void CreateButton(IoItem item)
        {
            var settings = SharedSettings.GetInstance();

            var content = new WrapPanel();

            content.Children.Add(new Image {
                Source = item.GetSmallIcon(), Height = 16, Width = 16, Margin = new Thickness(2)
            });
            content.Children.Add(new TextBlock {
                Text = item.Name, Margin = new Thickness(2), TextTrimming = TextTrimming.CharacterEllipsis, Width = 70
            });
            var btnProgram = new Button
            {
                Content = content,
                Tag     = item,
                HorizontalContentAlignment = HorizontalAlignment.Left,
                Foreground = settings.UiForeBrush,
                Background = settings.UiGradientBrushV,
                Margin     = new Thickness(5),
                Width      = 100,
                ToolTip    = item.Name
            };

            btnProgram.Click += BtnProgramClick;
            pnlPrograms.Children.Add(btnProgram);
        }
示例#2
0
        private void CreateButton(IoItem location)
        {
            var settings = SharedSettings.GetInstance();

            var content = new WrapPanel();

            content.Children.Add(new Image {
                Source = location.GetSmallIcon(), Height = 16, Width = 16, Margin = new Thickness(2)
            });
            content.Children.Add(new TextBlock {
                Text = location.Name, Margin = new Thickness(2)
            });
            var btnLocation = new Button
            {
                Content = content,
                Tag     = location,
                HorizontalContentAlignment = HorizontalAlignment.Left,
                Foreground = settings.UiForeBrush,
                Background = settings.UiGradientBrushV,
                Margin     = new Thickness(5)
            };

            btnLocation.Click += btnLocation_Click;

            pnlButtons.Children.Add(btnLocation);
        }
示例#3
0
 public ShutdownMenu()
 {
     InitializeComponent();
     settings = SharedSettings.GetInstance();
     settings.ColorsUpdated += new System.EventHandler(SettingsColorsUpdated);
     ColorComponents();
 }
示例#4
0
 public ColorPickerSelector()
 {
     InitializeComponent();
     OldColor = Colors.Black;
     settings = SharedSettings.GetInstance();
     settings.ColorsUpdated += SettingsColorsUpdated;
     ColorComponents();
 }
示例#5
0
        public LocationMenu()
        {
            InitializeComponent();
            LoadLocations();
            var settings = SharedSettings.GetInstance();

            icon.Foreground = settings.UiForeBrushGlassL;
            this.Loaded    += LocationMenu_Loaded;
        }
示例#6
0
        private void LoadMenu()
        {
            var manager = new ProgramManager();
            var items   = manager.GetProgramMenu();

            LoadMenuItems(items);

            var settings = SharedSettings.GetInstance();

            icon.Foreground = settings.UiForeBrushGlassL;
        }
示例#7
0
        public SettingsControl()
        {
            InitializeComponent();

            settings = SharedSettings.GetInstance();
            settings.ColorsUpdated += SettingsColorsUpdated;
            ColorComponents();
            LoadOptions();

            slGlass.ValueChanged += slGlass_ValueChanged;
            cbHideTaskbar.Click  += CbHideTaskbarClick;
        }
示例#8
0
        private void FillStart()
        {
            var settings = SharedSettings.GetInstance();

            AllApps.Foreground            = settings.UiForeBrush;
            Explore10.Foreground          = settings.UiForeBrush;
            Background                    = settings.UiBrushGlass;
            ProgramList.Visibility        = Visibility.Hidden;
            ProgramList.Height            = SystemParameters.FullPrimaryScreenHeight - 210;
            ProgramList.VerticalAlignment = VerticalAlignment.Top;
            ProgramParent.Visibility      = Visibility.Hidden;
            ProgramParent.Height          = SystemParameters.FullPrimaryScreenHeight - 210;
        }
示例#9
0
        public WorkspaceSetter(TaskWindow taskWindow, MenuWindow menu, Desktop desktop)
        {
            this.taskWindow = taskWindow;
            this.menu       = menu;
            this.desktop    = desktop;
            settings        = SharedSettings.GetInstance();
            if (settings.TaskbarAlwaysVisible)
            {
                taskWindow.SizeChanged += TaskWindowSizeChanged;
            }
            menu.SizeChanged += TaskWindowSizeChanged;

            DrawWorkSpace();
        }
示例#10
0
        public Battery()
        {
            InitializeComponent();
            //inital text
            var settings = SharedSettings.GetInstance();

            ucBattery.Foreground = settings.UiForeBrush;
            ucBattery.Text       = "Battery Remaining: " + GetBatteryPercent() + "%";
            //set up timer
            var timer = new Timer(60000);

            timer.Elapsed  += Timer_Elapsed;
            timer.AutoReset = true;
            timer.Enabled   = true;
        }
示例#11
0
        public Wifi()
        {
            InitializeComponent();
            //inital text
            var settings = SharedSettings.GetInstance();

            ucWifi.Foreground = settings.UiForeBrush;
            ucWifi.Text       = "Wifi Signal: " + GetWifiSignal();
            //set up timer
            var timer = new Timer(60000);

            timer.Elapsed  += Timer_Elapsed;
            timer.AutoReset = true;
            timer.Enabled   = true;
        }
示例#12
0
        public DesktopButton(IoItem desktopItem)
        {
            this.desktopItem = desktopItem;

            InitializeComponent();

            Background = new ImageBrush(desktopItem.GetLargeIcon())
            {
                Stretch = Stretch.None
            };
            DisplayName = desktopItem.Name;


            settings = SharedSettings.GetInstance();
            ColorComponents();
            settings.ColorsUpdated += SettingsColorsUpdated;
        }
示例#13
0
        public Task(Window window)
        {
            InitializeComponent();
            this.window = window;

            settings     = SharedSettings.GetInstance();
            Loaded      += UpdateThumb;
            SizeChanged += UpdateThumb;
            SizeChanged += TaskSizeChanged;

            imgIcon16.Source = window.ProgramIcon;
            imgIcon32.Source = window.ProgramIcon;
            taskLabel.Text   = window.Title;

            window.TitleChanged += WindowTitleChanged;

            SetColors();
            settings.ColorsUpdated += SettingsColorsUpdated;
        }
示例#14
0
 void SlideMenuLoaded(object sender, RoutedEventArgs e)
 {
     settings = SharedSettings.GetInstance();
     settings.ColorsUpdated += SettingsColorsUpdated;
     ColorComponents();
 }