예제 #1
0
        ///<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);
        }
예제 #2
0
 ///<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();
        }
예제 #4
0
        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;
        }
예제 #5
0
        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();
        }
예제 #6
0
        // 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();
        }
예제 #7
0
        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();
            });
        }
예제 #8
0
        void OnDataViewRemoved(object o, RemovedArgs args)
        {
            DataViewDisplay dvd = (DataViewDisplay)args.Widget;

            dvd.Layout.AreaGroup.PreRenderEvent -= new AreaGroup.PreRenderHandler(BeforeRender);
        }