using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using Rmake.Model; using Rmake.Model.Processable.Orders; using Rmake.Model.Processable.Attributes; using Rmake.GUI.Helpers; using Rmake.Framework.Logging; namespace Rmake.GUI.Editor.Orders { [OrderEditor(typeof(TextWindowOrder))] public partial class TextOrderEditor : Form { private TextWindowOrder order = null; public TextOrderEditor(Order order) { InitializeComponent(); try { this.order = order as TextWindowOrder; if (this.order != null) { textBox.Text = this.order.Text; } else { this.Close(); } } catch (Exception ex) { Logger.Fatal(ex); } } private void acceptButton_Click(object sender, EventArgs e) { try { this.order.Text = textBox.Text; this.Close(); } catch (Exception ex) { Logger.Fatal(ex); } } private void cancelButton_Click(object sender, EventArgs e) { try { this.Close(); } catch (Exception ex) { Logger.Fatal(ex); } } } }