Esempio n. 1
0
        public Menu()
        {
            InitializeComponent();
            SettingsButton.Text("Settings");
            HistoryButton.Text("History");
            BookmarksButton.Text("Bookmarks");
            DownloadsButton.Text("Downloads");
            ExtensionsButton.Text("Extensions");
            WindowButton.Text("New window");
            FullscreenButton.Text("Fullscreen");
            ScreenButton.Text("Take screenshot");
            DevButton.Text("Developer tools");
            IncognitoButton.Text("Incognito");

            SettingsButton.ImageSource("settings.png");
            HistoryButton.ImageSource("history.png");
            BookmarksButton.ImageSource("bookmarks.png");
            DownloadsButton.ImageSource("download.png");
            ExtensionsButton.ImageSource("extension.png");
            WindowButton.ImageSource(("window.png"));
            FullscreenButton.ImageSource("fullscreen.png");
            ScreenButton.ImageSource("screen.png");
            DevButton.ImageSource("dev.png");
            IncognitoButton.ImageSource("privacy.png");
        }
        protected void SetupWidgetBar()
        {
            pm_button   = new PartyModeButton();
            fs_button   = new FullscreenButton();
            sort_button = new SortButton();

            widget_bar = new ClutterWidgetBar(new Actor[] { pm_button, fs_button, sort_button });
            widget_bar.ShowAll();
            Stage.Add(widget_bar);
            widget_bar.SetPosition(5, 5);
        }
Esempio n. 3
0
 private void FullscreenButton_OnPreviewMouseUp(object sender, MouseButtonEventArgs e)
 {
     ExecuteStoryBoard();
     if (StaticDeclarations.IsFullscreen)
     {
         StaticDeclarations.IsFullscreen = false;
         mainWindow.WindowState          = WindowState.Maximized;
         mainWindow.ShowTabs();
         FullscreenButton.ImageSource("fullscreen.png");
         foreach (TabView page in mainWindow.Pages)
         {
             page.WebView.Margin = new Thickness(0, 42, 0, 0);
             page.Panel.Height   = 42;
             page.SnackBar.Text("You turned off fullscreen mode");
             page.SnackBar.Visibility = Visibility.Visible;
             StaticFunctions.AnimateHeight(0, 42, page.SnackBar, 0.1);
             StaticFunctions.AnimateHeight(3, 42, page.Panel, 0.15);
             page.Refresh();
         }
     }
     else
     {
         mainWindow.HideTabs();
         mainWindow.WindowState          = WindowState.Maximized;
         StaticDeclarations.IsFullscreen = true;
         FullscreenButton.ImageSource("fullscreen-exit.png");
         foreach (TabView page in mainWindow.Pages)
         {
             page.WebView.Margin = new Thickness(0);
             page.Panel.Height   = 3;
             page.SnackBar.Text("You turned on fullscreen mode");
             page.SnackBar.Visibility = Visibility.Visible;
             StaticFunctions.AnimateHeight(42, 3, page.Panel, 0.15);
             StaticFunctions.AnimateHeight(0, 42, page.SnackBar, 0.1);
             page.Refresh();
         }
     }
 }