Example #1
0
        public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null)
        {
            InitializeComponent();
            Icon = ShareXResources.Icon;

            HistoryPath = historyPath;
            Settings    = settings;

            tsMain.Renderer         = new CustomToolStripProfessionalRenderer();
            ilvImages.View          = (View)Settings.ViewMode;
            ilvImages.ThumbnailSize = Settings.ThumbnailSize;

            him = new HistoryItemManager(uploadFile, editImage);
            him.GetHistoryItems += him_GetHistoryItems;

            defaultTitle = Text;

            Settings.WindowState.AutoHandleFormState(this);
        }
Example #2
0
        public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null)
        {
            InitializeComponent();
            tsMain.Renderer = new ToolStripRoundedEdgeRenderer();

            HistoryPath = historyPath;
            Settings    = settings;

            ilvImages.ThumbnailSize = Settings.ThumbnailSize;

            if (ShareXResources.UseCustomTheme)
            {
                ilvImages.BorderStyle                  = BorderStyle.None;
                ilvImages.Colors.BackColor             = ShareXResources.Theme.DarkBackgroundColor;
                ilvImages.Colors.BorderColor           = ShareXResources.Theme.DarkBackgroundColor;
                ilvImages.Colors.ForeColor             = ShareXResources.Theme.TextColor;
                ilvImages.Colors.ImageInnerBorderColor = Color.Transparent;
                ilvImages.Colors.ImageOuterBorderColor = Color.Transparent;
                ilvImages.Colors.SelectedForeColor     = ShareXResources.Theme.TextColor;
                ilvImages.Colors.UnFocusedForeColor    = ShareXResources.Theme.TextColor;
            }

            him = new HistoryItemManager(uploadFile, editImage);
            him.GetHistoryItems       += him_GetHistoryItems;
            ilvImages.ContextMenuStrip = him.cmsHistory;

            defaultTitle = Text;

            tstbSearch.TextBox.HandleCreated += (sender, e) => tstbSearch.TextBox.SetWatermark(Resources.HistoryForm_Search_Watermark, true);

            if (Settings.RememberSearchText)
            {
                tstbSearch.Text = Settings.SearchText;
            }

            ShareXResources.ApplyTheme(this);

            if (Settings.RememberWindowState)
            {
                Settings.WindowState.ApplyFormState(this);
            }
        }
Example #3
0
        public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null)
        {
            InitializeComponent();
            ShareXResources.ApplyThemeToForm(this);

            HistoryPath = historyPath;
            Settings    = settings;

            tsMain.Renderer         = new ToolStripRoundedEdgeRenderer();
            ilvImages.View          = (View)Settings.ViewMode;
            ilvImages.ThumbnailSize = Settings.ThumbnailSize;

            him = new HistoryItemManager(uploadFile, editImage);
            him.GetHistoryItems += him_GetHistoryItems;

            defaultTitle = Text;

            if (Settings.RememberSearchText)
            {
                tstbSearch.Text = Settings.SearchText;
            }

            Settings.WindowState.AutoHandleFormState(this);
        }
Example #4
0
        public ImageHistoryForm(string historyPath, ImageHistorySettings settings, Action <string> uploadFile = null, Action <string> editImage = null)
        {
            InitializeComponent();
            tsMain.Renderer = new ToolStripRoundedEdgeRenderer();

            HistoryPath = historyPath;
            Settings    = settings;

            ilvImages.View          = (View)Settings.ViewMode;
            ilvImages.ThumbnailSize = Settings.ThumbnailSize;

            if (ShareXResources.ExperimentalDarkTheme)
            {
                ilvImages.BorderStyle               = BorderStyle.None;
                ilvImages.Colors.BackColor          = ShareXResources.Theme.LightBackgroundColor;
                ilvImages.Colors.BorderColor        = ShareXResources.Theme.BorderColor;
                ilvImages.Colors.ForeColor          = ShareXResources.Theme.TextColor;
                ilvImages.Colors.SelectedForeColor  = ShareXResources.Theme.TextColor;
                ilvImages.Colors.UnFocusedForeColor = ShareXResources.Theme.TextColor;
            }

            him = new HistoryItemManager(uploadFile, editImage);
            him.GetHistoryItems       += him_GetHistoryItems;
            ilvImages.ContextMenuStrip = him.cmsHistory;

            defaultTitle = Text;

            if (Settings.RememberSearchText)
            {
                tstbSearch.Text = Settings.SearchText;
            }

            ShareXResources.ApplyTheme(this);

            Settings.WindowState.AutoHandleFormState(this);
        }