Ejemplo n.º 1
0
        private void panel_Control_MouseUp(object sender, MouseEventArgs e)
        {
            ClsDatMotion clMotion = ClsSystem.GetSelectMotion();

            if (clMotion == null)
            {
                return;
            }

            //以下、エレメントをドロップする処理
            if (e.Button == MouseButtons.Left)
            {
                if (this.mFormDragLabel != null)
                {
                    if (!this.mFormDragLabel.IsDisposed)
                    {
                        bool isHit = false;

                        //以下、子供として登録する処理
                        ClsDatElem clElemBase = clMotion.FindElemFromMark(EnmMarkElement.IN);
                        if (clElemBase != null)
                        {
                            ClsDatElem clElem = this.mFormDragLabel.GetElem();
                            clElemBase.AddElemChild(clElem);

                            isHit = true;
                        }

                        //以下、自分の兄として登録する処理
                        clElemBase = clMotion.FindElemFromMark(EnmMarkElement.UP);
                        if (clElemBase != null)
                        {
                            ClsDatElem clElem = this.mFormDragLabel.GetElem();
                            clElemBase.AddElemBigBrother(clElem);

                            isHit = true;
                        }

                        //以下、行番号割り振り処理
                        if (isHit)
                        {
                            clMotion.RefreshLineNo();
                        }
                    }

                    this.mFormDragLabel.Close();
                    this.mFormDragLabel.Dispose();
                    this.mFormDragLabel = null;
                }

                //以下、マークをクリアする処理
                clMotion.ClearInsertMark();

                //以下、コントロール更新処理
                this.RefreshControl();
                this.panel_Control.Refresh();
                this.panel_Time.Refresh();
                this.mFormMain.Refresh();
            }
        }