Added about dialog, menu action stubs

This commit is contained in:
Latif Khalifa
2013-12-03 20:30:58 +01:00
parent d64fdceee3
commit 6ae5644b4e
10 changed files with 502 additions and 120 deletions

18
Programs/GridProxyGUI/About.cs Executable file
View File

@@ -0,0 +1,18 @@
using System;
namespace GridProxyGUI
{
public partial class About : Gtk.Dialog
{
public About()
{
this.Build();
}
protected void OnButtonOkClicked (object sender, EventArgs e)
{
Hide();
}
}
}

View File

@@ -59,6 +59,7 @@
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="Mono.Posix, Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
<Reference Include="System.Drawing" />
<Reference Include="XMLRPC">
<HintPath>..\..\bin\XMLRPC.dll</HintPath>
</Reference>
@@ -68,6 +69,10 @@
<EmbeddedResource Include="gtk-gui\gui.stetic">
<LogicalName>gui.stetic</LogicalName>
</EmbeddedResource>
<EmbeddedResource Include="wgp-logo.png">
<DeployService-UseProjectRelativePath>True</DeployService-UseProjectRelativePath>
</EmbeddedResource>
<EmbeddedResource Include="libomv.png" />
</ItemGroup>
<ItemGroup>
<Compile Include="FilterScroller.cs" />
@@ -82,6 +87,8 @@
<Compile Include="ProxyLogger.cs" />
<Compile Include="ProxyManager.cs" />
<Compile Include="SessionTypes.cs" />
<Compile Include="About.cs" />
<Compile Include="gtk-gui\GridProxyGUI.About.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
@@ -105,10 +112,15 @@
<Name>GridProxy</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="libomv.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<ProjectExtensions>
<MonoDevelop>
<Properties>
<Policies>
<TextStylePolicy inheritsSet="VisualStudio" inheritsScope="text/plain" scope="text/plain" />
<CSharpFormattingPolicy IndentSwitchBody="True" AnonymousMethodBraceStyle="NextLine" PropertyBraceStyle="NextLine" PropertyGetBraceStyle="NextLine" PropertySetBraceStyle="NextLine" EventBraceStyle="NextLine" EventAddBraceStyle="NextLine" EventRemoveBraceStyle="NextLine" StatementBraceStyle="NextLine" ElseNewLinePlacement="NewLine" CatchNewLinePlacement="NewLine" FinallyNewLinePlacement="NewLine" WhileNewLinePlacement="DoNotCare" ArrayInitializerWrapping="DoNotChange" ArrayInitializerBraceStyle="NextLine" BeforeMethodDeclarationParentheses="False" BeforeMethodCallParentheses="False" BeforeConstructorDeclarationParentheses="False" BeforeDelegateDeclarationParentheses="False" NewParentheses="False" SpacesBeforeBrackets="False" inheritsSet="Mono" inheritsScope="text/x-csharp" scope="text/x-csharp" />
</Policies>
</Properties>
</MonoDevelop>
</ProjectExtensions>
</Project>

View File

@@ -37,7 +37,6 @@ public partial class MainWindow : Gtk.Window
ProxyLogger.Init();
ProxyLogger.OnLogLine += new ProxyLogger.Log(Logger_OnLogLine);
SetIconFromFile("libomv.png");
tabsMain.Page = 0;
mainSplit.Position = 600;
@@ -580,4 +579,114 @@ public partial class MainWindow : Gtk.Window
}
}
#region edit select menu
protected void OnNoneActionActivated(object sender, EventArgs e)
{
}
protected void OnInvertActionActivated(object sender, EventArgs e)
{
}
protected void OnAllActionActivated(object sender, EventArgs e)
{
}
#endregion edit select menu
protected void OnCopyActionActivated(object sender, EventArgs e)
{
}
protected void OnUnselectedActionActivated(object sender, EventArgs e)
{
}
protected void OnSelectedActionActivated(object sender, EventArgs e)
{
}
protected void OnAllAction1Activated(object sender, EventArgs e)
{
}
List<FileFilter> GetFileFilters()
{
List<FileFilter> filters = new List<FileFilter>();
FileFilter filter = new FileFilter();
filter.Name = "XML Files (*.xml)";
filter.AddMimeType("text/xml");
filter.AddPattern("*.xml");
filters.Add(filter);
filter = new FileFilter();
filter.Name = "All Files (*.*)";
filter.AddPattern("*.*");
filters.Add(filter);
return filters;
}
protected void OnOpenActionActivated(object sender, EventArgs e)
{
var od = new Gtk.FileChooserDialog(null, "Open Session", this, FileChooserAction.Open, "Cancel", ResponseType.Cancel, "Open", ResponseType.Accept);
foreach (var filter in GetFileFilters()) od.AddFilter(filter);
if (od.Run() == (int)ResponseType.Accept)
{
OpenSession(od.Filename);
}
od.Destroy();
}
string sessionFileName;
protected void OnSaveAsActionActivated(object sender, EventArgs e)
{
var od = new Gtk.FileChooserDialog(null, "Save Session", this, FileChooserAction.Save, "Cancel", ResponseType.Cancel, "Save", ResponseType.Accept);
foreach (var filter in GetFileFilters()) od.AddFilter(filter);
if (od.Run() == (int)ResponseType.Accept)
{
sessionFileName = od.Filename;
SaveSession();
}
od.Destroy();
}
protected void OnSaveActionActivated(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(sessionFileName))
{
OnSaveAsActionActivated(sender, e);
}
else
{
SaveSession();
}
}
void SaveSession()
{
}
void OpenSession(string fileName)
{
}
protected void OnAboutActionActivated(object sender, EventArgs e)
{
var about = new GridProxyGUI.About();
about.SkipTaskbarHint = about.SkipPagerHint = true;
about.Run();
about.Destroy();
}
}

