public MainPanel() { this.Build(); ironFileEntry.Path = IronManager.GetInterpreterPath(); ironFileEntry.PathChanged += (o, e) => UpdateStatus(ironFileEntry.Path); UpdateStatus(ironFileEntry.Path); }
void UpdateStatus(string path) { string version; if (IronManager.TryGetRuntimeVersion(path, out version)) { fileEntryImage.SetFromStock(Gtk.Stock.Ok, Gtk.IconSize.Button); informationLabel.LabelProp = version; } else { fileEntryImage.SetFromStock(Stock.Error, Gtk.IconSize.Button); informationLabel.LabelProp = "Specify a valid interpreter first."; } }
public override void ApplyChanges() { IronManager.SetInterpreterPath(panel.InterpreterPath); }