Skip to content

Commit 1a1bab0

Browse files
committed
Converted index to LiteDB from SQLite. Refactors, and release 1.1
1 parent fff9305 commit 1a1bab0

33 files changed

+386
-870
lines changed

.DS_Store

4 KB
Binary file not shown.

.gitignore

+10-1
Original file line numberDiff line numberDiff line change
@@ -337,4 +337,13 @@ ASALocalRun/
337337
.localhistory/
338338

339339
# BeatPulse healthcheck temp database
340-
healthchecksdb
340+
healthchecksdb
341+
Nats Standard Win 10 GUI.zip
342+
343+
Nats-Standard- CLI-Framework.zip
344+
345+
Nats-Standard-CLI-net-Core-3-1.zip
346+
347+
Nats-Standard-Gtk-Lin-Win-Mac.zip
348+
349+
Nats-Standard-MacOS.zip

NATS/.DS_Store

6 KB
Binary file not shown.

Standard/.DS_Store

2 KB
Binary file not shown.

Standard/Nats-Cli-Core/.DS_Store

6 KB
Binary file not shown.

Standard/Nats-Lin/.DS_Store

6 KB
Binary file not shown.
6 KB
Binary file not shown.

Standard/Nats-Lin/Nats-Linux/MainWindow.cs

+12-2
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ protected void searchClick(object sender, EventArgs e)
110110
else
111111
{
112112
entry1.Visible = false;
113-
bool useSmartSearch = false;
113+
bool useSmartSearch = SmartSearchAction.Active;//false;
114114
NATS.Filters.FileExtentionFilter.filterType filter = NATS.Filters.FileExtentionFilter.filterType.BlackList;
115115
string blacklist = string.Join("|", nats_standard.Nats.DefaultBlackList());
116116

@@ -121,7 +121,7 @@ protected void searchClick(object sender, EventArgs e)
121121
MemoryLoad = RamAction.Active,
122122
MultiLine = MultiLineAction.Active,
123123
ThreadCount = 4,
124-
SearchType = (MultiThreadAction.Active) ? NATS.ArgumentsObject.ArgumentsObject.eSearchType.Threaded : NATS.ArgumentsObject.ArgumentsObject.eSearchType.Single
124+
SearchType = GetSearchType()
125125
};
126126

127127

@@ -138,6 +138,16 @@ protected void searchClick(object sender, EventArgs e)
138138
}
139139
}
140140

141+
private NATS.ArgumentsObject.ArgumentsObject.eSearchType GetSearchType()
142+
{
143+
144+
if (MultiThreadAction.Active) return NATS.ArgumentsObject.ArgumentsObject.eSearchType.Threaded;
145+
if (IndexWLoadAction.Active) return NATS.ArgumentsObject.ArgumentsObject.eSearchType.indexgenerateandsearch;
146+
if (IndexOnlyAction.Active) return NATS.ArgumentsObject.ArgumentsObject.eSearchType.LocalIndex;
147+
return NATS.ArgumentsObject.ArgumentsObject.eSearchType.Single;
148+
}
149+
150+
141151
#region Background worker
142152

143153
private void Worker_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e)

Standard/Nats-Lin/Nats-Linux/gtk-gui/MainWindow.cs

+38-21
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ public partial class MainWindow
77

88
private global::Gtk.Action FileAction;
99

10-
private global::Gtk.Action OpenPathAction;
10+
private global::Gtk.Action openAction;
1111

12-
private global::Gtk.Action SaveAction;
12+
private global::Gtk.Action saveAction;
1313

14-
private global::Gtk.Action ExitAction;
14+
private global::Gtk.Action stopAction;
1515

1616
private global::Gtk.Action EnginesAction;
1717

@@ -27,7 +27,13 @@ public partial class MainWindow
2727

2828
private global::Gtk.Action HelpAction;
2929

30-
private global::Gtk.Action InfoAction;
30+
private global::Gtk.Action dialogInfoAction;
31+
32+
private global::Gtk.ToggleAction SmartSearchAction;
33+
34+
private global::Gtk.RadioAction IndexWLoadAction;
35+
36+
private global::Gtk.RadioAction IndexOnlyAction;
3137