View File

@@ -0,0 +1,95 @@
// This file has been generated by the GUI designer. Do not modify.
namespace GridProxyGUI
{
public partial class About
{
private global::Gtk.HBox hbox1;
private global::Gtk.Image image3;
private global::Gtk.ScrolledWindow GtkScrolledWindow;
private global::Gtk.TextView textview1;
private global::Gtk.Button buttonOk;
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
// Widget GridProxyGUI.About
this.Name = "GridProxyGUI.About";
this.Title = global::Mono.Unix.Catalog.GetString ("About Grid Proxy");
this.Icon = global::Gdk.Pixbuf.LoadFromResource ("GridProxyGUI.libomv.png");
this.TypeHint = ((global::Gdk.WindowTypeHint)(1));
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
this.Modal = true;
this.Resizable = false;
this.AllowGrow = false;
this.DestroyWithParent = true;
// Internal child GridProxyGUI.About.VBox
global::Gtk.VBox w1 = this.VBox;
w1.Name = "dialog1_VBox";
w1.BorderWidth = ((uint)(2));
// Container child dialog1_VBox.Gtk.Box+BoxChild
this.hbox1 = new global::Gtk.HBox ();
this.hbox1.Name = "hbox1";
this.hbox1.Spacing = 6;
// Container child hbox1.Gtk.Box+BoxChild
this.image3 = new global::Gtk.Image ();
this.image3.Name = "image3";
this.image3.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("GridProxyGUI.wgp-logo.png");
this.hbox1.Add (this.image3);
global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.image3]));
w2.Position = 0;
w2.Expand = false;
w2.Fill = false;
// Container child hbox1.Gtk.Box+BoxChild
this.GtkScrolledWindow = new global::Gtk.ScrolledWindow ();
this.GtkScrolledWindow.Name = "GtkScrolledWindow";
this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
this.textview1 = new global::Gtk.TextView ();
this.textview1.Buffer.Text = "\nGrid Proxy GUI\nGtk# Interface for Grid Proxy\n\nBased on Win Grid Proxy by\nJim Rad" +
"ford <jradford@npl.com>\n\nWritten by\nLatif Khalifa <latifer@streamgrid.net>\n\nCopy" +
"right (c) 2013\nOpen Metaverse Foundation\n";
this.textview1.WidthRequest = 250;
this.textview1.CanFocus = true;
this.textview1.Name = "textview1";
this.textview1.Editable = false;
this.textview1.CursorVisible = false;
this.textview1.AcceptsTab = false;
this.textview1.WrapMode = ((global::Gtk.WrapMode)(2));
this.GtkScrolledWindow.Add (this.textview1);
this.hbox1.Add (this.GtkScrolledWindow);
global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.hbox1 [this.GtkScrolledWindow]));
w4.Position = 1;
w1.Add (this.hbox1);
global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(w1 [this.hbox1]));
w5.Position = 0;
w5.Expand = false;
w5.Fill = false;
// Internal child GridProxyGUI.About.ActionArea
global::Gtk.HButtonBox w6 = this.ActionArea;
w6.Name = "dialog1_ActionArea";
w6.Spacing = 10;
w6.BorderWidth = ((uint)(5));
w6.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
this.buttonOk = new global::Gtk.Button ();
this.buttonOk.CanDefault = true;
this.buttonOk.CanFocus = true;
this.buttonOk.Name = "buttonOk";
this.buttonOk.UseStock = true;
this.buttonOk.UseUnderline = true;
this.buttonOk.Label = "gtk-ok";
this.AddActionWidget (this.buttonOk, -5);
global::Gtk.ButtonBox.ButtonBoxChild w7 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w6 [this.buttonOk]));
w7.Expand = false;
w7.Fill = false;
if ((this.Child != null)) {
this.Child.ShowAll ();
}
this.DefaultWidth = 493;
this.DefaultHeight = 394;
this.Show ();
this.buttonOk.Clicked += new global::System.EventHandler (this.OnButtonOkClicked);
}
}
}

View File

