Changeset 33683
- Timestamp:
- 05/31/09 15:06:58 (4 years ago)
- Location:
- lang/csharp/soyText/soyText
- Files:
-
- 1 added
- 11 modified
-
Debug.cs (modified) (2 diffs)
-
DocumentSet.cs (modified) (3 diffs)
-
EditorTab.cs (modified) (6 diffs)
-
Form2.cs (modified) (6 diffs)
-
NotCondition.cs (added)
-
SearchLogSet.cs (modified) (4 diffs)
-
bin/Debug/soyText.application (modified) (1 diff)
-
bin/Debug/soyText.exe (modified) (previous)
-
bin/Debug/soyText.exe.manifest (modified) (2 diffs)
-
bin/Debug/soyText.pdb (modified) (previous)
-
bin/Debug/soyText.vshost.application (modified) (1 diff)
-
soyText.suo (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
lang/csharp/soyText/soyText/Debug.cs
r33260 r33683 3 3 using System.Linq; 4 4 using System.Text; 5 using System.Windows.Forms; 5 6 6 7 namespace SoyText … … 13 14 statusText = o + ""; 14 15 } 16 public static void alert(object o) 17 { 18 MessageBox.Show(o + ""); 19 } 15 20 } 16 21 } -
lang/csharp/soyText/soyText/DocumentSet.cs
r33578 r33683 13 13 public class DocumentSet 14 14 { 15 internal SearchLogSet searchLogSet; 15 16 public int maxHandle = -1; 16 17 internal Workspace workspace; … … 27 28 { 28 29 workspace = w; 30 searchLogSet = new SearchLogSet(this); 29 31 } 30 32 public static int cnt=0; … … 91 93 } 92 94 } 95 public void clear() 96 { 97 cache = null; 98 } 93 99 public int createHandle() 94 100 { -
lang/csharp/soyText/soyText/EditorTab.cs
r33649 r33683 17 17 public TabPage tabPage; 18 18 public Workspace workspace; 19 public Form2 parentForm; 19 20 Document _curDoc; 20 21 public Document curDoc … … 27 28 //String _statusText = ""; 28 29 //Queue<SyncUIAction> uiActionQueue = new Queue<SyncUIAction>(); 30 string initialCondition; 29 31 public void onLoad(object sender, EventArgs e) 30 32 { 33 if (searchOnLoad) initList(); 34 ActiveControl = command; 35 } 36 public void initList() 37 { 38 if (listInited) return; 31 39 documentSet.getRecents(); 32 newDocument(); 33 refreshList(); 34 35 ActiveControl = command; 40 if (initialCondition != "") 41 { 42 refreshList(initialCondition); 43 } 44 else 45 { 46 newDocument(); 47 refreshList(); 48 } 49 listInited = true; 36 50 } 37 51 /*public String statusText … … 42 56 } 43 57 }*/ 44 public EditorTab(Workspace w) 45 { 46 workspace = w; 58 bool searchOnLoad; 59 bool listInited = false; 60 61 public EditorTab(Form2 parent,string condition, bool searchOnLoad) 62 { 63 initialCondition = condition; 64 this.searchOnLoad = searchOnLoad; 65 parentForm = parent; 66 workspace = parentForm.workspace; 47 67 InitializeComponent(); 68 command.Text = condition; 48 69 prevDist = splitContainer1.SplitterDistance; 49 70 //curDoc = documentSet.createDocument(); … … 79 100 SyncUI.exe(a); 80 101 } 81 public void refreshList(String kw) 102 static bool firstTab=true; 103 public void refreshList(string kw) 82 104 { 83 105 if (kw == "" || kw==null) Text = "soyText"; … … 85 107 if (titleChanged != null) titleChanged(kw); 86 108 if (documentSearcher != null) documentSearcher.terminate(); 109 if (kw!=null && kw!="") documentSet.searchLogSet.addOrGet(kw); 110 var ft = firstTab; 111 firstTab = false; 87 112 searchThread.exec(delegate(TerminableThread t) 88 113 { … … 95 120 delegate(Document d) 96 121 { 97 cnt++;98 122 if (cnt < 100) 99 123 { 100 syncUI(delegate() { docListBox.Items.Add(d); }); 124 if (documentSet.searchLogSet.add(d)) 125 { 126 if (ft) 127 { 128 //Debug.alert(d.content + " / " + d.parsed["condition"]); 129 syncUI(delegate() 130 { 131 parentForm.newTab(d.parsed["condition"],false); 132 }); 133 } 134 } 135 else 136 { 137 cnt++; 138 syncUI(delegate() { docListBox.Items.Add(d); }); 139 } 101 140 return FoundHandlerAction.Accept; 102 141 } -
lang/csharp/soyText/soyText/Form2.cs
r33649 r33683 13 13 { 14 14 EditorTab curTab; 15 Workspace workspace;15 public Workspace workspace; 16 16 public int inst = 0; 17 public void newTab(string query )17 public void newTab(string query, bool searchOnLoad) 18 18 { 19 19 var t=tabControl1.TabPages; 20 20 t.Add(query!=""?query:"all"); 21 21 var b = t[t.Count - 1]; 22 curTab = new EditorTab(workspace);23 curTab.Dock = DockStyle.Fill;24 curTab.Load += curTab.onLoad;25 curTab.titleChanged = delegate(string kw)22 var nTab = new EditorTab(this,query,searchOnLoad); 23 nTab.Dock = DockStyle.Fill; 24 nTab.Load += nTab.onLoad; 25 nTab.titleChanged = delegate(string kw) 26 26 { 27 27 if (kw == "" || kw == null) Text = "soyText"; … … 29 29 b.Text = (kw==""|| kw==null) ? "all":kw; 30 30 }; 31 32 tabControl1.SelectedTab = b; 33 b.Controls.Add(curTab); 31 if (searchOnLoad) 32 { 33 tabControl1.SelectedTab = b; 34 curTab = nTab; 35 } 36 b.Controls.Add(nTab); 34 37 } 35 38 public Form2(Workspace workspace) … … 37 40 this.workspace = workspace; 38 41 InitializeComponent(); 39 newTab("" );42 newTab("",true); 40 43 inst++; 41 44 } … … 83 86 private void 最新の情報に更新RToolStripMenuItem_Click(object sender, EventArgs e) 84 87 { 88 curTab.documentSet.clear(); 85 89 curTab.refreshList(curTab.command.Text); 86 90 } … … 93 97 private void 新規タブTToolStripMenuItem_Click(object sender, EventArgs e) 94 98 { 95 newTab("" );99 newTab("",true); 96 100 } 97 101 … … 107 111 { 108 112 Text = curTab.Text; 113 curTab.initList(); 109 114 } 110 115 } -
lang/csharp/soyText/soyText/SearchLogSet.cs
r33649 r33683 12 12 { 13 13 this.superSet = superSet; 14 list= new Dictionary<string, Document>();14 expr2doc = new Dictionary<string, Document>(); 15 15 recents = new DocumentList(); 16 16 } 17 Dictionary<string,Document> list= null;17 Dictionary<string,Document> expr2doc = null; 18 18 DocumentList recents; 19 19 … … 22 22 if (d.parsed["type"] != "SearchLog") return false; 23 23 var c=d.parsed["condition"]; 24 if (! list.ContainsKey(c)) {25 list[c]=d;24 if (!expr2doc.ContainsKey(c)) { 25 expr2doc[c]=d; 26 26 recents.add(d); 27 27 } … … 32 32 return recents; 33 33 } 34 public void add(string searchExpr)34 public Document addOrGet(string searchExpr) 35 35 { 36 36 var c = searchExpr; 37 if (! list.ContainsKey(c))37 if (!expr2doc.ContainsKey(c)) 38 38 { 39 39 var d = superSet.createDocument(); … … 42 42 d.save(); 43 43 add(d); 44 return d; 44 45 } 46 return expr2doc[c]; 45 47 } 46 48 } -
lang/csharp/soyText/soyText/bin/Debug/soyText.application
r33649 r33683 12 12 </dsig:Transforms> 13 13 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 14 <dsig:DigestValue> NzImv/+409azqvCZyF3CI7ckSG0=</dsig:DigestValue>14 <dsig:DigestValue>C9XaxFQ/9lz54FYwGPtvEdCF4YM=</dsig:DigestValue> 15 15 </hash> 16 16 </dependentAssembly> -
lang/csharp/soyText/soyText/bin/Debug/soyText.exe.manifest
r33649 r33683 113 113 </dependency> 114 114 <dependency> 115 <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="soyText.exe" size="8 0896">115 <dependentAssembly dependencyType="install" allowDelayedBinding="true" codebase="soyText.exe" size="81920"> 116 116 <assemblyIdentity name="soyText" version="1.0.0.0" language="neutral" processorArchitecture="msil" /> 117 117 <hash> … … 120 120 </dsig:Transforms> 121 121 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 122 <dsig:DigestValue> xoIpTSHlzPf6s71Jq19Wy0TeQ30=</dsig:DigestValue>122 <dsig:DigestValue>uF4OMnEc8Lq66CZx9rxVUYlFjWo=</dsig:DigestValue> 123 123 </hash> 124 124 </dependentAssembly> -
lang/csharp/soyText/soyText/bin/Debug/soyText.vshost.application
r33649 r33683 12 12 </dsig:Transforms> 13 13 <dsig:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1" /> 14 <dsig:DigestValue> NzImv/+409azqvCZyF3CI7ckSG0=</dsig:DigestValue>14 <dsig:DigestValue>C9XaxFQ/9lz54FYwGPtvEdCF4YM=</dsig:DigestValue> 15 15 </hash> 16 16 </dependentAssembly>
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)