3238
private global::Gtk.Table table1;
3339

@@ -52,15 +58,15 @@ protected virtual void Build()
5258
this.FileAction = new global::Gtk.Action("FileAction", global::Mono.Unix.Catalog.GetString("File"), null, null);
5359
this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString("File");
5460
w1.Add(this.FileAction, null);
55-
this.OpenPathAction = new global::Gtk.Action("OpenPathAction", global::Mono.Unix.Catalog.GetString("Open Path"), null, null);
56-
this.OpenPathAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Open Path");
57-
w1.Add(this.OpenPathAction, null);
58-
this.SaveAction = new global::Gtk.Action("SaveAction", global::Mono.Unix.Catalog.GetString("Save"), null, null);
59-
this.SaveAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Save");
60-
w1.Add(this.SaveAction, null);
61-
this.ExitAction = new global::Gtk.Action("ExitAction", global::Mono.Unix.Catalog.GetString("Exit"), null, null);
62-
this.ExitAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit");
63-
w1.Add(this.ExitAction, null);
61+
this.openAction = new global::Gtk.Action("openAction", global::Mono.Unix.Catalog.GetString("Open Path"), null, "gtk-open");
62+
this.openAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Open Path");
63+
w1.Add(this.openAction, null);
64+
this.saveAction = new global::Gtk.Action("saveAction", global::Mono.Unix.Catalog.GetString("Save"), null, "gtk-save");
65+
this.saveAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Save");
66+
w1.Add(this.saveAction, null);
67+
this.stopAction = new global::Gtk.Action("stopAction", global::Mono.Unix.Catalog.GetString("Exit"), null, "gtk-stop");
68+
this.stopAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Exit");
69+
w1.Add(this.stopAction, null);
6470
this.EnginesAction = new global::Gtk.Action("EnginesAction", global::Mono.Unix.Catalog.GetString("Engines"), null, null);
6571
this.EnginesAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Engines");
6672
w1.Add(this.EnginesAction, null);
@@ -84,9 +90,20 @@ protected virtual void Build()
8490
this.HelpAction = new global::Gtk.Action("HelpAction", global::Mono.Unix.Catalog.GetString("Help"), null, null);
8591
this.HelpAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Help");
8692
w1.Add(this.HelpAction, null);
87-
this.InfoAction = new global::Gtk.Action("InfoAction", global::Mono.Unix.Catalog.GetString("Info"), null, null);
88-
this.InfoAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Info");
89-
w1.Add(this.InfoAction, null);
93+
this.dialogInfoAction = new global::Gtk.Action("dialogInfoAction", global::Mono.Unix.Catalog.GetString("Info"), null, "gtk-dialog-info");
94+
this.dialogInfoAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Info");
95+
w1.Add(this.dialogInfoAction, null);
96+
this.SmartSearchAction = new global::Gtk.ToggleAction("SmartSearchAction", global::Mono.Unix.Catalog.GetString("Smart Search"), null, null);
97+
this.SmartSearchAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Smart Search");
98+
w1.Add(this.SmartSearchAction, null);
99+
this.IndexWLoadAction = new global::Gtk.RadioAction("IndexWLoadAction", global::Mono.Unix.Catalog.GetString("Index w/ Load"), null, null, 0);
100+
this.IndexWLoadAction.Group = this.MultiThreadAction.Group;
101+
this.IndexWLoadAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Index w/ Load");
102+
w1.Add(this.IndexWLoadAction, null);
103+
this.IndexOnlyAction = new global::Gtk.RadioAction("IndexOnlyAction", global::Mono.Unix.Catalog.GetString("Index Only"), null, null, 0);
104+
this.IndexOnlyAction.Group = this.IndexWLoadAction.Group;
105+
this.IndexOnlyAction.ShortLabel = global::Mono.Unix.Catalog.GetString("Index Only");
106+
w1.Add(this.IndexOnlyAction, null);
90107
this.UIManager.InsertActionGroup(w1, 0);
91108
this.AddAccelGroup(this.UIManager.AccelGroup);
92109
this.Name = "MainWindow";
@@ -111,7 +128,7 @@ protected virtual void Build()
111128
w3.TopAttach = ((uint)(2));
112129
w3.BottomAttach = ((uint)(3));
113130
// Container child table1.Gtk.Table+TableChild
114-
this.UIManager.AddUiFromString(@"<ui><menubar name='menubar1'><menu name='FileAction' action='FileAction'><menuitem name='OpenPathAction' action='OpenPathAction'/><menuitem name='SaveAction' action='SaveAction'/><menuitem name='ExitAction' action='ExitAction'/></menu><menu name='EnginesAction' action='EnginesAction'><menuitem name='MultiThreadAction' action='MultiThreadAction'/><menuitem name='SingleThreadAction' action='SingleThreadAction'/></menu><menu name='OptionsAction' action='OptionsAction'><menuitem name='RamAction' action='RamAction'/><menuitem name='MultiLineAction' action='MultiLineAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='InfoAction' action='InfoAction'/></menu></menubar></ui>");
131+
this.UIManager.AddUiFromString(@"<ui><menubar name='menubar1'><menu name='FileAction' action='FileAction'><menuitem name='openAction' action='openAction'/><menuitem name='saveAction' action='saveAction'/><menuitem name='stopAction' action='stopAction'/></menu><menu name='EnginesAction' action='EnginesAction'><menuitem name='MultiThreadAction' action='MultiThreadAction'/><menuitem name='SingleThreadAction' action='SingleThreadAction'/><menuitem name='IndexWLoadAction' action='IndexWLoadAction'/><menuitem name='IndexOnlyAction' action='IndexOnlyAction'/></menu><menu name='OptionsAction' action='OptionsAction'><menuitem name='RamAction' action='RamAction'/><menuitem name='MultiLineAction' action='MultiLineAction'/><menuitem name='SmartSearchAction' action='SmartSearchAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='dialogInfoAction' action='dialogInfoAction'/></menu></menubar></ui>");
115132
this.menubar1 = ((global::Gtk.MenuBar)(this.UIManager.GetWidget("/menubar1")));
116133
this.menubar1.Name = "menubar1";
117134
this.table1.Add(this.menubar1);
@@ -157,10 +174,10 @@ protected virtual void Build()
157174
this.DefaultHeight = 648;
158175
this.Show();
159176
this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.OnDeleteEvent);
160-
this.OpenPathAction.Activated += new global::System.EventHandler(this.OpenPathEvent);
161-
this.SaveAction.Activated += new global::System.EventHandler(this.SaveEvent);
162-
this.ExitAction.Activated += new global::System.EventHandler(this.ExitEvent);
163-
this.InfoAction.Activated += new global::System.EventHandler(this.InfoActivated);
177+
this.openAction.Activated += new global::System.EventHandler(this.OpenPathEvent);
178+
this.saveAction.Activated += new global::System.EventHandler(this.SaveEvent);
179+
this.stopAction.Activated += new global::System.EventHandler(this.ExitEvent);
180+
this.dialogInfoAction.Activated += new global::System.EventHandler(this.InfoActivated);
164181
this.button1.Clicked += new global::System.EventHandler(this.searchClick);
165182
}
166183
}

