Exemplo n.º 1
0
            public void ZoomByUnit(ZoomUnit zoomUnit)
            {
                float delta;

                switch (zoomUnit)
                {
                case ZoomUnit.LargeDecrement:
                    delta = -100;
                    break;

                case ZoomUnit.LargeIncrement:
                    delta = 100;
                    break;

                case ZoomUnit.SmallDecrement:
                    delta = -20;
                    break;

                case ZoomUnit.SmallIncrement:
                    delta = 20;
                    break;

                case ZoomUnit.NoAmount:
                default:
                    return;
                }

                _graph.ScaleGraph(delta);
            }
Exemplo n.º 2
0
        /// <summary>
        /// Initialize scale view of content to indicated value and unit.
        /// </summary>
        /// <param name="unit"></param>
        /// <param name="defaultValue"></param>
        public void InitScaleView(ZoomUnit unit, double defaultValue)
        {
            var unitList = new ObservableCollection <UnitComboLib.Models.ListItem>(SettingsFactory.GenerateScreenUnitList());

            SizeUnitLabel =
                UnitComboLib.UnitViewModeService.CreateInstance(unitList,
                                                                new ScreenConverter(),
                                                                (int)unit, defaultValue);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Convert between local zoom unit enumeration and remote zoom unit enumeration.
        /// </summary>
        /// <param name="unit"></param>
        /// <returns></returns>
        private UnitComboLib.Models.Unit.Itemkey ConvertZoomUnit(ZoomUnit unit)
        {
            switch (unit)
            {
            case ZoomUnit.Percentage:
                return(UnitComboLib.Models.Unit.Itemkey.ScreenPercent);

            case ZoomUnit.Points:
                return(UnitComboLib.Models.Unit.Itemkey.ScreenFontPoints);

            default:
                throw new System.NotImplementedException(unit.ToString());
            }
        }
 public void ZoomByUnit(ZoomUnit zoomUnit)
 {
     try
     {
         this._pattern.ZoomByUnit((ZoomUnit)zoomUnit);
     }
     catch (System.Runtime.InteropServices.COMException e)
     {
         Exception newEx; if (Utility.ConvertException(e, out newEx))
         {
             throw newEx;
         }
         else
         {
             throw;
         }
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// Copy constructor
        /// </summary>
        /// <param name="copyThis"></param>
        public Options(Options copyThis)
            : this()
        {
            if (copyThis == null)
            {
                return;
            }

            this._ThemesManager    = copyThis._ThemesManager;
            this.EditorTextOptions = copyThis.EditorTextOptions;
            this._WordWarpText     = copyThis._WordWarpText;

            this._DocumentZoomUnit = copyThis._DocumentZoomUnit;     // Zoom View in Percent
            this._DocumentZoomView = copyThis._DocumentZoomView;     // Font Size 12 is 100 %

            this._ReloadOpenFilesOnAppStart = copyThis._ReloadOpenFilesOnAppStart;
            this._RunSingleInstance         = copyThis._RunSingleInstance;
            this._CurrentTheme     = copyThis._CurrentTheme;
            this._LanguageSelected = copyThis._LanguageSelected;

            this._IsDirty = copyThis._IsDirty;
        }
Exemplo n.º 6
0
        /// <summary>
        /// Hidden class Constructor
        /// </summary>
        protected Options()
        {
            this._ThemesManager = null;

            this.EditorTextOptions = new TextEditorOptions();
            this._WordWarpText     = false;

            this._DocumentZoomUnit = ZoomUnit.Percentage;     // Zoom View in Percent
            this._DocumentZoomView = 100;                     // Font Size 12 is 100 %

            this._ReloadOpenFilesOnAppStart = true;
            this._RunSingleInstance         = true;
            this._CurrentTheme     = Edi.Themes.Factory.DefaultThemeName;
            this._LanguageSelected = SettingsFactory.DefaultLocal;

            this.HighlightOnFileNew          = true;
            this.FileNewDefaultFileName      = Edi.Util.Local.Strings.STR_FILE_DEFAULTNAME;
            this.FileNewDefaultFileExtension = ".txt";

            this.ExplorerSettings = new ExplorerSettingsModel(true);

            this._IsDirty = false;
        }
Exemplo n.º 7
0
        /// <summary>
        /// Hidden class Constructor
        /// </summary>
        protected Options()
        {
            this.mThemesManager = null;

            this.EditorTextOptions = new TextEditorOptions();
            this.mWordWarpText     = false;

            this.mDocumentZoomUnit = ZoomUnit.Percentage;     // Zoom View in Percent
            this.mDocumentZoomView = 100;                     // Font Size 12 is 100 %

            this.mReloadOpenFilesOnAppStart = true;
            this.mRunSingleInstance         = true;
            this.mCurrentTheme     = ThemesManager.DefaultThemeName;
            this.mMRU_SortMethod   = MRUSortMethod.PinnedEntriesFirst;
            this.mLanguageSelected = Options.DefaultLocal;

            this.HighlightOnFileNew          = true;
            this.FileNewDefaultFileName      = Util.Local.Strings.STR_FILE_DEFAULTNAME;
            this.FileNewDefaultFileExtension = ".txt";

            this.ExplorerSettings = new ExplorerSettingsModel(true);

            this.mIsDirty = false;
        }
        public void ZoomByUnit(ZoomUnit zoomUnit)
        {
            double delta = 0;

            switch (zoomUnit)
            {
            case ZoomUnit.ZoomUnit_LargeDecrement: delta = -0.25; break;

            case ZoomUnit.ZoomUnit_SmallDecrement: delta = -0.1; break;

            case ZoomUnit.ZoomUnit_LargeIncrement: delta = 0.25; break;

            case ZoomUnit.ZoomUnit_SmallIncrement: delta = 0.1; break;

            case ZoomUnit.ZoomUnit_NoAmount: delta = 0; break;
            }
            double proposed = this.zoomLevel + delta;

            if (proposed < 0.25 || proposed > 4.0)
            {
                throw new InvalidOperationException();
            }
            this.zoomLevel = proposed;
        }
Exemplo n.º 9
0
 public void ZoomByUnit(ZoomUnit zu)
 {
     this.Pattern.ZoomByUnit(zu);
 }
 public abstract void ZoomByUnit(ZoomUnit zoomUnit);
Exemplo n.º 11
0
 public void ZoomByUnit(ZoomUnit zoomUnit)
 {
     ComCallWrapper.Call(() => NativePattern.ZoomByUnit((UIA.ZoomUnit)zoomUnit));
 }
Exemplo n.º 12
0
 public override void ZoomByUnit(ZoomUnit zoomUnit)
 {
     Com.Call(() => this.NativePattern.ZoomByUnit((Interop.UIAutomationClient.ZoomUnit)zoomUnit));
 }
Exemplo n.º 13
0
 public override void ZoomByUnit(ZoomUnit zoomUnit)
 {
     Com.Call(() => NativePattern.ZoomByUnit((UIA.ZoomUnit)zoomUnit));
 }
Exemplo n.º 14
0
 public void ZoomByUnit(ZoomUnit zoomUnit)
 {
     ComCallWrapper.Call(() => ExtendedNativePattern.ZoomByUnit((interop.UIAutomationCore.ZoomUnit)zoomUnit));
 }
Exemplo n.º 15
0
 public void ZoomByUnit(ZoomUnit zoomUnit)
 {
     try
     {
         this._pattern.ZoomByUnit((UIAutomationClient.ZoomUnit)zoomUnit);
     }
     catch (System.Runtime.InteropServices.COMException e)
     {
         Exception newEx; if (Utility.ConvertException(e, out newEx)) { throw newEx; } else { throw; }
     }
 }
Exemplo n.º 16
0
        /// <summary>
        /// Initialize scale view of content to indicated value and unit.
        /// </summary>
        /// <param name="unit"></param>
        /// <param name="defaultValue"></param>
        public void InitScaleView(ZoomUnit unit, double defaultValue)
        {
            var unitList = new ObservableCollection <ListItem>(Options.GenerateScreenUnitList());

            this.SizeUnitLabel = new UnitViewModel(unitList, new ScreenConverter(), (int)unit, defaultValue);
        }