Example #1
0
        public TimelineView(TimelineController controller_)
        {
            this.soundPlayProcess = new ACT.Process.SoundPlayProcess();

            controller = controller_;
            controller.TimelineUpdate    += controller_TimelineUpdate;
            controller.CurrentTimeUpdate += controller_CurrentTimeUpdate;

            textWidth = 100;
            barWidth  = 100;

            SetupUI();

            this.MouseDown      += TimelineView_MouseDown;
            this.VisibleChanged += TimelineView_VisibleChanged;
            this.Move           += TimelineView_Move;
            this.FormClosing    += TimelineView_FormClosing;

            typeof(DataGridView).
            GetProperty("DoubleBuffered", BindingFlags.Instance | BindingFlags.NonPublic).
            SetValue(dataGridView, true, null);
            dataGridView.SelectionChanged      += (object sender, EventArgs args) => dataGridView.ClearSelection();
            dataGridView.AutoGenerateColumns    = false;
            dataGridView.Columns.Add(textColumn = new DataGridViewTextBoxColumn {
                DataPropertyName = "Name", AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
            });
            dataGridView.Columns.Add(timeLeftColumn = new TimeLeftColumn {
                Controller = controller_
            });

            MyOpacity             = 0.8;
            NumberOfRowsToDisplay = 3;
            MoveByDrag            = true;
            ShowOverlayButtons    = true;
            UpdateLayout();

            soundplayer = new CachedSoundPlayer();

            TimelineFont = new Font(FontFamily.GenericSansSerif, 12, FontStyle.Bold);
        }
        /*--- Method: Initialization ----------------------------------------------------------------------------------------------------------------------------------*/

        /// <summary> プロセスの初期化を実行します。
        /// </summary>
        /// <returns> 正常終了時 True </returns>
        private bool initProcess()
        {
            this.soundplayer = new CachedSoundPlayer();
            return(true);
        }