Esempio n. 1
0
        /// <summary>
        /// estimate the memory requirement
        /// </summary>

        private void _btnMemory_Click(object sender, EventArgs e)
        {
            MemoryEstimator me;
            int             size;

            try {
                UpdatePreviewEvent(null, null);

                me         = new MemoryEstimator();
                me.FontDef = _fd;

                size = me.Estimate(this);
                MessageBox.Show("Approximately " + size + " bytes of flash memory are required.", "Memory Requirement", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            catch (Exception ex) {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// estimate the memory requirement
        /// </summary>
        private void _btnMemory_Click(object sender, EventArgs e)
        {
            MemoryEstimator me;
              int size;

              try {

            UpdatePreviewEvent(null,null);

            me=new MemoryEstimator();
            me.FontDef=_fd;

            size=me.Estimate(this);
            MessageBox.Show("Approximately "+size+" bytes of flash memory are required.","Memory Requirement",MessageBoxButtons.OK,MessageBoxIcon.Information);
              }
              catch(Exception ex) {
            MessageBox.Show(ex.Message,"Error",MessageBoxButtons.OK,MessageBoxIcon.Error);
              }
        }