jflam (owner)

Revisions

gist: 113483 Download_button fork
public
Public Clone URL: git://gist.github.com/113483.git
Diff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
Index: Witty/Witty/ConsoleWindow.xaml
===================================================================
--- Witty/Witty/ConsoleWindow.xaml (revision 0)
+++ Witty/Witty/ConsoleWindow.xaml (revision 0)
@@ -0,0 +1,15 @@
+<Window x:Class="Witty.ConsoleWindow"
+ xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:core="clr-namespace:Core;assembly=Core"
+ Title="ConsoleWindow" Height="800" Width="500">
+ <Grid>
+ <Grid.ColumnDefinitions>
+ <ColumnDefinition Width="*" />
+ </Grid.ColumnDefinitions>
+ <Grid.RowDefinitions>
+ <RowDefinition Height="*" />
+ </Grid.RowDefinitions>
+ <core:Repl Name="MainRepl" Grid.Row="0" Grid.Column="0" />
+ </Grid>
+</Window>
Index: Witty/Witty/ConsoleWindow.xaml.cs
===================================================================
--- Witty/Witty/ConsoleWindow.xaml.cs (revision 0)
+++ Witty/Witty/ConsoleWindow.xaml.cs (revision 0)
@@ -0,0 +1,23 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Shapes;
+
+namespace Witty {
+ /// <summary>
+ /// Interaction logic for ConsoleWindow.xaml
+ /// </summary>
+ public partial class ConsoleWindow : Window {
+ public ConsoleWindow() {
+ InitializeComponent();
+ }
+ }
+}
Index: Witty/Witty/MainWindow.xaml
===================================================================
--- Witty/Witty/MainWindow.xaml (revision 468)
+++ Witty/Witty/MainWindow.xaml (working copy)
@@ -61,6 +61,8 @@
                     <Border Name="WindowButtonsPlaceholder" HorizontalAlignment="Right" VerticalAlignment="Top" DockPanel.Dock="Right" Margin="0" />
                     <Button Content="Refresh" Height="15" x:Name="RefreshButton" Click="RefreshButton_Click" IsEnabled="False" MinWidth="25" MinHeight="20" FontSize="9" DockPanel.Dock="Right" Margin="0,0,10,0" Width="50" ToolTip="Refresh Tweets" />
                     <Button Content="Options" Height="15" x:Name="OptionsButton" Click="OptionsButton_Click" MinWidth="25" MinHeight="20" FontSize="9" DockPanel.Dock="Right" Margin="0,0,5,0" IsEnabled="True" Width="50" ToolTip="Show Options Window" />
+ <Button Content="Console" Height="20" x:Name="ConsoleButton" Click="ConsoleButton_Click" MinWidth="25" MinHeight="20" FontSize="9" DockPanel.Dock="Right" Margin="0,0,10,0" IsEnabled="True" Width="50" ToolTip="Show Console Window" />
+
                     <ToggleButton Content="Filter" Height="25" x:Name="FilterToggleButton" MinWidth="25" MinHeight="20" FontSize="9" IsEnabled="False" Width="55" ToolTip="Display Filter Panel" DockPanel.Dock="Right" BorderThickness="1,1,1,1" Margin="0,0,10,0" IsChecked="False" Unchecked="FilterToggleButton_Unchecked" Background="{DynamicResource NormalBrush}" Foreground="{DynamicResource LightBrush}" BorderBrush="{DynamicResource NormalBorderBrush}" Visibility="Collapsed">
                         <ToggleButton.Clip>
                             <RectangleGeometry Rect="3,3,50,20" RadiusX="5" RadiusY="5" />
Index: Witty/Witty/MainWindow.xaml.cs
===================================================================
--- Witty/Witty/MainWindow.xaml.cs (revision 468)
+++ Witty/Witty/MainWindow.xaml.cs (working copy)
@@ -1178,7 +1178,7 @@
 
         #region User Timeline
 
- private void DelegateUserTimelineFetch(string userId)
+ public void DelegateUserTimelineFetch(string userId)
         {
             displayUser = userId;
 
@@ -1980,6 +1980,14 @@
             ShowOptions();
         }
 
