Exemplo n.º 1
0
        private static void AddUIElementsAndUpdateValues()
        {
            // Update values
            ConfigureSettings.ConfigColors.SetColors();
            LoadWindows.GetMainWindow.AllowDrop = true;

            LoadClickArrow(true);
            LoadClickArrow(false);
            Loadx2();
            LoadMinus();
            LoadRestoreButton();
            LoadGalleryShortcut();

            // Update WindowStyle
            if (!Properties.Settings.Default.ShowInterface)
            {
                GetClickArrowLeft.Opacity                      =
                    GetClickArrowRight.Opacity                 =
                        Getx2.Opacity                          =
                            GetMinus.Opacity                   =
                                GetRestorebutton.Opacity       =
                                    GetGalleryShortcut.Opacity =
                                        0;

                GetClickArrowLeft.Visibility                    =
                    GetClickArrowRight.Visibility               =
                        Getx2.Visibility                        =
                            GetMinus.Visibility                 =
                                GetGalleryShortcut.Visibility   =
                                    GetRestorebutton.Visibility =
                                        Visibility.Visible;
            }
            else if (Properties.Settings.Default.Fullscreen)
            {
                GetClickArrowLeft.Opacity                      =
                    GetClickArrowRight.Opacity                 =
                        Getx2.Opacity                          =
                            GetMinus.Opacity                   =
                                GetRestorebutton.Opacity       =
                                    GetGalleryShortcut.Opacity =
                                        1;

                GetClickArrowLeft.Visibility                    =
                    GetClickArrowRight.Visibility               =
                        Getx2.Visibility                        =
                            GetMinus.Visibility                 =
                                GetGalleryShortcut.Visibility   =
                                    GetRestorebutton.Visibility =
                                        Visibility.Visible;
            }

            // Add UserControls :)
            LoadTooltipStyle();
            LoadFileMenu();
            LoadImageSettingsMenu();
            LoadQuickSettingsMenu();
            LoadToolsAndEffectsMenu();
            LoadAutoScrollSign();

            Eventshandling.Go();

            // Initilize Things!
            RecentFiles.Initialize();
            InitializeZoom();

            // Add things!
            Timers.AddTimers();
            AddContextMenus();

            // Updates settings from older version to newer version
            if (Properties.Settings.Default.CallUpgrade)
            {
                Properties.Settings.Default.Upgrade();
                Properties.Settings.Default.CallUpgrade = false;
            }
        }