示例#1
0
        public override void Start(NamedId who)
        {
            var td = DateTime.Now - Hot.FirstSpeech;
            var x  = Hot.TimelineParts.GetScRect(TarPane, CodeRect.FromLTRB(0, -1, (int)(td.TotalSeconds * 12), -1)).Width / 12;
            var p  = FeatureLogPanelCustom.IsLogDrawing ? 70 : 90;

            Pane.Scroll = ScreenPos.FromInt(-x + Pane.GetPaneRect().Width *p / 100, Pane.Scroll.Y);
            Pane.Invalidate(null);
        }
示例#2
0
 private void Pane_SizeChanged(object sender, EventArgs e)
 {
     if (LogParts != null)
     {
         var r = Pane.GetPaneRect();
         LogParts.SetMargin(ScreenRect.FromLTRB(r.RB.X - 480, 0, 0, 0));
     }
     else
     {
         Timer.AddTrigger(200, () =>
         {
             Pane_SizeChanged(this, EventArgs.Empty);
         });
     }
 }
示例#3
0
        /// <summary>
        /// マウスアップの最終処理
        /// </summary>
        protected virtual void OnFinalizeMouseUpJob()
        {
            if (_mouseDownOriginal != null)
            {
                var movedCount = 0;

                // 移動パーツをデータに反映させる
                foreach (DictionaryEntry de in _pos)
                {
                    var parts = (PartsBase)de.Key;
                    var pos   = (PartsPositionManager.Pos3)de.Value;
                    if (pos.Now.LT.Equals(pos.Org.LT) == false || pos.Now.RB.X != pos.Org.RB.X)
                    {
                        if (movedCount == 0)
                        {
                            Persister[REDO].Save(_selectedParts, _meansSelectedParts);
                        }
                        // データ更新
                        Link.Equalization(parts, false);    // Data~Partsのデータ連動

                        // REDO永続化(パーツ)
                        //savePartsWithFriend(Persister[REDO], parts, new Hashtable());

                        // REDO永続化(レコード)
                        foreach (RecordBase rb in Link.GetRecordset(parts))
                        {
                            Persister[REDO].Save(rb, _meansSelectedParts);
                        }
                        movedCount++;
                    }
                }

                // 移動終了
                _mouseDownOriginal = null;
                _pos.Clear();

                Persister[REDO].EndChunk(); // REDOを先に行うことは重要
                Persister[UNDO].EndChunk();
                Pane.Invalidate(Pane.GetPaneRect());
            }
        }