コード例 #1
0
        public HierarhicalTimelineLog()
        {
            InitializeComponent();

            AutoSize  = true;
            BackColor = System.Drawing.Color.White;

            LogFilter         = "";
            ShowGenericTracks = true;

            this.tracker.OnZoomChanged           += OnSequencerControlZoomChanged;
            this.tracker.OnPanOffsetChanged      += OnSequencerControlPanOffsetChanged;
            this.tracker.OnItemSelectionChanged  += OnSequencerControlItemSelectionChanged;
            this.tracker.OnTrackSelectionChanged += OnSequencerControlTrackSelectionChanged;

            this.ReViewOverviewControl.OverviewInterface = this.tracker;

            this.viewportContainer.HorizontalScrollBarMarginsChanged += OnHorizontalSrollBarMarginsChanged;

            textUpdateEvent         = new AutoResetEvent(false);
            textUpdateRefreshThread = new Thread(new ThreadStart(UpdateText));
            textUpdateRefreshThread.IsBackground = true;
            textUpdateRefreshThread.Start();

            UserPreferencesManager.Instance.OnUserPreferencesChanged += OnUserPreferencesChanged;

            HTLButtonContainer = new HTLButtonContainer();
        }
コード例 #2
0
        /// <summary>
        /// Create log flag filter buttons based on user preferences
        /// </summary>
        private void CreateLogFlagFilterButtons()
        {
            FlowLayoutPanel logFlagFilterButtonFlowLayout = HTLButtonContainer.GetLogFlagFilterFlowLayoutPanel();

            logFlagFilterButtonFlowLayout.SuspendLayout();

            logFlagFilterButtonFlowLayout.Controls.Clear();

            foreach (LogFlagColor logFlagColor in UserPreferencesManager.Instance.UserPreferences.LogFlagColors)
            {
                if (logFlagColor.DisplayFilterButton)
                {
                    System.Windows.Forms.CheckBox logFlagFilterButton = new System.Windows.Forms.CheckBox();
                    logFlagFilterButton.Appearance = Appearance.Button;
                    logFlagFilterButton.Margin     = new System.Windows.Forms.Padding(5, 0, 0, 0);
                    logFlagFilterButton.Size       = new Size(75, 64);
                    logFlagFilterButton.Text       = "+" + logFlagColor.Name;
                    logFlagFilterButton.FlatStyle  = FlatStyle.Flat;
                    logFlagFilterButton.FlatAppearance.BorderSize       = 0;
                    logFlagFilterButton.FlatAppearance.CheckedBackColor = logFlagColor.Color;
                    logFlagFilterButton.BackColor         = logFlagFilterButton.FlatAppearance.CheckedBackColor;
                    logFlagFilterButton.Font              = new System.Drawing.Font("Calibri", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                    logFlagFilterButton.ForeColor         = logFlagFilterButton.BackColor.GetBrightness() <= 0.5f ? Color.White : Color.Black;
                    logFlagFilterButton.TextAlign         = System.Drawing.ContentAlignment.MiddleCenter;
                    logFlagFilterButton.TextImageRelation = TextImageRelation.ImageAboveText;
                    logFlagFilterButton.Tag                        = logFlagColor;
                    logFlagFilterButton.CheckedChanged            += logFlagFilterButton_CheckedChanged;
                    logFlagFilterButton.CheckState                 = CheckState.Checked;
                    logFlagFilterButton.Checked                    = true;
                    logFlagFilterButton.UseVisualStyleBackColor    = false;
                    logFlagFilterButton.FlatAppearance.BorderColor = logFlagFilterButton.Checked ? Color.Black : logFlagFilterButton.FlatAppearance.CheckedBackColor;
                    logFlagFilterButtonFlowLayout.Controls.Add(logFlagFilterButton);
                }
            }

            logFlagFilterButtonFlowLayout.ResumeLayout();
        }
コード例 #3
0
 public override FlowLayoutPanel GetToolbarButtonFlowLayout()
 {
     return(HTLButtonContainer.GetFlowLayoutPanel());
 }