From 4a612fb70ae3d86862eede13c83d60f0c3c2a0c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Tue, 24 Apr 2012 12:45:02 -0400 Subject: gfreerdp: started Gtk# UI --- FreeRDP.sln | 110 +++++++------ GFreeRDP/AssemblyInfo.cs | 27 ++++ GFreeRDP/ConnectionDialog.cs | 58 +++++++ GFreeRDP/GFreeRDP.csproj | 85 ++++++++++ GFreeRDP/IUserAction.cs | 27 ++++ GFreeRDP/MainWindow.cs | 52 ++++++ GFreeRDP/Program.cs | 34 ++++ GFreeRDP/RdpClient.cs | 143 +++++++++++++++++ GFreeRDP/gtk-gui/GFreeRDP.ConnectionDialog.cs | 141 +++++++++++++++++ GFreeRDP/gtk-gui/GFreeRDP.MainWindow.cs | 62 ++++++++ GFreeRDP/gtk-gui/generated.cs | 29 ++++ GFreeRDP/gtk-gui/gui.stetic | 219 ++++++++++++++++++++++++++ NFreeRDP/MainWindow.resources | Bin 0 -> 180 bytes NFreeRDP/NFreeRDP.csproj | 3 +- NFreeRDP/Properties/Resources.resources | Bin 0 -> 180 bytes 15 files changed, 938 insertions(+), 52 deletions(-) create mode 100644 GFreeRDP/AssemblyInfo.cs create mode 100644 GFreeRDP/ConnectionDialog.cs create mode 100644 GFreeRDP/GFreeRDP.csproj create mode 100644 GFreeRDP/IUserAction.cs create mode 100644 GFreeRDP/MainWindow.cs create mode 100644 GFreeRDP/Program.cs create mode 100644 GFreeRDP/RdpClient.cs create mode 100644 GFreeRDP/gtk-gui/GFreeRDP.ConnectionDialog.cs create mode 100644 GFreeRDP/gtk-gui/GFreeRDP.MainWindow.cs create mode 100644 GFreeRDP/gtk-gui/generated.cs create mode 100644 GFreeRDP/gtk-gui/gui.stetic create mode 100644 NFreeRDP/MainWindow.resources create mode 100644 NFreeRDP/Properties/Resources.resources diff --git a/FreeRDP.sln b/FreeRDP.sln index 2265018..eb2aeff 100644 --- a/FreeRDP.sln +++ b/FreeRDP.sln @@ -1,50 +1,60 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeRDP", "FreeRDP\FreeRDP.csproj", "{C5E8D831-864B-4BE7-8027-77727D5A6D80}" -EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NFreeRDP", "NFreeRDP\NFreeRDP.csproj", "{DDCCC18C-7B29-431D-8F48-F6DCD579D272}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Mixed Platforms = Debug|Mixed Platforms - Debug|x86 = Debug|x86 - Release|Mixed Platforms = Release|Mixed Platforms - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|x86.ActiveCfg = Debug|Any CPU - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|x86.Build.0 = Debug|Any CPU - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|Mixed Platforms.Build.0 = Release|Any CPU - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|x86.ActiveCfg = Release|Any CPU - {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|x86.Build.0 = Release|Any CPU - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|Mixed Platforms.Build.0 = Debug|x86 - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|x86.ActiveCfg = Debug|x86 - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|x86.Build.0 = Debug|x86 - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|Mixed Platforms.ActiveCfg = Release|x86 - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|Mixed Platforms.Build.0 = Release|x86 - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|x86.ActiveCfg = Release|x86 - {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(MonoDevelopProperties) = preSolution - StartupItem = Client\Client.csproj - Policies = $0 - $0.DotNetNamingPolicy = $1 - $1.DirectoryNamespaceAssociation = None - $1.ResourceNamePolicy = FileFormatDefault - $0.TextStylePolicy = $2 - $2.inheritsSet = null - $2.scope = text/x-csharp - $0.CSharpFormattingPolicy = $3 - $3.inheritsSet = Mono - $3.inheritsScope = text/x-csharp - $3.scope = text/x-csharp - EndGlobalSection -EndGlobal + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FreeRDP", "FreeRDP\FreeRDP.csproj", "{C5E8D831-864B-4BE7-8027-77727D5A6D80}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NFreeRDP", "NFreeRDP\NFreeRDP.csproj", "{DDCCC18C-7B29-431D-8F48-F6DCD579D272}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GFreeRDP", "GFreeRDP\GFreeRDP.csproj", "{60C01725-0B80-414D-82F4-6EDEF452AD94}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Mixed Platforms = Debug|Mixed Platforms + Debug|x86 = Debug|x86 + Release|Mixed Platforms = Release|Mixed Platforms + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Debug|Mixed Platforms.ActiveCfg = Debug|Mixed Platforms + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Debug|Mixed Platforms.Build.0 = Debug|Mixed Platforms + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Debug|x86.ActiveCfg = Debug|Mixed Platforms + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Debug|x86.Build.0 = Debug|Mixed Platforms + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Release|Mixed Platforms.ActiveCfg = Release|Mixed Platforms + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Release|Mixed Platforms.Build.0 = Release|Mixed Platforms + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Release|x86.ActiveCfg = Release|Mixed Platforms + {60C01725-0B80-414D-82F4-6EDEF452AD94}.Release|x86.Build.0 = Release|Mixed Platforms + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|x86.ActiveCfg = Debug|Any CPU + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Debug|x86.Build.0 = Debug|Any CPU + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|Mixed Platforms.Build.0 = Release|Any CPU + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|x86.ActiveCfg = Release|Any CPU + {C5E8D831-864B-4BE7-8027-77727D5A6D80}.Release|x86.Build.0 = Release|Any CPU + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|Mixed Platforms.Build.0 = Debug|x86 + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|x86.ActiveCfg = Debug|x86 + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Debug|x86.Build.0 = Debug|x86 + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|Mixed Platforms.ActiveCfg = Release|x86 + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|Mixed Platforms.Build.0 = Release|x86 + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|x86.ActiveCfg = Release|x86 + {DDCCC18C-7B29-431D-8F48-F6DCD579D272}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(MonoDevelopProperties) = preSolution + StartupItem = GFreeRDP\GFreeRDP.csproj + Policies = $0 + $0.DotNetNamingPolicy = $1 + $1.DirectoryNamespaceAssociation = None + $1.ResourceNamePolicy = FileFormatDefault + $0.TextStylePolicy = $2 + $2.inheritsSet = null + $2.scope = text/x-csharp + $0.CSharpFormattingPolicy = $3 + $3.inheritsSet = Mono + $3.inheritsScope = text/x-csharp + $3.scope = text/x-csharp + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/GFreeRDP/AssemblyInfo.cs b/GFreeRDP/AssemblyInfo.cs new file mode 100644 index 0000000..2799a7f --- /dev/null +++ b/GFreeRDP/AssemblyInfo.cs @@ -0,0 +1,27 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +// Information about this assembly is defined by the following attributes. +// Change them to the values specific to your project. + +[assembly: AssemblyTitle("GFreeRDP")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("")] +[assembly: AssemblyCopyright("awake")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". +// The form "{Major}.{Minor}.*" will automatically update the build and revision, +// and "{Major}.{Minor}.{Build}.*" will update just the revision. + +[assembly: AssemblyVersion("1.0.*")] + +// The following attributes are used to specify the signing key for the assembly, +// if desired. See the Mono documentation for more information about signing. + +//[assembly: AssemblyDelaySign(false)] +//[assembly: AssemblyKeyFile("")] + diff --git a/GFreeRDP/ConnectionDialog.cs b/GFreeRDP/ConnectionDialog.cs new file mode 100644 index 0000000..0756792 --- /dev/null +++ b/GFreeRDP/ConnectionDialog.cs @@ -0,0 +1,58 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace GFreeRDP +{ + public partial class ConnectionDialog : Gtk.Dialog + { + private IUserAction iUserAction; + + public ConnectionDialog(IUserAction iUserAction) + { + this.Build(); + this.iUserAction = iUserAction; + } + + protected void OnButtonConnectClicked(object sender, System.EventArgs e) + { + string hostname; + string username; + string password; + + hostname = entryHostname.Text; + username = entryUsername.Text; + password = entryPassword.Text; + + Console.WriteLine("OnButtonConnectActivated"); + + iUserAction.OnNewConnection(hostname, username, password); + + Console.WriteLine("OnButtonConnectActivated Destroy"); + + this.Destroy(); + } + + protected void OnButtonCancelClicked(object sender, System.EventArgs e) + { + this.Destroy(); + } + } +} + diff --git a/GFreeRDP/GFreeRDP.csproj b/GFreeRDP/GFreeRDP.csproj new file mode 100644 index 0000000..153def1 --- /dev/null +++ b/GFreeRDP/GFreeRDP.csproj @@ -0,0 +1,85 @@ + + + + Debug + Mixed Platforms + 10.0.0 + 2.0 + {60C01725-0B80-414D-82F4-6EDEF452AD94} + WinExe + GFreeRDP + GFreeRDP + v4.0 + + + true + full + false + bin\Debug + DEBUG + prompt + 4 + false + true + + + none + false + bin\Release + prompt + 4 + false + true + + + + + False + gtk-sharp-2.0 + + + False + gtk-sharp-2.0 + + + False + glib-sharp-2.0 + + + False + glade-sharp-2.0 + + + False + gtk-sharp-2.0 + + + False + gtk-sharp-2.0 + + + + + + gui.stetic + + + + + + + + + + + + + + + + + {C5E8D831-864B-4BE7-8027-77727D5A6D80} + FreeRDP + + + \ No newline at end of file diff --git a/GFreeRDP/IUserAction.cs b/GFreeRDP/IUserAction.cs new file mode 100644 index 0000000..1e1ee4b --- /dev/null +++ b/GFreeRDP/IUserAction.cs @@ -0,0 +1,27 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; + +namespace GFreeRDP +{ + public interface IUserAction + { + void OnNewConnection(string hostname, string username, string password); + } +} diff --git a/GFreeRDP/MainWindow.cs b/GFreeRDP/MainWindow.cs new file mode 100644 index 0000000..5a477e9 --- /dev/null +++ b/GFreeRDP/MainWindow.cs @@ -0,0 +1,52 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using FreeRDP; +using Gtk; + +namespace GFreeRDP +{ + public partial class MainWindow: Gtk.Window, IUserAction + { + RdpClient rdpClient; + + public MainWindow(): base (Gtk.WindowType.Toplevel) + { + Build(); + } + + protected void OnDeleteEvent(object sender, DeleteEventArgs a) + { + Application.Quit(); + a.RetVal = true; + } + + protected void OnConnectActionActivated(object sender, System.EventArgs e) + { + ConnectionDialog connectionDialog = new ConnectionDialog(this); + } + + public void OnNewConnection(string hostname, string username, string password) + { + rdpClient = new RdpClient(); + + rdpClient.Connect(hostname, 3389, username, "", password); + } + } +} diff --git a/GFreeRDP/Program.cs b/GFreeRDP/Program.cs new file mode 100644 index 0000000..9901d49 --- /dev/null +++ b/GFreeRDP/Program.cs @@ -0,0 +1,34 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * + * Copyright 2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using Gtk; + +namespace GFreeRDP +{ + class Program + { + public static void Main(string[] args) + { + Application.Init(); + MainWindow window = new MainWindow(); + window.Show(); + Application.Run(); + } + } +} diff --git a/GFreeRDP/RdpClient.cs b/GFreeRDP/RdpClient.cs new file mode 100644 index 0000000..b1f41f3 --- /dev/null +++ b/GFreeRDP/RdpClient.cs @@ -0,0 +1,143 @@ +/** + * FreeRDP: A Remote Desktop Protocol Implementation + * RDP Connector + * + * Copyright 2011-2012 Marc-Andre Moreau + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +using System; +using FreeRDP; +using System.Threading; + +namespace GFreeRDP +{ + public unsafe class RdpClient : IUpdate, IPrimaryUpdate + { + private RDP rdp; + private int port; + private string hostname; + private string username; + private string domain; + private string password; + + private Thread thread; + private static bool procRunning = true; + + /** + * Instantiate RDP and Thread + */ + public RdpClient() + { + port = 3389; + hostname = "localhost"; + username = "Administrator"; + domain = ""; + password = ""; + rdp = new RDP(); + thread = new Thread(() => ThreadProc(rdp)); + } + + /** + * Connect to FreeRDP server, start thread + */ + public void Connect(string hostname, int port, string username, string domain, string password) + { + rdp.SetUpdateInterface(this); + rdp.SetPrimaryUpdateInterface(this); + rdp.Connect(hostname, port, username, domain, password); + procRunning = true; + thread.Start(); + } + + /** + * Disconnect from FreeRDP server, stop thread + */ + public void Disconnect() + { + rdp.Disconnect(); + procRunning = false; + thread = new Thread(() => ThreadProc(rdp)); + } + + public void OnMouseEvent(UInt16 pointerFlags, UInt16 x, UInt16 y) + { + rdp.SendInputMouseEvent(pointerFlags, x, y); + } + + public void OnKeyboardEvent(UInt16 keyboardFlags, UInt16 keyCode) + { + rdp.SendInputKeyboardEvent(keyboardFlags, keyCode); + } + + public void BeginPaint(rdpContext* context) { } + public void EndPaint(rdpContext* context) { } + public void SetBounds(rdpContext* context, rdpBounds* bounds) { } + public void Synchronize(rdpContext* context) { } + public void DesktopResize(rdpContext* context) { } + + public void BitmapUpdate(rdpContext* context, BitmapUpdate* bitmap) + { + Console.WriteLine("BitmapUpdate"); + } + + public void Palette(rdpContext* context, PaletteUpdate* palette) { } + public void PlaySound(rdpContext* context, PlaySoundUpdate* playSound) { } + + public void SurfaceBits(rdpContext* context, SurfaceBits* surfaceBits) + { + Console.WriteLine("SurfaceBits"); + SurfaceBitsCommand cmd = new SurfaceBitsCommand(); + cmd.Read(surfaceBits); + } + + public void DstBlt(rdpContext* context, DstBltOrder* dstblt) { } + public void PatBlt(rdpContext* context, PatBltOrder* patblt) { } + public void ScrBlt(rdpContext* context, ScrBltOrder* scrblt) { } + + public void OpaqueRect(rdpContext* context, OpaqueRectOrder* opaqueRect) + { + Console.WriteLine("OpaqueRect"); + } + + public void DrawNineGrid(rdpContext* context, DrawNineGridOrder* drawNineGrid) { } + public void MultiDstBlt(rdpContext* context, MultiDstBltOrder* multi_dstblt) { } + public void MultiPatBlt(rdpContext* context, MultiPatBltOrder* multi_patblt) { } + public void MultiScrBlt(rdpContext* context, MultiScrBltOrder* multi_scrblt) { } + public void MultiOpaqueRect(rdpContext* context, MultiOpaqueRectOrder* multi_opaque_rect) { } + public void MultiDrawNineGrid(rdpContext* context, MultiDrawNineGridOrder* multi_draw_nine_grid) { } + public void LineTo(rdpContext* context, LineToOrder* line_to) { } + public void Polyline(rdpContext* context, PolylineOrder* polyline) { } + public void MemBlt(rdpContext* context, MemBltOrder* memblt) { } + public void Mem3Blt(rdpContext* context, Mem3BltOrder* mem3blt) { } + public void SaveBitmap(rdpContext* context, SaveBitmapOrder* save_bitmap) { } + public void GlyphIndex(rdpContext* context, GlyphIndexOrder* glyph_index) { } + public void FastIndex(rdpContext* context, FastIndexOrder* fast_index) { } + public void FastGlyph(rdpContext* context, FastGlyphOrder* fast_glyph) { } + public void PolygonSC(rdpContext* context, PolygonSCOrder* polygon_sc) { } + public void PolygonCB(rdpContext* context, PolygonCBOrder* polygon_cb) { } + public void EllipseSC(rdpContext* context, EllipseSCOrder* ellipse_sc) { } + public void EllipseCB(rdpContext* context, EllipseCBOrder* ellipse_cb) { } + + static void ThreadProc(RDP rdp) + { + while (procRunning) + { + rdp.CheckFileDescriptor(); + Thread.Sleep(10); + } + } + } +} + diff --git a/GFreeRDP/gtk-gui/GFreeRDP.ConnectionDialog.cs b/GFreeRDP/gtk-gui/GFreeRDP.ConnectionDialog.cs new file mode 100644 index 0000000..5fc158b --- /dev/null +++ b/GFreeRDP/gtk-gui/GFreeRDP.ConnectionDialog.cs @@ -0,0 +1,141 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace GFreeRDP +{ + public partial class ConnectionDialog + { + private global::Gtk.HBox hboxHostname; + private global::Gtk.Label labelHostname; + private global::Gtk.Entry entryHostname; + private global::Gtk.HBox hboxCredentials; + private global::Gtk.Label labelUsername; + private global::Gtk.Entry entryUsername; + private global::Gtk.Label labelPassword; + private global::Gtk.Entry entryPassword; + private global::Gtk.Button buttonCancel; + private global::Gtk.Button buttonConnect; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget GFreeRDP.ConnectionDialog + this.Name = "GFreeRDP.ConnectionDialog"; + this.Title = global::Mono.Unix.Catalog.GetString ("Connection"); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Internal child GFreeRDP.ConnectionDialog.VBox + global::Gtk.VBox w1 = this.VBox; + w1.Name = "connectionDialog_VBox"; + w1.BorderWidth = ((uint)(2)); + // Container child connectionDialog_VBox.Gtk.Box+BoxChild + this.hboxHostname = new global::Gtk.HBox (); + this.hboxHostname.Name = "hboxHostname"; + this.hboxHostname.Spacing = 6; + // Container child hboxHostname.Gtk.Box+BoxChild + this.labelHostname = new global::Gtk.Label (); + this.labelHostname.Name = "labelHostname"; + this.labelHostname.LabelProp = global::Mono.Unix.Catalog.GetString ("Hostname:"); + this.hboxHostname.Add (this.labelHostname); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hboxHostname [this.labelHostname])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + // Container child hboxHostname.Gtk.Box+BoxChild + this.entryHostname = new global::Gtk.Entry (); + this.entryHostname.CanFocus = true; + this.entryHostname.Name = "entryHostname"; + this.entryHostname.IsEditable = true; + this.entryHostname.InvisibleChar = '•'; + this.hboxHostname.Add (this.entryHostname); + global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hboxHostname [this.entryHostname])); + w3.Position = 1; + w1.Add (this.hboxHostname); + global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(w1 [this.hboxHostname])); + w4.Position = 0; + w4.Expand = false; + w4.Fill = false; + // Container child connectionDialog_VBox.Gtk.Box+BoxChild + this.hboxCredentials = new global::Gtk.HBox (); + this.hboxCredentials.Name = "hboxCredentials"; + this.hboxCredentials.Spacing = 6; + // Container child hboxCredentials.Gtk.Box+BoxChild + this.labelUsername = new global::Gtk.Label (); + this.labelUsername.Name = "labelUsername"; + this.labelUsername.LabelProp = global::Mono.Unix.Catalog.GetString ("Username:"); + this.hboxCredentials.Add (this.labelUsername); + global::Gtk.Box.BoxChild w5 = ((global::Gtk.Box.BoxChild)(this.hboxCredentials [this.labelUsername])); + w5.Position = 0; + w5.Expand = false; + w5.Fill = false; + // Container child hboxCredentials.Gtk.Box+BoxChild + this.entryUsername = new global::Gtk.Entry (); + this.entryUsername.CanFocus = true; + this.entryUsername.Name = "entryUsername"; + this.entryUsername.IsEditable = true; + this.entryUsername.InvisibleChar = '•'; + this.hboxCredentials.Add (this.entryUsername); + global::Gtk.Box.BoxChild w6 = ((global::Gtk.Box.BoxChild)(this.hboxCredentials [this.entryUsername])); + w6.Position = 1; + // Container child hboxCredentials.Gtk.Box+BoxChild + this.labelPassword = new global::Gtk.Label (); + this.labelPassword.Name = "labelPassword"; + this.labelPassword.LabelProp = global::Mono.Unix.Catalog.GetString ("Password:"); + this.hboxCredentials.Add (this.labelPassword); + global::Gtk.Box.BoxChild w7 = ((global::Gtk.Box.BoxChild)(this.hboxCredentials [this.labelPassword])); + w7.Position = 2; + w7.Expand = false; + w7.Fill = false; + // Container child hboxCredentials.Gtk.Box+BoxChild + this.entryPassword = new global::Gtk.Entry (); + this.entryPassword.CanFocus = true; + this.entryPassword.Name = "entryPassword"; + this.entryPassword.IsEditable = true; + this.entryPassword.InvisibleChar = '•'; + this.hboxCredentials.Add (this.entryPassword); + global::Gtk.Box.BoxChild w8 = ((global::Gtk.Box.BoxChild)(this.hboxCredentials [this.entryPassword])); + w8.Position = 3; + w1.Add (this.hboxCredentials); + global::Gtk.Box.BoxChild w9 = ((global::Gtk.Box.BoxChild)(w1 [this.hboxCredentials])); + w9.Position = 1; + w9.Expand = false; + w9.Fill = false; + // Internal child GFreeRDP.ConnectionDialog.ActionArea + global::Gtk.HButtonBox w10 = this.ActionArea; + w10.Name = "connectionDialog_ActionArea"; + w10.Spacing = 10; + w10.BorderWidth = ((uint)(5)); + w10.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4)); + // Container child connectionDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonCancel = new global::Gtk.Button (); + this.buttonCancel.CanDefault = true; + this.buttonCancel.CanFocus = true; + this.buttonCancel.Name = "buttonCancel"; + this.buttonCancel.UseStock = true; + this.buttonCancel.UseUnderline = true; + this.buttonCancel.Label = "gtk-cancel"; + this.AddActionWidget (this.buttonCancel, -6); + global::Gtk.ButtonBox.ButtonBoxChild w11 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10 [this.buttonCancel])); + w11.Expand = false; + w11.Fill = false; + // Container child connectionDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild + this.buttonConnect = new global::Gtk.Button (); + this.buttonConnect.CanDefault = true; + this.buttonConnect.CanFocus = true; + this.buttonConnect.Name = "buttonConnect"; + this.buttonConnect.UseUnderline = true; + this.buttonConnect.Label = global::Mono.Unix.Catalog.GetString ("Connect"); + this.AddActionWidget (this.buttonConnect, -5); + global::Gtk.ButtonBox.ButtonBoxChild w12 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w10 [this.buttonConnect])); + w12.Position = 1; + w12.Expand = false; + w12.Fill = false; + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.DefaultWidth = 516; + this.DefaultHeight = 135; + this.Show (); + this.buttonCancel.Clicked += new global::System.EventHandler (this.OnButtonCancelClicked); + this.buttonConnect.Clicked += new global::System.EventHandler (this.OnButtonConnectClicked); + } + } +} diff --git a/GFreeRDP/gtk-gui/GFreeRDP.MainWindow.cs b/GFreeRDP/gtk-gui/GFreeRDP.MainWindow.cs new file mode 100644 index 0000000..2ebf9ec --- /dev/null +++ b/GFreeRDP/gtk-gui/GFreeRDP.MainWindow.cs @@ -0,0 +1,62 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace GFreeRDP +{ + public partial class MainWindow + { + private global::Gtk.UIManager UIManager; + private global::Gtk.Action FileAction; + private global::Gtk.Action HelpAction; + private global::Gtk.Action ConnectAction; + private global::Gtk.Action QuitAction; + private global::Gtk.VBox vboxMain; + private global::Gtk.MenuBar menuBarMain; + + protected virtual void Build () + { + global::Stetic.Gui.Initialize (this); + // Widget GFreeRDP.MainWindow + this.UIManager = new global::Gtk.UIManager (); + global::Gtk.ActionGroup w1 = new global::Gtk.ActionGroup ("Default"); + this.FileAction = new global::Gtk.Action ("FileAction", global::Mono.Unix.Catalog.GetString ("File"), null, null); + this.FileAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("File"); + w1.Add (this.FileAction, null); + this.HelpAction = new global::Gtk.Action ("HelpAction", global::Mono.Unix.Catalog.GetString ("Help"), null, null); + this.HelpAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Help"); + w1.Add (this.HelpAction, null); + this.ConnectAction = new global::Gtk.Action ("ConnectAction", global::Mono.Unix.Catalog.GetString ("Connect"), null, null); + this.ConnectAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Connect"); + w1.Add (this.ConnectAction, null); + this.QuitAction = new global::Gtk.Action ("QuitAction", global::Mono.Unix.Catalog.GetString ("Quit"), null, null); + this.QuitAction.ShortLabel = global::Mono.Unix.Catalog.GetString ("Quit"); + w1.Add (this.QuitAction, null); + this.UIManager.InsertActionGroup (w1, 0); + this.AddAccelGroup (this.UIManager.AccelGroup); + this.Name = "GFreeRDP.MainWindow"; + this.Title = global::Mono.Unix.Catalog.GetString ("MainWindow"); + this.WindowPosition = ((global::Gtk.WindowPosition)(4)); + // Container child GFreeRDP.MainWindow.Gtk.Container+ContainerChild + this.vboxMain = new global::Gtk.VBox (); + this.vboxMain.Name = "vboxMain"; + this.vboxMain.Spacing = 6; + // Container child vboxMain.Gtk.Box+BoxChild + this.UIManager.AddUiFromString (""); + this.menuBarMain = ((global::Gtk.MenuBar)(this.UIManager.GetWidget ("/menuBarMain"))); + this.menuBarMain.Name = "menuBarMain"; + this.vboxMain.Add (this.menuBarMain); + global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.vboxMain [this.menuBarMain])); + w2.Position = 0; + w2.Expand = false; + w2.Fill = false; + this.Add (this.vboxMain); + if ((this.Child != null)) { + this.Child.ShowAll (); + } + this.DefaultWidth = 409; + this.DefaultHeight = 300; + this.Show (); + this.DeleteEvent += new global::Gtk.DeleteEventHandler (this.OnDeleteEvent); + this.ConnectAction.Activated += new global::System.EventHandler (this.OnConnectActionActivated); + } + } +} diff --git a/GFreeRDP/gtk-gui/generated.cs b/GFreeRDP/gtk-gui/generated.cs new file mode 100644 index 0000000..4e5b605 --- /dev/null +++ b/GFreeRDP/gtk-gui/generated.cs @@ -0,0 +1,29 @@ + +// This file has been generated by the GUI designer. Do not modify. +namespace Stetic +{ + internal class Gui + { + private static bool initialized; + + internal static void Initialize (Gtk.Widget iconRenderer) + { + if ((Stetic.Gui.initialized == false)) { + Stetic.Gui.initialized = true; + } + } + } + + 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; + } + } +} diff --git a/GFreeRDP/gtk-gui/gui.stetic b/GFreeRDP/gtk-gui/gui.stetic new file mode 100644 index 0000000..6c8ed4e --- /dev/null +++ b/GFreeRDP/gtk-gui/gui.stetic @@ -0,0 +1,219 @@ + + + + .. + 2.12 + + + + + + + + + Action + File + File + + + Action + Help + Help + + + Action + Connect + Connect + + + + Action + Quit + Quit + + + + MainWindow + CenterOnParent + + + + + 6 + + + + + + + + + + + + + 0 + True + False + False + + + + + + + + + + + Connection + CenterOnParent + 2 + False + + + + 2 + + + + 6 + + + + Hostname: + + + 0 + True + False + False + + + + + + True + True + + + + 1 + True + + + + + 0 + True + False + False + + + + + + 6 + + + + Username: + + + 0 + True + False + False + + + + + + True + True + + + + 1 + True + + + + + + Password: + + + 2 + True + False + False + + + + + + True + True + + + + 3 + True + + + + + 1 + True + False + False + + + + + + + + 10 + 5 + 2 + End + + + + True + True + True + StockItem + gtk-cancel + -6 + + gtk-cancel + + + False + False + + + + + + True + True + TextOnly + Connect + True + -5 + + + + 1 + False + False + + + + + + \ No newline at end of file diff --git a/NFreeRDP/MainWindow.resources b/NFreeRDP/MainWindow.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/NFreeRDP/MainWindow.resources differ diff --git a/NFreeRDP/NFreeRDP.csproj b/NFreeRDP/NFreeRDP.csproj index a2697a6..dd7eac6 100644 --- a/NFreeRDP/NFreeRDP.csproj +++ b/NFreeRDP/NFreeRDP.csproj @@ -1,4 +1,4 @@ - + Debug @@ -11,7 +11,6 @@ NFreeRDP NFreeRDP v4.0 - Client 512 publish\ true diff --git a/NFreeRDP/Properties/Resources.resources b/NFreeRDP/Properties/Resources.resources new file mode 100644 index 0000000..6c05a97 Binary files /dev/null and b/NFreeRDP/Properties/Resources.resources differ -- cgit v1.2.3