+ private void ConsoleButton_Click(object sender, RoutedEventArgs e)
+ {
+ var console = new ConsoleWindow();
+ console.MainRepl.AddExternalObject("T", twitter);
+ console.MainRepl.AddExternalObject("U", this);
+ console.Show();
+ }
+
         private void ShowOptions()
         {
             Options options = new Options();
Index: Witty/Witty/ReplResources.xaml
===================================================================
--- Witty/Witty/ReplResources.xaml (revision 0)
+++ Witty/Witty/ReplResources.xaml (revision 0)
@@ -0,0 +1,49 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+ <Style x:Key="NumericLiteral">
+ <Setter Property="Control.Foreground" Value="#FFEE98" />
+ </Style>
+ <Style x:Key="Keyword">
+ <Setter Property="Control.Foreground" Value="#FF6600" />
+ </Style>
+ <Style x:Key="Identifier">
+ <Setter Property="Control.Foreground" Value="#FFCC00" />
+ </Style>
+ <Style x:Key="StringLiteral">
+ <Setter Property="Control.Foreground" Value="#66FF00" />
+ </Style>
+ <Style x:Key="Comment">
+ <Setter Property="Control.Foreground" Value="#9933CC" />
+ </Style>
+ <Style x:Key="Error">
+ <Setter Property="Control.Foreground" Value="#FF0000" />
+ </Style>
+ <Style x:Key="None">
+ <Setter Property="Control.Foreground" Value="#FFFFFF" />
+ </Style>
+ <Style x:Key="TextStyle">
+ <Setter Property="Control.FontFamily" Value="Consolas" />
+ <Setter Property="Control.Foreground" Value="White" />
+ <Setter Property="Control.Background" Value="Black" />
+ <Setter Property="Control.FontSize" Value="20" />
+ </Style>
+ <Style x:Key="WindowStyle">
+ <Setter Property="Control.Background" Value="Black" />
+ <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Hidden" />
+ </Style>
+ <Style TargetType="{x:Type ListBoxItem}">
+ <Setter Property="Template">
+ <Setter.Value>
+ <ControlTemplate TargetType="{x:Type ListBoxItem}">
+ <TextBlock Name="TheBGControl"><ContentPresenter /></TextBlock>
+ <ControlTemplate.Triggers>
+ <Trigger Property="IsSelected" Value="True">
+ <Setter Property="Foreground" Value="Black" TargetName="TheBGControl" />
+ <Setter Property="Background" Value="Yellow" TargetName="TheBGControl" />
+ </Trigger>
+ </ControlTemplate.Triggers>
+ </ControlTemplate>
+ </Setter.Value>
+ </Setter>
+ </Style>
+</ResourceDictionary>
\ No newline at end of file
Index: Witty/Witty/Witty.csproj
===================================================================
--- Witty/Witty/Witty.csproj (revision 468)
+++ Witty/Witty/Witty.csproj (working copy)
@@ -66,6 +66,10 @@
     <UseVSHostingProcess>false</UseVSHostingProcess>
   </PropertyGroup>
   <ItemGroup>
+ <Reference Include="core, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\core.dll</HintPath>
+ </Reference>
     <Reference Include="CustomWindow, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\ExternalDependencies\CustomWindow.dll</HintPath>
@@ -86,6 +90,22 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\ExternalDependencies\Growl.CoreLibrary.dll</HintPath>
     </Reference>
+ <Reference Include="IronPython, Version=2.6.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\IronPython.dll</HintPath>
+ </Reference>
+ <Reference Include="IronPython.Modules, Version=2.6.0.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\IronPython.Modules.dll</HintPath>
+ </Reference>
+ <Reference Include="IronRuby, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\IronRuby.dll</HintPath>
+ </Reference>
+ <Reference Include="IronRuby.Libraries, Version=0.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\IronRuby.Libraries.dll</HintPath>
+ </Reference>
     <Reference Include="J832.Common, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\ExternalDependencies\BagOfTricks\J832.Common.dll</HintPath>
@@ -98,6 +118,22 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>..\..\ExternalDependencies\log4net.dll</HintPath>
     </Reference>
+ <Reference Include="Microsoft.Dynamic, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\Microsoft.Dynamic.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Scripting, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\Microsoft.Scripting.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Scripting.Core, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\Microsoft.Scripting.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="Microsoft.Scripting.ExtensionAttribute, Version=0.9.5.1, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>..\..\..\Libs\Microsoft.Scripting.ExtensionAttribute.dll</HintPath>
+ </Reference>
     <Reference Include="mscorlib" />
     <Reference Include="Newtonsoft.Json, Version=3.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
       <SpecificVersion>False</SpecificVersion>
@@ -133,6 +169,10 @@
     <Reference Include="System.ServiceModel" />
     <Reference Include="System.Runtime.Serialization" />
     <Reference Include="System.IdentityModel" />
+ <Page Include="ConsoleWindow.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ </Page>
     <Page Include="Controls\Options\AboutOptions.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
@@ -157,6 +197,11 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+ <None Include="ReplResources.xaml">
+ <SubType>Designer</SubType>
+ <Generator>MSBuild:Compile</Generator>
+ <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+ </None>
     <Page Include="Resources\Storyboards.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
@@ -204,6 +249,9 @@
     </Compile>
   </ItemGroup>
   <ItemGroup>
+ <Compile Include="ConsoleWindow.xaml.cs">
+ <DependentUpon>ConsoleWindow.xaml</DependentUpon>
+ </Compile>
     <Compile Include="Controls\Options\AboutOptions.xaml.cs">
       <DependentUpon>AboutOptions.xaml</DependentUpon>
     </Compile>