///<summary>Update all conversion entries</summary> public void Update() { if (!this.Visible) { return; } DataViewDisplay dvd = (DataViewDisplay)dataBook.CurrentPageWidget; if (dvd == null) { Clear(); return; } DataView dv = dvd.View; Update8bit(dv); Update16bit(dv); Update32bit(dv); Update64bit(dv); UpdateFloat(dv); UpdateBases(dv); }
///<summary>Handle the Benchmark Toolbar button command (Hidden)</summary> public void OnBenchmark(object o, EventArgs args) { if (dataBook.NPages > 0) { DataViewDisplay dvd = (DataViewDisplay)dataBook.CurrentPageWidget; dvd.Benchmark(); } }
void OnCloseButtonClicked(object o, EventArgs args) { // give focus to active dataview if the widget has it if (dataBook.NPages > 0 && IsFocusInWidget()) { DataViewDisplay curdvd = (DataViewDisplay)dataBook.CurrentPageWidget; curdvd.GrabKeyboardFocus(); } this.Hide(); }
void OnCloseButtonClicked(object o, EventArgs args) { if (dataBook.NPages > 0 && IsFocusInWidget()) { DataViewDisplay curdvd = (DataViewDisplay)dataBook.CurrentPageWidget; curdvd.GrabKeyboardFocus(); } this.Hide(); // forget focus when hiding previouslyFocused = null; }
void OnBufferChanged(DataView dv) { // if changed dataview is not the current one just ignore DataViewDisplay dvd = (DataViewDisplay)dataBook.CurrentPageWidget; if (dvd == null || dvd.View != dv) { return; } Update(); }
// redefine Hide() method // to properly handle hiding protected override void OnHidden() { // if the focus is in the table // give it to the active dataview if (IsFocusInTable()) { DataViewDisplay dvd = (DataViewDisplay)dataBook.CurrentPageWidget; if (dvd != null) { dvd.GrabKeyboardFocus(); } } Preferences.Proxy.Change("Tools.ConversionTable.Show", "False", "ct2"); base.OnHidden(); }
void OnBufferContentsChanged(ByteBuffer bb) { Gtk.Application.Invoke(delegate { DataView dv = null; // find DataView that owns bb foreach (DataViewDisplay dvtemp in dataBook.Children) { if (dvtemp.View.Buffer == bb) { dv = dvtemp.View; break; } } DataViewDisplay dvd = (DataViewDisplay)dataBook.CurrentPageWidget; if (dvd == null || dvd.View != dv) { return; } Update(); }); }
void OnDataViewRemoved(object o, RemovedArgs args) { DataViewDisplay dvd = (DataViewDisplay)args.Widget; dvd.Layout.AreaGroup.PreRenderEvent -= new AreaGroup.PreRenderHandler(BeforeRender); }