public FindInFilesOptionsController(FindInFilesController find) : base(NSObject.AllocAndInitInstance("FindInFilesOptionsController"))
		{
			Unused.Value = NSBundle.loadNibNamed_owner(NSString.Create("find-in-files-options"), this);
			m_find = find;
			
			m_canRemove = new IBOutlet<NSNumber>(this, "canRemove");
			this.willChangeValueForKey(NSString.Create("canRemove"));
			m_canRemove.Value = NSNumber.Create(true);
			this.didChangeValueForKey(NSString.Create("canRemove"));
			
			m_dirsTable = new IBOutlet<NSTableView>(this, "dirsTable");
			m_dirsTable.Value.setDelegate(this);
			
			Unused.Value = window().setFrameAutosaveName(NSString.Create("find in files options panel"));
		}
Example #2
0
        public void UseSelectionForReplace()
        {
            if (m_find == null)
                m_find = new FindController();
            if (m_findInFiles == null)
                m_findInFiles = new FindInFilesController();

            IText text = DoFindTextWindow();
            Contract.Assert(text != null, "text is null");

            string s = text.Text.Substring(text.Selection.location, text.Selection.length);
            if (s.Length > 0)
            {
                m_find.UpdateReplaceList();
                m_findInFiles.UpdateReplaceList();
            }
            m_find.ReplaceText = s;
            m_findInFiles.ReplaceText = s;
        }
Example #3
0
        public void FindInFiles()
        {
            if (m_findInFiles == null)
                m_findInFiles = new FindInFilesController();

            m_findInFiles.Open(this);
        }