Beispiel #1
0
        private void FindString_TextChanged(object sender, EventArgs e)
        {
            /// 기존의 들어있던 내용은 다 지운다.
            m_lvCandidate.Items.Clear();

            List <ProjectFileData> m_files = FileCollector.GetInstance().GetFiles();

            foreach (ProjectFileData data in m_files)
            {
                string compareStr = data.m_strFileName;

                /// include extension 체크박스가 꺼져 있고, 찾는 문자열에 . 이 포함되어 있지 않으면 파일명에서만 검색한다.
                if (m_cbIncludeExt.Checked == false && m_tbFindString.Text.Contains(".") == false)
                {
                    compareStr = System.IO.Path.GetFileNameWithoutExtension(compareStr);
                }

                if (compareStr.ToLower().Contains(m_tbFindString.Text.ToLower()))
                {
                    ListViewItem item = new ListViewItem(data.m_strFileName);
                    item.SubItems.Add(data.m_strFullPath);
                    m_lvCandidate.Items.Add(item);
                }
            }

            if (m_lvCandidate.Items.Count > 0)
            {
                m_lvCandidate.Items[0].Selected = true;
            }
        }
Beispiel #2
0
        public OpenFileInSolutionForm(DTE2 _app)
        {
            FileCollector.GetInstance().SetDTE(_app);
            FileCollector.GetInstance().StartCollect();

            m_app = _app;
            InitializeComponent();

            m_originalTitle = this.Text;

            UpdateTitle();
        }
Beispiel #3
0
        private void UpdateTitle()
        {
            StringBuilder builder = new StringBuilder(m_originalTitle);

            if (FileCollector.GetInstance().Collecting)
            {
                builder.Append(" - collecting - ");
                builder.Append(FileCollector.GetInstance().GetCollectedFileCount());
            }
            else
            {
                builder.Append(" - collected - ");
                builder.Append(FileCollector.GetInstance().GetCollectedFileCount());
            }

            this.Text = builder.ToString();
        }
Beispiel #4
0
 private void m_btRefreshStatus_Click(object sender, EventArgs e)
 {
     FileCollector.GetInstance().Recollect();
 }