Beispiel #1
0
        public int Compare(object aLHS, object aRHS)
        {
            MainFormListItem itemA = (MainFormListItem)aLHS;
            MainFormListItem itemB = (MainFormListItem)aRHS;
            string           strA  = itemA.SubItems[col].Text;
            string           strB  = itemB.SubItems[col].Text;
            int sign = sortOrder == SortOrder.Descending ? -1 : 1;

            int compareResult = 0;

            if (col == 0)
            {
                uint numA, numB;
                bool resultA = UInt32.TryParse(strA, out numA);
                bool resultB = UInt32.TryParse(strB, out numB);
                compareResult = numA.CompareTo(numB);
            }
            else if (col == 1)
            {
                float numA, numB;
                bool  resultA = float.TryParse(strA, out numA);
                bool  resultB = float.TryParse(strB, out numB);
                compareResult = numA.CompareTo(numB);
            }
            else
            {
                compareResult = strA.CompareTo(strB);
            }
            return(sign * compareResult);
        }
Beispiel #2
0
        private void showExplorerButton_Click(object sender, EventArgs e)
        {
            if (resultListView.SelectedItems.Count != 1)
            {// 1つも選択していないようなので何もしない
                return;
            }

            // エクスプローラに表示
            MainFormListItem listItem = (MainFormListItem)resultListView.SelectedItems[0];

            Utility.showExplorer(listItem.attachedSourceFile);
        }
Beispiel #3
0
        private void showIncludeTreeButton_Click(object sender, EventArgs e)
        {
            if (resultListView.SelectedItems.Count != 1)
            {// 1つも選択していないようなので何もしない
                return;
            }

            // ウインドウの作成と表示
            MainFormListItem listItem       = (MainFormListItem)resultListView.SelectedItems[0];
            CodeTreeForm     dependTreeForm = new CodeTreeForm(analyzer, listItem.attachedSourceFile, CodeTreeForm.Mode.IncludeTree);

            dependTreeForm.Show();
        }