private void encoderToggled(object sender, Gtk.ToggledArgs args) { Gtk.TreeIter iter; listStoreAll.GetIter(out iter, new Gtk.TreePath(args.Path)); ChronopicRegisterWindowTypes crwt = (ChronopicRegisterWindowTypes)listStoreAll.GetValue(iter, 0); if (!crwt.Encoder) { crwt.Unknown = false; crwt.Contacts = false; crwt.Encoder = true; } //store on SQL SqliteChronopicRegister.Update(false, new ChronopicRegisterPort(crwt.SerialNumber, ChronopicRegisterPort.Types.ENCODER), ChronopicRegisterPort.Types.ENCODER); }
private void RenderEncoder(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { ChronopicRegisterWindowTypes crwt = (ChronopicRegisterWindowTypes)model.GetValue(iter, 0); (cell as Gtk.CellRendererToggle).Active = crwt.Encoder; }
private void RenderPort(Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel model, Gtk.TreeIter iter) { ChronopicRegisterWindowTypes crwt = (ChronopicRegisterWindowTypes)model.GetValue(iter, 0); (cell as Gtk.CellRendererText).Text = crwt.Port; }