Modified:
trunk/Theminds/App.cs
trunk/Theminds/Buffer interfaces.cs
trunk/Theminds/Buffer.cs
Log:
* TabId -> cooler TabKey; comment change in App.cs regarding SetUpForm.cs, damn you fragile file xrefs!
Modified: trunk/Theminds/App.cs
==============================================================================
--- trunk/Theminds/App.cs (original)
+++ trunk/Theminds/App.cs Sat May 12 14:56:53 2007
@@ -17,7 +17,7 @@
Buffer buffer; Quirk quirk;
public App() {
- this.SetUpForm(); // MainForm.SetUpForm.cs
+ this.SetUpForm(); // SetUpForm.cs
QuirkStart mozNet = new QuirkStart();
mozNet.Nick = "Tongue"; mozNet.Port = 6667;
Modified: trunk/Theminds/Buffer interfaces.cs
==============================================================================
--- trunk/Theminds/Buffer interfaces.cs (original)
+++ trunk/Theminds/Buffer interfaces.cs Sat May 12 14:56:53 2007
@@ -2,12 +2,12 @@
using Color = System.Drawing.Color;
namespace Theminds {
- public struct TabId {
+ public struct TabKey {
public Quirk Connection;
public string Channel;
public LogBox LogBox;
- public TabId(Quirk c, string channel, LogBox l) {
+ public TabKey(Quirk c, string channel, LogBox l) {
this.Connection = c;
this.Channel = channel;
this.LogBox = l;
@@ -20,8 +20,8 @@
public override bool Equals(object obj) {
if (obj == null) return false;
- if (typeof(TabId) != obj.GetType()) return false;
- TabId o = (TabId)obj;
+ if (typeof(TabKey) != obj.GetType()) return false;
+ TabKey o = (TabKey)obj;
return (o.Connection == this.Connection) &&
(o.Channel == this.Channel);
}
Modified: trunk/Theminds/Buffer.cs
==============================================================================
--- trunk/Theminds/Buffer.cs (original)
+++ trunk/Theminds/Buffer.cs Sat May 12 14:56:53 2007
@@ -15,11 +15,11 @@
IAppControls app;
// I need the two-way-osity for AddLine.
- TwoWayDictionary<ITab, TabId> proust = new TwoWayDictionary<ITab, TabId>(5);
+ TwoWayDictionary<ITab, TabKey> proust = new TwoWayDictionary<ITab, TabKey>(5);
public Buffer(IAppControls app) {
this.app = app;
- TabId id = new TabId(app.Connection, null, app.LogBox);
+ TabKey id = new TabKey(app.Connection, null, app.LogBox);
proust[app.Tabber.Current] = id;
// Page.Buffering events.
@@ -43,7 +43,7 @@
if (data.Broadcast)
broadcast(data.Line, data.Color);
else {
- TabId tab = new TabId(app.Connection, data.Channel, null);
+ TabKey tab = new TabKey(app.Connection, data.Channel, null);
if (!proust.ContainsKey(tab))
app.Invoke((M)delegate { AddChannel(tab); });
@@ -58,16 +58,16 @@
private void broadcast(string line, Color color) {
app.BeginInvoke((M)delegate {
- proust.Values.ForEach((Action<TabId>)delegate(TabId tab) {
+ proust.Values.ForEach((Action<TabKey>)delegate(TabKey tab) {
tab.LogBox.AddLine(line, color);
});
});
}
public void AddChannel() {
- AddChannel(new TabId(app.Connection, null, null));
+ AddChannel(new TabKey(app.Connection, null, null));
}
- public void AddChannel(TabId tab) {
+ public void AddChannel(TabKey tab) {
app.CurrentChannel = tab.Channel;
ITab newTab = app.Tabber.Add(tab.Channel);
tab.LogBox = new LogBox();
@@ -82,7 +82,7 @@
public void MoveToTab(ITab t) {
if (!proust.ContainsKey(t)) return;
- TabId id = proust[t];
+ TabKey id = proust[t];
app.SwitchLogBox(id.LogBox);
app.CurrentChannel = id.Channel;
}