コード例 #1
0
ファイル: MindMapView.Command.cs プロジェクト: yfarm/Blumind
 public void CustomSort(int step)
 {
     if (SelectedTopics.Length > 0)
     {
         CustomSortCommand comd = new CustomSortCommand(SelectedTopics, step);
         ExecuteCommand(comd);
     }
 }
コード例 #2
0
ファイル: MindMapView.Command.cs プロジェクト: yfarm/Blumind
        public void CustomSort(Topic parent, int[] newIndices)
        {
            if (parent == null || newIndices == null || newIndices.Length == 0)
            {
                return;
            }

            CustomSortCommand comd = new CustomSortCommand(parent, newIndices);

            ExecuteCommand(comd);
        }
コード例 #3
0
        public void CustomSort(int step)
        {
            if (SelectedTopics.Length > 0)
            {
                Topic[] selecteds = SelectedTopics;
                Topic   root      = selecteds[0].GetRoot();
                if (selecteds[0].Type == TopicType.Barrier)
                {
                    if (selecteds[0].Left <= root.Left)
                    {
                        step = -step;
                    }
                }

                CustomSortCommand comd = new CustomSortCommand(SelectedTopics, step);
                ExecuteCommand(comd);
                Select(selecteds);
            }
        }