@@ -15,9 +15,13 @@ public partial class MainWindow
private global::Gtk.Action AllAction1;
private global::Gtk.Action SelectedAction;
private global::Gtk.Action FindAction;
private global::Gtk.Action OpenSessionAction;
private global::Gtk.Action SaveSessionAction;
private global::Gtk.Action SaveSessionAsAction;
private global::Gtk.Action OpenAction;
private global::Gtk.Action SaveAction;
private global::Gtk.Action SaveAsAction;
private global::Gtk.Action InvertAction;
private global::Gtk.Action NoneAction;
private global::Gtk.Action CopyAction;
private global::Gtk.Action UnselectedAction;
private global::Gtk.VBox vboxMenuMain;
private global::Gtk.HBox hboxMenu;
private global::Gtk.Alignment alignment2;
@@ -92,7 +96,7 @@ public partial class MainWindow
private global::Gtk.TextView txtResponseNotation;
private global::Gtk.Label label12;
private global::Gtk.Label label10;
protected virtual void Build ()
{
global::Stetic.Gui.Initialize (this);
@@ -132,19 +136,32 @@ public partial class MainWindow
this.FindAction = new global::Gtk.Action ("FindAction", global::Mono.Unix.Catalog.GetString ("Find"), null, null);
this.FindAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Find (Ctrl-F)");
w1.Add (this.FindAction, "<Control>f");
this.OpenSessionAction = new global::Gtk.Action ("OpenSessionAction", global::Mono.Unix.Catalog.GetString ("Open Session..."), null, null);
this.OpenSessionAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Open Session...");
w1.Add (this.OpenSessionAction, "<Control>o");
this.SaveSessionAction = new global::Gtk.Action ("SaveSessionAction", global::Mono.Unix.Catalog.GetString ("Save Session"), null, null);
this.SaveSessionAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save Session");
w1.Add (this.SaveSessionAction, "<Control>s");
this.SaveSessionAsAction = new global::Gtk.Action ("SaveSessionAsAction", global::Mono.Unix.Catalog.GetString ("Save Session As..."), null, null);
this.SaveSessionAsAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save Session As...");
w1.Add (this.SaveSessionAsAction, null);
this.OpenAction = new global::Gtk.Action ("OpenAction", global::Mono.Unix.Catalog.GetString ("Open.."), null, null);
this.OpenAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Open Session...");
w1.Add (this.OpenAction, "<Control>o");
this.SaveAction = new global::Gtk.Action ("SaveAction", global::Mono.Unix.Catalog.GetString ("Save"), null, null);
this.SaveAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save Session");
w1.Add (this.SaveAction, "<Control>s");
this.SaveAsAction = new global::Gtk.Action ("SaveAsAction", global::Mono.Unix.Catalog.GetString ("Save As..."), null, null);
this.SaveAsAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Save Session As...");
w1.Add (this.SaveAsAction, null);
this.InvertAction = new global::Gtk.Action ("InvertAction", global::Mono.Unix.Catalog.GetString ("Invert"), null, null);
this.InvertAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Invert");
w1.Add (this.InvertAction, null);
this.NoneAction = new global::Gtk.Action ("NoneAction", global::Mono.Unix.Catalog.GetString ("None"), null, null);
this.NoneAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("None");
w1.Add (this.NoneAction, null);
this.CopyAction = new global::Gtk.Action ("CopyAction", global::Mono.Unix.Catalog.GetString ("Copy"), null, null);
this.CopyAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Copy");
w1.Add (this.CopyAction, "<Primary>c");
this.UnselectedAction = new global::Gtk.Action ("UnselectedAction", global::Mono.Unix.Catalog.GetString ("Unselected"), null, null);
this.UnselectedAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Unselected");
w1.Add (this.UnselectedAction, null);
this.UIManager.InsertActionGroup (w1, 0);
this.AddAccelGroup (this.UIManager.AccelGroup);
this.Name = "MainWindow";
this.Title = global::Mono.Unix.Catalog.GetString ("Grid Proxy");
this.Icon = global::Gdk.Pixbuf.LoadFromResource ("GridProxyGUI.libomv.png");
this.WindowPosition = ((global::Gtk.WindowPosition)(4));
this.AllowShrink = true;
// Container child MainWindow.Gtk.Container+ContainerChild
@@ -160,7 +177,7 @@ public partial class MainWindow
this.alignment2 = new global::Gtk.Alignment (0.5F, 0.5F, 1F, 1F);
this.alignment2.Name = "alignment2";
// Container child alignment2.Gtk.Container+ContainerChild
this.UIManager.AddUiFromString ("<ui><menubar name='menuMain'><menu name='FileAction' action='FileAction'><menuitem name='OpenSessionAction' action='OpenSessionAction'/><menuitem name='SaveSessionAction' action='SaveSessionAction'/><menuitem name='SaveSessionAsAction' action='SaveSessionAsAction'/><separator/><menuitem name='ExitAction' action='ExitAction'/></menu><menu name='EditAction' action='EditAction'><menu name='RemoveAction' action='RemoveAction'><menuitem name='AllAction1' action='AllAction1'/><menuitem name='SelectedAction' action='SelectedAction'/></menu><menu name='SelectAction' action='SelectAction'><menuitem name='AllAction' action='AllAction'/></menu><separator/><menuitem name='FindAction' action='FindAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/></menu></menubar></ui>");
this.UIManager.AddUiFromString (@"<ui><menubar name='menuMain'><menu name='FileAction' action='FileAction'><menuitem name='OpenAction' action='OpenAction'/><menuitem name='SaveAction' action='SaveAction'/><menuitem name='SaveAsAction' action='SaveAsAction'/><separator/><menuitem name='ExitAction' action='ExitAction'/></menu><menu name='EditAction' action='EditAction'><menu name='RemoveAction' action='RemoveAction'><menuitem name='AllAction1' action='AllAction1'/><menuitem name='SelectedAction' action='SelectedAction'/><menuitem name='UnselectedAction' action='UnselectedAction'/></menu><menu name='SelectAction' action='SelectAction'><menuitem name='AllAction' action='AllAction'/><menuitem name='InvertAction' action='InvertAction'/><menuitem name='NoneAction' action='NoneAction'/></menu><separator/><menuitem name='CopyAction' action='CopyAction'/></menu><menu name='HelpAction' action='HelpAction'><menuitem name='AboutAction' action='AboutAction'/></menu></menubar></ui>");
this.menuMain = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menuMain")));
this.menuMain.Name = "menuMain";
this.alignment2.Add (this.menuMain);
@@ -445,58 +462,34 @@ public partial class MainWindow
this.btnLoadFilters.CanFocus = true;
this.btnLoadFilters.Name = "btnLoadFilters";
this.btnLoadFilters.UseUnderline = true;
// Container child btnLoadFilters.Gtk.Container+ContainerChild
global::Gtk.Alignment w33 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w34 = new global::Gtk.HBox ();
w34.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w35 = new global::Gtk.Image ();
w35.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-open", global::Gtk.IconSize.Menu);
w34.Add (w35);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w37 = new global::Gtk.Label ();
w37.LabelProp = global::Mono.Unix.Catalog.GetString ("Load");
w37.UseUnderline = true;
w34.Add (w37);
w33.Add (w34);
this.btnLoadFilters.Add (w33);
this.btnLoadFilters.Label = global::Mono.Unix.Catalog.GetString ("Load");
global::Gtk.Image w33 = new global::Gtk.Image ();
w33.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-open", global::Gtk.IconSize.Menu);
this.btnLoadFilters.Image = w33;
this.hbox2.Add (this.btnLoadFilters);
global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnLoadFilters]));
w41.Position = 0;
w41.Expand = false;
w41.Fill = false;
global::Gtk.Box.BoxChild w34 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnLoadFilters]));
w34.Position = 0;
w34.Expand = false;
w34.Fill = false;
// Container child hbox2.Gtk.Box+BoxChild
this.btnSaveFilters = new global::Gtk.Button ();
this.btnSaveFilters.CanFocus = true;
this.btnSaveFilters.Name = "btnSaveFilters";
this.btnSaveFilters.UseUnderline = true;
// Container child btnSaveFilters.Gtk.Container+ContainerChild
global::Gtk.Alignment w42 = new global::Gtk.Alignment (0.5F, 0.5F, 0F, 0F);
// Container child GtkAlignment.Gtk.Container+ContainerChild
global::Gtk.HBox w43 = new global::Gtk.HBox ();
w43.Spacing = 2;
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Image w44 = new global::Gtk.Image ();
w44.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save", global::Gtk.IconSize.Menu);
w43.Add (w44);
// Container child GtkHBox.Gtk.Container+ContainerChild
global::Gtk.Label w46 = new global::Gtk.Label ();
w46.LabelProp = global::Mono.Unix.Catalog.GetString ("Save");
w46.UseUnderline = true;
w43.Add (w46);
w42.Add (w43);
this.btnSaveFilters.Add (w42);
this.btnSaveFilters.Label = global::Mono.Unix.Catalog.GetString ("Save");
global::Gtk.Image w35 = new global::Gtk.Image ();
w35.Pixbuf = global::Stetic.IconLoader.LoadIcon (this, "gtk-save", global::Gtk.IconSize.Menu);
this.btnSaveFilters.Image = w35;
this.hbox2.Add (this.btnSaveFilters);
global::Gtk.Box.BoxChild w50 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnSaveFilters]));
w50.Position = 1;
w50.Expand = false;
w50.Fill = false;
global::Gtk.Box.BoxChild w36 = ((global::Gtk.Box.BoxChild)(this.hbox2 [this.btnSaveFilters]));
w36.Position = 1;
w36.Expand = false;
w36.Fill = false;
this.hboxFilter.Add (this.hbox2);
global::Gtk.Box.BoxChild w51 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox2]));
w51.Position = 0;
w51.Expand = false;
w51.Fill = false;
global::Gtk.Box.BoxChild w37 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox2]));
w37.Position = 0;
w37.Expand = false;
w37.Fill = false;
// Container child hboxFilter.Gtk.Box+BoxChild
this.hbox3 = new global::Gtk.HBox ();
this.hbox3.Name = "hbox3";
@@ -517,8 +510,8 @@ public partial class MainWindow
this.GtkLabel8.LabelProp = global::Mono.Unix.Catalog.GetString ("UDP Packets & Login");
this.frameFilterUDP.LabelWidget = this.GtkLabel8;
this.hbox3.Add (this.frameFilterUDP);
global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterUDP]));
w53.Position = 0;
global::Gtk.Box.BoxChild w39 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterUDP]));
w39.Position = 0;
// Container child hbox3.Gtk.Box+BoxChild
this.frameFilterCap = new global::Gtk.Frame ();
this.frameFilterCap.Name = "frameFilterCap";
@@ -534,11 +527,11 @@ public partial class MainWindow
this.GtkLabel9.LabelProp = global::Mono.Unix.Catalog.GetString ("Capabilities & EventQueue Messages");
this.frameFilterCap.LabelWidget = this.GtkLabel9;
this.hbox3.Add (this.frameFilterCap);
global::Gtk.Box.BoxChild w55 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterCap]));
w55.Position = 1;
global::Gtk.Box.BoxChild w41 = ((global::Gtk.Box.BoxChild)(this.hbox3 [this.frameFilterCap]));
w41.Position = 1;
this.hboxFilter.Add (this.hbox3);
global::Gtk.Box.BoxChild w56 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox3]));
w56.Position = 1;
global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox3]));
w42.Position = 1;
// Container child hboxFilter.Gtk.Box+BoxChild
this.hbox4 = new global::Gtk.HBox ();
this.hbox4.Name = "hbox4";
@@ -552,8 +545,8 @@ public partial class MainWindow
this.cbSelectAllUDP.DrawIndicator = true;
this.cbSelectAllUDP.UseUnderline = true;
this.hbox4.Add (this.cbSelectAllUDP);
global::Gtk.Box.BoxChild w57 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllUDP]));
w57.Position = 0;
global::Gtk.Box.BoxChild w43 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllUDP]));
w43.Position = 0;
// Container child hbox4.Gtk.Box+BoxChild
this.cbSelectAllCap = new global::Gtk.CheckButton ();
this.cbSelectAllCap.CanFocus = true;
@@ -562,17 +555,17 @@ public partial class MainWindow
this.cbSelectAllCap.DrawIndicator = true;
this.cbSelectAllCap.UseUnderline = true;
this.hbox4.Add (this.cbSelectAllCap);
global::Gtk.Box.BoxChild w58 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllCap]));
w58.Position = 1;
global::Gtk.Box.BoxChild w44 = ((global::Gtk.Box.BoxChild)(this.hbox4 [this.cbSelectAllCap]));
w44.Position = 1;
this.hboxFilter.Add (this.hbox4);
global::Gtk.Box.BoxChild w59 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox4]));
w59.PackType = ((global::Gtk.PackType)(1));
w59.Position = 2;
w59.Expand = false;
w59.Fill = false;
global::Gtk.Box.BoxChild w45 = ((global::Gtk.Box.BoxChild)(this.hboxFilter [this.hbox4]));
w45.PackType = ((global::Gtk.PackType)(1));
w45.Position = 2;
w45.Expand = false;
w45.Fill = false;
this.tabsMain.Add (this.hboxFilter);
global::Gtk.Notebook.NotebookChild w60 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.hboxFilter]));
w60.Position = 1;
global::Gtk.Notebook.NotebookChild w46 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.hboxFilter]));
w46.Position = 1;
// Notebook tab
this.label5 = new global::Gtk.Label ();
this.label5.Name = "label5";
@@ -616,8 +609,8 @@ public partial class MainWindow
this.txtRequestRaw.Editable = false;
this.GtkScrolledWindow1.Add (this.txtRequestRaw);
this.tabsRequst.Add (this.GtkScrolledWindow1);
global::Gtk.Notebook.NotebookChild w64 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow1]));
w64.Position = 1;
global::Gtk.Notebook.NotebookChild w50 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow1]));
w50.Position = 1;
// Notebook tab
this.label6 = new global::Gtk.Label ();
this.label6.Name = "label6";
@@ -635,8 +628,8 @@ public partial class MainWindow
this.txtRequestNotation.Editable = false;
this.GtkScrolledWindow2.Add (this.txtRequestNotation);
this.tabsRequst.Add (this.GtkScrolledWindow2);
global::Gtk.Notebook.NotebookChild w66 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow2]));
w66.Position = 2;
global::Gtk.Notebook.NotebookChild w52 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst [this.GtkScrolledWindow2]));
w52.Position = 2;
// Notebook tab
this.label8 = new global::Gtk.Label ();
this.label8.Name = "label8";
@@ -644,8 +637,8 @@ public partial class MainWindow
this.tabsRequst.SetTabLabel (this.GtkScrolledWindow2, this.label8);
this.label8.ShowAll ();
this.vboxInspector.Add (this.tabsRequst);
global::Gtk.Box.BoxChild w67 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst]));
w67.Position = 0;
global::Gtk.Box.BoxChild w53 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst]));
w53.Position = 0;
// Container child vboxInspector.Gtk.Box+BoxChild
this.tabsRequst1 = new global::Gtk.Notebook ();
this.tabsRequst1.CanFocus = true;
@@ -679,8 +672,8 @@ public partial class MainWindow
this.txtResponseRaw.Editable = false;
this.GtkScrolledWindow4.Add (this.txtResponseRaw);
this.tabsRequst1.Add (this.GtkScrolledWindow4);
global::Gtk.Notebook.NotebookChild w71 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow4]));
w71.Position = 1;
global::Gtk.Notebook.NotebookChild w57 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow4]));
w57.Position = 1;
// Notebook tab
this.label11 = new global::Gtk.Label ();
this.label11.Name = "label11";
@@ -698,8 +691,8 @@ public partial class MainWindow
this.txtResponseNotation.Editable = false;
this.GtkScrolledWindow5.Add (this.txtResponseNotation);
this.tabsRequst1.Add (this.GtkScrolledWindow5);
global::Gtk.Notebook.NotebookChild w73 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow5]));
w73.Position = 2;
global::Gtk.Notebook.NotebookChild w59 = ((global::Gtk.Notebook.NotebookChild)(this.tabsRequst1 [this.GtkScrolledWindow5]));
w59.Position = 2;
// Notebook tab
this.label12 = new global::Gtk.Label ();
this.label12.Name = "label12";
@@ -707,11 +700,11 @@ public partial class MainWindow
this.tabsRequst1.SetTabLabel (this.GtkScrolledWindow5, this.label12);
this.label12.ShowAll ();
this.vboxInspector.Add (this.tabsRequst1);
global::Gtk.Box.BoxChild w74 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst1]));
w74.Position = 1;
global::Gtk.Box.BoxChild w60 = ((global::Gtk.Box.BoxChild)(this.vboxInspector [this.tabsRequst1]));
w60.Position = 1;
this.tabsMain.Add (this.vboxInspector);
global::Gtk.Notebook.NotebookChild w75 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.vboxInspector]));
w75.Position = 2;
global::Gtk.Notebook.NotebookChild w61 = ((global::Gtk.Notebook.NotebookChild)(this.tabsMain [this.vboxInspector]));
w61.Position = 2;
// Notebook tab
this.label10 = new global::Gtk.Label ();
this.label10.Name = "label10";
@@ -720,8 +713,8 @@ public partial class MainWindow
this.label10.ShowAll ();
this.mainSplit.Add (this.tabsMain);
this.vboxMenuMain.Add (this.mainSplit);
global::Gtk.Box.BoxChild w77 = ((global::Gtk.Box.BoxChild)(this.vboxMenuMain [this.mainSplit]));
w77.Position = 1;
global::Gtk.Box.BoxChild w63 = ((global::Gtk.Box.BoxChild)(this.vboxMenuMain [this.mainSplit]));
w63.Position = 1;
this.Add (this.vboxMenuMain);
if ((this.Child != null)) {
this.Child.ShowAll ();
@@ -731,6 +724,17 @@ public partial class MainWindow
this.Show ();
this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent);
this.ExitAction.Activated += new global::System.EventHandler (this.OnExitActionActivated);
this.AboutAction.Activated += new global::System.EventHandler (this.OnAboutActionActivated);
this.AllAction.Activated += new global::System.EventHandler (this.OnAllActionActivated);
this.AllAction1.Activated += new global::System.EventHandler (this.OnAllAction1Activated);
this.SelectedAction.Activated += new global::System.EventHandler (this.OnSelectedActionActivated);
this.OpenAction.Activated += new global::System.EventHandler (this.OnOpenActionActivated);
this.SaveAction.Activated += new global::System.EventHandler (this.OnSaveActionActivated);
this.SaveAsAction.Activated += new global::System.EventHandler (this.OnSaveAsActionActivated);
this.InvertAction.Activated += new global::System.EventHandler (this.OnInvertActionActivated);
this.NoneAction.Activated += new global::System.EventHandler (this.OnNoneActionActivated);
this.CopyAction.Activated += new global::System.EventHandler (this.OnCopyActionActivated);
this.UnselectedAction.Activated += new global::System.EventHandler (this.OnUnselectedActionActivated);
this.btnStart.Clicked += new global::System.EventHandler (this.OnBtnStartClicked);
this.cbAutoScroll.Toggled += new global::System.EventHandler (this.OnCbAutoScrollToggled);
this.cbSelectAllUDP.Toggled += new global::System.EventHandler (this.OnCbSelectAllUDPToggled);

