ScreenToGif/Controls/HideableTabControl.cs

(开头部分) 10KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using System;
using System.Diagnostics;
using System.Linq;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using ScreenToGif.FileWriters;
using ScreenToGif.Util;
using ScreenToGif.Windows;
using ScreenToGif.Windows.Other;

namespace ScreenToGif.Controls
{
    /// <summary>
    /// Basic class of a Hideable TabControl.
    /// </summary>
    public class HideableTabControl : TabControl
    {
        #region Variables

        private Button _hideButton;
        private Button _optionsButton;
        private Button _feedbackButton;
        private Button _helpButton;
        private TabPanel _tabPanel;
        private Border _border;

        #endregion

        static HideableTabControl()
        {
            DefaultStyleKeyProperty.OverrideMetadata(typeof(HideableTabControl), new FrameworkPropertyMetadata(typeof(HideableTabControl)));
        }

        public override void OnApplyTemplate()
        {
            base.OnApplyTemplate();

            _tabPanel = Template.FindName("TabPanel", this) as TabPanel;
            _border = Template.FindName("ContentBorder", this) as Border;

            _optionsButton = Template.FindName("OptionsButton", this) as ImageButton;
            _feedbackButton = Template.FindName("FeedbackButton", this) as ImageButton;
            _helpButton = Template.FindName("HelpButton", this) as ImageButton;
            _hideButton = Template.FindName("HideGridButton", this) as Button;

            //Options
            if (_optionsButton != null)
                _optionsButton.Click += (sender, args) =>
                {
                    var options = new Options { Owner = Window.GetWindow(this) };
                    options.ShowDialog();
                };

            //Feedback
            if (_feedbackButton != null)
                _feedbackButton.Click += (sender, args) =>
后面还有 208 行代码,解锁后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。