Standard/Nats-Lin/Nats-Linux/gtk-gui/gui.stetic

+41-9
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</configuration>
66
<import>
77
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
8-
<widget-library name="../bin/Debug/Nats-Linux.exe" internal="true" />
8+
<widget-library name="../bin/Release/Nats-Linux.exe" internal="true" />
99
</import>
1010
<widget class="Gtk.Window" id="MainWindow" design-size="1109 648">
1111
<action-group name="Default">
@@ -14,22 +14,25 @@
1414
<property name="Label" translatable="yes">File</property>
1515
<property name="ShortLabel" translatable="yes">File</property>
1616
</action>
17-
<action id="OpenPathAction">
17+
<action id="openAction">
1818
<property name="Type">Action</property>
1919
<property name="Label" translatable="yes">Open Path</property>
2020
<property name="ShortLabel" translatable="yes">Open Path</property>
21+
<property name="StockId">gtk-open</property>
2122
<signal name="Activated" handler="OpenPathEvent" />
2223
</action>
23-
<action id="SaveAction">
24+
<action id="saveAction">
2425
<property name="Type">Action</property>
2526
<property name="Label" translatable="yes">Save</property>
2627
<property name="ShortLabel" translatable="yes">Save</property>
28+
<property name="StockId">gtk-save</property>
2729
<signal name="Activated" handler="SaveEvent" />
2830
</action>
29-
<action id="ExitAction">
31+
<action id="stopAction">
3032
<property name="Type">Action</property>
3133
<property name="Label" translatable="yes">Exit</property>
3234
<property name="ShortLabel" translatable="yes">Exit</property>
35+
<property name="StockId">gtk-stop</property>
3336
<signal name="Activated" handler="ExitEvent" />
3437
</action>
3538
<action id="EnginesAction">
@@ -79,12 +82,38 @@
7982
<property name="Label" translatable="yes">Help</property>
8083
<property name="ShortLabel" translatable="yes">Help</property>
8184
</action>
82-
<action id="InfoAction">
85+
<action id="dialogInfoAction">
8386
<property name="Type">Action</property>
8487
<property name="Label" translatable="yes">Info</property>
8588
<property name="ShortLabel" translatable="yes">Info</property>
89+
<property name="StockId">gtk-dialog-info</property>
8690
<signal name="Activated" handler="InfoActivated" />
8791
</action>
92+
<action id="SmartSearchAction">
93+
<property name="Type">Toggle</property>
94+
<property name="Label" translatable="yes">Smart Search</property>
95+
<property name="ShortLabel" translatable="yes">Smart Search</property>
96+
<property name="DrawAsRadio">False</property>
97+
<property name="Active">False</property>
98+
</action>
99+
<action id="IndexWLoadAction">
100+
<property name="Type">Radio</property>
101+
<property name="Label" translatable="yes">Index w/ Load</property>
102+
<property name="ShortLabel" translatable="yes">Index w/ Load</property>
103+
<property name="DrawAsRadio">False</property>
104+
<property name="Active">False</property>
105+
<property name="Value">0</property>
106+
<property name="Group">group1</property>
107+
</action>
108+
<action id="IndexOnlyAction">
109+
<property name="Type">Radio</property>
110+
<property name="Label" translatable="yes">Index Only</property>
111+
<property name="ShortLabel" translatable="yes">Index Only</property>
112+
<property name="DrawAsRadio">False</property>
113+
<property name="Active">False</property>
114+
<property name="Value">0</property>
115+
<property name="Group">group1</property>
116+
</action>
88117
</action-group>
89118
<property name="MemberName" />
90119
<property name="Title" translatable="yes">MainWindow</property>
@@ -126,20 +155,23 @@
126155
<property name="MemberName" />
127156
<node name="__gtksharp_125_Stetic_Editor_ActionMenuBar" type="Menubar">
128157
<node type="Menu" action="FileAction">
129-
<node type="Menuitem" action="OpenPathAction" />
130-
<node type="Menuitem" action="SaveAction" />
131-
<node type="Menuitem" action="ExitAction" />
158+
<node type="Menuitem" action="openAction" />
159+
<node type="Menuitem" action="saveAction" />
160+
<node type="Menuitem" action="stopAction" />
132161
</node>
133162
<node type="Menu" action="EnginesAction">
134163
<node type="Menuitem" action="MultiThreadAction" />
135164
<node type="Menuitem" action="SingleThreadAction" />
165+
<node type="Menuitem" action="IndexWLoadAction" />
166+
<node type="Menuitem" action="IndexOnlyAction" />
136167
</node>
137168
<node type="Menu" action="OptionsAction">
138169
<node type="Menuitem" action="RamAction" />
139170
<node type="Menuitem" action="MultiLineAction" />
171+
<node type="Menuitem" action="SmartSearchAction" />
140172
</node>
141173
<node type="Menu" action="HelpAction">
142-
<node type="Menuitem" action="InfoAction" />
174+
<node type="Menuitem" action="dialogInfoAction" />
143175
</node>
144176
</node>
145177
</widget>

Standard/Nats-Mac/.DS_Store

0 Bytes
Binary file not shown.

Standard/Nats-Mac/Nats/.DS_Store

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)