View File

@@ -5,7 +5,7 @@ namespace Stetic
internal class Gui
{
private static bool initialized;
internal static void Initialize (Gtk.Widget iconRenderer)
{
if ((Stetic.Gui.initialized == false)) {
@@ -13,7 +13,7 @@ namespace Stetic
}
}
}
internal class IconLoader
{
public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size)
@@ -24,7 +24,7 @@ namespace Stetic
} else {
int sz;
int sy;
global::Gtk.Icon.SizeLookup (size, out sz, out sy);
global::Gtk.Icon.SizeLookup (size, out sz, out sy);
try {
return Gtk.IconTheme.Default.LoadIcon (name, sz, 0);
} catch (System.Exception) {
@@ -39,22 +39,26 @@ namespace Stetic
pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1));
gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
gc.RgbFgColor = new Gdk.Color (255, 0, 0);
pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
pmap.DrawLine (gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1)
- (sz / 4)), ((sz - 1)
- (sz / 4)));
pmap.DrawLine (gc, ((sz - 1)
- (sz / 4)), (sz / 4), (sz / 4), ((sz - 1)
- (sz / 4)));
return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
}
}
}
}
}
internal class ActionGroups
{
public static Gtk.ActionGroup GetActionGroup (System.Type type)
{
return Stetic.ActionGroups.GetActionGroup (type.FullName);
}
public static Gtk.ActionGroup GetActionGroup (string name)
{
return null;

View File

@@ -5,7 +5,7 @@
</configuration>
<import>
<widget-library name="glade-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
<widget-library name="../bin/Release/GridProxyGUI.exe" internal="true" />
<widget-library name="../bin/Debug/GridProxyGUI.exe" internal="true" />
</import>
<widget class="Gtk.Window" id="MainWindow" design-size="1211 650">
<action-group name="Default">
@@ -37,6 +37,7 @@
<property name="Label" translatable="yes">About</property>
<property name="ShortLabel" translatable="yes">About</property>
<property name="Tooltip" translatable="yes">Shows the wonderful creator info</property>
<signal name="Activated" handler="OnAboutActionActivated" />
</action>
<action id="RemoveAction">
<property name="Type">Action</property>
@@ -52,16 +53,19 @@
<property name="Type">Action</property>
<property name="Label" translatable="yes">All</property>
<property name="ShortLabel" translatable="yes">All</property>
<signal name="Activated" handler="OnAllActionActivated" />
</action>
<action id="AllAction1">
<property name="Type">Action</property>
<property name="Label" translatable="yes">All</property>
<property name="ShortLabel" translatable="yes">All</property>
<signal name="Activated" handler="OnAllAction1Activated" />
</action>
<action id="SelectedAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Selected</property>
<property name="ShortLabel" translatable="yes">Selected</property>
<signal name="Activated" handler="OnSelectedActionActivated" />
</action>
<action id="FindAction">
<property name="Type">Action</property>
@@ -69,26 +73,55 @@
<property name="Label" translatable="yes">Find</property>
<property name="ShortLabel" translatable="yes">Find (Ctrl-F)</property>
</action>
<action id="OpenSessionAction">
<action id="OpenAction">
<property name="Type">Action</property>
<property name="Accelerator">&lt;Control&gt;o</property>
<property name="Label" translatable="yes">Open Session...</property>
<property name="Label" translatable="yes">Open..</property>
<property name="ShortLabel" translatable="yes">Open Session...</property>
<signal name="Activated" handler="OnOpenActionActivated" />
</action>
<action id="SaveSessionAction">
<action id="SaveAction">
<property name="Type">Action</property>
<property name="Accelerator">&lt;Control&gt;s</property>
<property name="Label" translatable="yes">Save Session</property>
<property name="Label" translatable="yes">Save</property>
<property name="ShortLabel" translatable="yes">Save Session</property>
<signal name="Activated" handler="OnSaveActionActivated" />
</action>
<action id="SaveSessionAsAction">
<action id="SaveAsAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Save Session As...</property>
<property name="Label" translatable="yes">Save As...</property>
<property name="ShortLabel" translatable="yes">Save Session As...</property>
<signal name="Activated" handler="OnSaveAsActionActivated" />
</action>
<action id="InvertAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Invert</property>
<property name="ShortLabel" translatable="yes">Invert</property>
<signal name="Activated" handler="OnInvertActionActivated" />
</action>
<action id="NoneAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">None</property>
<property name="ShortLabel" translatable="yes">None</property>
<signal name="Activated" handler="OnNoneActionActivated" />
</action>
<action id="CopyAction">
<property name="Type">Action</property>
<property name="Accelerator">&lt;Primary&gt;c</property>
<property name="Label" translatable="yes">Copy</property>
<property name="ShortLabel" translatable="yes">Copy</property>
<signal name="Activated" handler="OnCopyActionActivated" />
</action>
<action id="UnselectedAction">
<property name="Type">Action</property>
<property name="Label" translatable="yes">Unselected</property>
<property name="ShortLabel" translatable="yes">Unselected</property>
<signal name="Activated" handler="OnUnselectedActionActivated" />
</action>
</action-group>
<property name="MemberName" />
<property name="Title" translatable="yes">Grid Proxy</property>
<property name="Icon">resource:GridProxyGUI.libomv.png</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="AllowShrink">True</property>
<signal name="DeleteEvent" handler="OnDeleteEvent" />
@@ -109,9 +142,9 @@
<property name="MemberName" />
<node name="menuMain" type="Menubar">
<node type="Menu" action="FileAction">
<node type="Menuitem" action="OpenSessionAction" />
<node type="Menuitem" action="SaveSessionAction" />
<node type="Menuitem" action="SaveSessionAsAction" />
<node type="Menuitem" action="OpenAction" />
<node type="Menuitem" action="SaveAction" />
<node type="Menuitem" action="SaveAsAction" />
<node type="Separator" />
<node type="Menuitem" action="ExitAction" />
</node>
@@ -119,12 +152,15 @@
<node type="Menu" action="RemoveAction">
<node type="Menuitem" action="AllAction1" />
<node type="Menuitem" action="SelectedAction" />
<node type="Menuitem" action="UnselectedAction" />
</node>
<node type="Menu" action="SelectAction">
<node type="Menuitem" action="AllAction" />
<node type="Menuitem" action="InvertAction" />
<node type="Menuitem" action="NoneAction" />
</node>
<node type="Separator" />
<node type="Menuitem" action="FindAction" />
<node type="Menuitem" action="CopyAction" />
</node>
<node type="Menu" action="HelpAction">
<node type="Menuitem" action="AboutAction" />
@@ -264,7 +300,7 @@ http://login.orgrid.org/</property>
<widget class="Gtk.HPaned" id="mainSplit">
<property name="MemberName" />
<property name="CanFocus">True</property>
<property name="Position">400</property>
<property name="Position">1</property>
<child>
<widget class="Gtk.VBox" id="vboxSessions">
<property name="MemberName" />
@@ -900,4 +936,108 @@ http://login.orgrid.org/</property>
</widget>
</child>
</widget>
<widget class="Gtk.Dialog" id="GridProxyGUI.About" design-size="493 394">
<property name="MemberName" />
<property name="Title" translatable="yes">About Grid Proxy</property>
<property name="Icon">resource:GridProxyGUI.libomv.png</property>
<property name="TypeHint">Dialog</property>
<property name="WindowPosition">CenterOnParent</property>
<property name="Modal">True</property>
<property name="Resizable">False</property>
<property name="AllowGrow">False</property>
<property name="DestroyWithParent">True</property>
<property name="Buttons">1</property>
<property name="HelpButton">False</property>
<child internal-child="VBox">
<widget class="Gtk.VBox" id="dialog1_VBox">
<property name="MemberName" />
<property name="BorderWidth">2</property>
<child>
<widget class="Gtk.HBox" id="hbox1">
<property name="MemberName" />
<property name="Spacing">6</property>
<child>
<widget class="Gtk.Image" id="image3">
<property name="MemberName" />
<property name="Pixbuf">resource:GridProxyGUI.wgp-logo.png</property>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
<child>
<widget class="Gtk.ScrolledWindow" id="GtkScrolledWindow">
<property name="MemberName" />
<property name="ShadowType">In</property>
<child>
<widget class="Gtk.TextView" id="textview1">
<property name="MemberName" />
<property name="WidthRequest">250</property>
<property name="CanFocus">True</property>
<property name="ShowScrollbars">True</property>
<property name="Editable">False</property>
<property name="CursorVisible">False</property>
<property name="AcceptsTab">False</property>
<property name="Text" translatable="yes">
Grid Proxy GUI
Gtk# Interface for Grid Proxy
Based on Win Grid Proxy by
Jim Radford &lt;jradford@npl.com&gt;
Written by
Latif Khalifa &lt;latifer@streamgrid.net&gt;
Copyright (c) 2013
Open Metaverse Foundation
</property>
<property name="WrapMode">Word</property>
</widget>
</child>
</widget>
<packing>
<property name="Position">1</property>
<property name="AutoSize">True</property>
</packing>
</child>
</widget>
<packing>
<property name="Position">0</property>
<property name="AutoSize">True</property>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
</widget>
</child>
<child internal-child="ActionArea">
<widget class="Gtk.HButtonBox" id="dialog1_ActionArea">
<property name="MemberName" />
<property name="Spacing">10</property>
<property name="BorderWidth">5</property>
<property name="Size">1</property>
<property name="LayoutStyle">End</property>
<child>
<widget class="Gtk.Button" id="buttonOk">
<property name="MemberName" />
<property name="CanDefault">True</property>
<property name="CanFocus">True</property>
<property name="UseStock">True</property>
<property name="Type">StockItem</property>
<property name="StockId">gtk-ok</property>
<property name="ResponseId">-5</property>
<signal name="Clicked" handler="OnButtonOkClicked" />
<property name="label">gtk-ok</property>
</widget>
<packing>
<property name="Expand">False</property>
<property name="Fill">False</property>
</packing>
</child>
</widget>
</child>
</widget>
</stetic-interface>

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB