Ejemplo n.º 1
0
 internal void RulerToolStateChanged(bool newState)
 {
     if (Settings.Default.MonitorSize == 0 && newState)
     {
         MonitorSizeForm monitorSize = new MonitorSizeForm();
         bool            validSize   = false;
         DialogResult    result      = DialogResult.Cancel;
         do
         {
             result = monitorSize.ShowDialog();
             int size;
             if (monitorSize.TryGetSize(out size))
             {
                 Settings.Default.MonitorSize = size;
                 Settings.Default.Save();
                 validSize = true;
             }
         } while (result != DialogResult.OK || !validSize);
     }
     this.rulerToolActive = newState;
     this.previewBox.Refresh();
 }
Ejemplo n.º 2
0
        internal void RulerToolStateChanged(bool newState)
        {
            if (Settings.Default.MonitorSize == 0 && newState)
            {
                MonitorSizeForm monitorSize = new MonitorSizeForm();
                bool validSize = false;
                DialogResult result = DialogResult.Cancel;
                do
                {
                    result = monitorSize.ShowDialog();
                    int size;
                    if (monitorSize.TryGetSize(out size))
                    {
                        Settings.Default.MonitorSize = size;
                        Settings.Default.Save();
                        validSize = true;
                    }

                } while (result != DialogResult.OK || !validSize);
            }
            this.rulerToolActive = newState;
            this.previewBox.Refresh();
        }