This repository has been archived by the owner on Mar 2, 2024. It is now read-only.
-
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
Showing
25 changed files
with
1,090 additions
and
43 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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
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,92 @@ | ||
using System; | ||
using System.Diagnostics; | ||
namespace TerraTechModManagerGTK | ||
{ | ||
public partial class DialogDescription : Gtk.Dialog | ||
{ | ||
public int Return = 0; | ||
|
||
public string Site, Folder, CloudName; | ||
|
||
public enum DescType { NoButtons, LocalModInfo, ServerModInfo, UpdateInfo } | ||
|
||
public DialogDescription() | ||
{ | ||
this.Build(); | ||
entry3.Visible = false; | ||
} | ||
|
||
public void Set(DescType WindowType, string Title, string Message, string WindowTitle = null) | ||
{ | ||
LocalModInfoArea.Visible = false; | ||
ServerModInfoArea.Visible = false; | ||
UpdateInfoArea.Visible = false; | ||
switch (WindowType) | ||
{ | ||
case DescType.LocalModInfo: LocalModInfoArea.Visible = true; break; | ||
case DescType.ServerModInfo: ServerModInfoArea.Visible = true; break; | ||
case DescType.UpdateInfo: UpdateInfoArea.Visible = true; break; | ||
} | ||
labelTitle.Markup = "<b>" + Title + "</b>"; | ||
labelTextView.Text = ""; | ||
labelTextView.Markup = MarkdownConvert.ToPangoString(Message); | ||
if (string.IsNullOrWhiteSpace(labelTextView.Text)) | ||
{ | ||
labelTextView.Text = Message; | ||
} | ||
if (string.IsNullOrWhiteSpace(WindowTitle)) | ||
{ | ||
this.Title = "TTMM - " + Title; | ||
} | ||
else | ||
{ | ||
this.Title = "TTMM - " + WindowTitle; | ||
} | ||
} | ||
|
||
protected void OpenFolderEvent(object sender, EventArgs e) | ||
{ | ||
if (Tools.IsLinux) | ||
{ | ||
Process.Start("xdg-open", Folder); | ||
} | ||
else | ||
{ | ||
Process.Start(Folder); | ||
} | ||
} | ||
|
||
protected void OpenSiteEvent(object sender, EventArgs e) | ||
{ | ||
Process.Start(Site); | ||
} | ||
|
||
protected void InstallModEvent(object sender, EventArgs e) | ||
{ | ||
} | ||
|
||
protected void InstallUpdateEvent(object sender, EventArgs e) | ||
{ | ||
this.Destroy(); | ||
UpdateProgram.UpdateAccepted(); | ||
} | ||
|
||
protected void OnCloseEvent(object sender, EventArgs e) | ||
{ | ||
this.Destroy(); | ||
} | ||
|
||
protected void OnChanged(object sender, EventArgs e) | ||
{ | ||
labelTextView.Markup = MarkdownConvert.ToPangoString(entry3.Text.Replace("\\n","\n")); | ||
} | ||
|
||
protected void OnTextview1InsertAtCursor(object o, Gtk.InsertAtCursorArgs args) | ||
{ | ||
} | ||
|
||
protected void OnTextview1PopulatePopup(object o, Gtk.PopulatePopupArgs args) | ||
{ | ||
} | ||
} | ||
} |
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
Oops, something went wrong.