-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b68eaff
commit 31af6d0
Showing
3 changed files
with
79 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
using System; | ||
using NGettext; | ||
using Xwt; | ||
using System.Diagnostics; | ||
|
||
namespace R7.Webmate.Xwt | ||
{ | ||
public class ExternalToolsWidget: Widget | ||
{ | ||
protected ICatalog T = TextCatalogKeeper.GetDefault (); | ||
|
||
#region Controls | ||
|
||
#endregion | ||
|
||
public ExternalToolsWidget () | ||
{ | ||
var btnMergePdf = new Button ("Merge PDF"); | ||
btnMergePdf.Clicked += (sender, e) => { | ||
Process.Start ("x-www-browser", "https://www.ilovepdf.com/merge_pdf"); | ||
}; | ||
|
||
var btnSplitPdf = new Button ("Split PDF"); | ||
btnSplitPdf.Clicked += (sender, e) => { | ||
Process.Start ("x-www-browser", "https://www.ilovepdf.com/split_pdf"); | ||
}; | ||
|
||
var btnCompressPdf = new Button ("Compress PDF"); | ||
btnCompressPdf.Clicked += (sender, e) => { | ||
Process.Start ("x-www-browser", "https://www.ilovepdf.com/compress_pdf"); | ||
}; | ||
|
||
var btnILovePdf = new Button ("More Tools..."); | ||
btnILovePdf.Clicked += (sender, e) => { | ||
Process.Start ("x-www-browser", "https://www.ilovepdf.com"); | ||
}; | ||
|
||
var btnCharmap = new Button ("Character Map"); | ||
btnCharmap.Clicked += (sender, e) => { | ||
Process.Start ("charmap"); | ||
}; | ||
|
||
var table1 = new Table (); | ||
table1.Margin = Const.VBOX_MARGIN; | ||
table1.Add (btnMergePdf, 0, 0); | ||
table1.Add (btnSplitPdf, 1, 0); | ||
table1.Add (btnCompressPdf, 2, 0); | ||
table1.Add (btnILovePdf, 3, 0); | ||
|
||
var table2 = new Table (); | ||
table2.Margin = Const.VBOX_MARGIN; | ||
table2.Add (btnCharmap, 0, 0); | ||
|
||
var vbox = new VBox (); | ||
vbox.Margin = Const.VBOX_MARGIN; | ||
|
||
var expander1 = new Expander (); | ||
expander1.Expanded = true; | ||
expander1.Label = "I Love PDF"; | ||
expander1.Content = table1; | ||
|
||
var expander2 = new Expander (); | ||
expander2.Expanded = true; | ||
expander2.Label = "Character map"; | ||
expander2.Content = table2; | ||
|
||
vbox.PackStart (expander1, false, true); | ||
vbox.PackStart (expander2, false, true); | ||
|
||
var scrollView = new ScrollView (vbox); | ||
|
||
Content = scrollView; | ||
Content.Show (); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters