Files
@ f28757bb21cb
Branch filter:
Location: ATITD-Tools/Desert-Paint-Lab/ReactionStatusWindow.cs - annotation
f28757bb21cb
1.8 KiB
text/x-csharp
Refactor recipe / reaction computation into a common class. Add some file utilities for supporting Mac bundles. Add some scripts for building Mac app bundles. Add a help window that shows the missing reactions.
f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb f28757bb21cb | using System;
namespace DesertPaintLab
{
public partial class ReactionStatusWindow : Gtk.Window
{
//PlayerProfile profile;
public ReactionStatusWindow(PlayerProfile profile) : base(Gtk.WindowType.Toplevel)
{
//this.profile = profile;
this.Build();
//Gtk.CellRendererText reagentColumnCell = new Gtk.CellRendererText();
int count = 0;
foreach (string name1 in ReagentManager.Names)
{
Reagent reagent1 = ReagentManager.GetReagent(name1);
foreach (string name2 in ReagentManager.Names)
{
if (name1.Equals(name2))
{
continue;
}
Reagent reagent2 = ReagentManager.GetReagent(name2);
Reaction reaction = profile.FindReaction(reagent1, reagent2);
if (reaction == null)
{
if (count == 0)
{
Gtk.Label header = new Gtk.Label("Missing Reactions:");
resultbox.PackStart(header, false, false, 0);
Gtk.HSeparator sep = new Gtk.HSeparator();
resultbox.PackStart(sep, false, false, 0);
}
Gtk.Label label = new Gtk.Label(name1 + " + " + name2);
resultbox.PackStart(label, false, false, 0);
++count;
}
}
}
if (count == 0)
{
Gtk.Label header = new Gtk.Label("All reactions recorded!");
resultbox.PackStart(header, false, false, 0);
}
ShowAll();
}
}
}
|