示例#1
0
        public bool OnShowEnvironmentError(object args)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            view.ShowEnvironmentError();
            return(true);
        }
示例#2
0
        public bool OnInsertNaturalClass(object args)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            return(SimpleListChooser.ChooseNaturalClass(view.RootBox, m_cache,
                                                        m_persistenceProvider, Mediator));
        }
示例#3
0
        public bool OnInsertHashMark(object args)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            view.RootBox.OnChar((int)'#');
            return(true);
        }
示例#4
0
        public bool OnInsertEnvironmentBar(object args)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            view.RootBox.OnChar((int)'_');
            return(true);
        }
示例#5
0
        public bool OnInsertOptionalItem(object args)
        {
            CheckDisposed();
            StringRepSliceView view  = Control as StringRepSliceView;
            IVwRootBox         rootb = view.RootBox;

            PhEnvironment.InsertOptionalItem(rootb);
            return(true);
        }
        public bool OnInsertHashMark(object args)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            m_cache.DomainDataByFlid.BeginUndoTask(MEStrings.ksInsertWordBoundary, MEStrings.ksInsertWordBoundary);
            view.RootBox.OnChar((int)'#');
            m_cache.DomainDataByFlid.EndUndoTask();
            return(true);
        }
        public bool OnInsertEnvironmentBar(object args)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            m_cache.DomainDataByFlid.BeginUndoTask(MEStrings.ksInsertEnvironmentBar, MEStrings.ksInsertEnvironmentBar);
            view.RootBox.OnChar((int)'_');
            m_cache.DomainDataByFlid.EndUndoTask();
            return(true);
        }
        public bool OnInsertOptionalItem(object args)
        {
            CheckDisposed();
            StringRepSliceView view  = Control as StringRepSliceView;
            IVwRootBox         rootb = view.RootBox;

            m_cache.DomainDataByFlid.BeginUndoTask(MEStrings.ksInsertOptionalItem, MEStrings.ksInsertOptionalItem);
            PhoneEnvReferenceSlice.InsertOptionalItem(rootb);
            m_cache.DomainDataByFlid.EndUndoTask();
            return(true);
        }
        public bool OnInsertNaturalClass(object args)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            m_cache.DomainDataByFlid.BeginUndoTask(MEStrings.ksInsertNaturalClass, MEStrings.ksInsertNaturalClass);
            bool fOk = SimpleListChooser.ChooseNaturalClass(view.RootBox, m_cache,
                                                            m_persistenceProvider, Mediator);

            m_cache.DomainDataByFlid.EndUndoTask();
            return(fOk);
        }
示例#10
0
        /// <summary>
        /// This menu item is turned off if a slash already exists in the environment string.
        /// </summary>
        /// <param name="commandObject"></param>
        /// <param name="display"></param>
        /// <returns></returns>
        public virtual bool OnDisplayShowEnvironmentError(object commandObject,
                                                          ref UIItemDisplayProperties display)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            if (view == null)
            {
                return(false);
            }
            display.Enabled = view.CanShowEnvironmentError();
            return(true);
        }
示例#11
0
        /// <summary>
        /// This menu item is on if a slash already exists in the environment.
        /// </summary>
        /// <param name="commandObject"></param>
        /// <param name="display"></param>
        /// <returns></returns>
        public virtual bool OnDisplayInsertHashMark(object commandObject,
                                                    ref UIItemDisplayProperties display)
        {
            CheckDisposed();
            StringRepSliceView view = Control as StringRepSliceView;

            if (view == null)
            {
                return(false);
            }
            display.Enabled = view.CanInsertHashMark();
            return(true);
        }
示例#12
0
        /// <summary>
        /// Therefore this method, called once we have a cache and object, is our first chance to
        /// actually create the embedded control.
        /// </summary>
        public override void FinishInit()
        {
            CheckDisposed();

            StringRepSliceView ctrl = Control as StringRepSliceView;             //new StringRepSliceView(m_hvoContext);

            ctrl.Cache = (FdoCache)Mediator.PropertyTable.GetValue("cache");
            ctrl.ResetValidator();

            if (ctrl.RootBox == null)
            {
                ctrl.MakeRoot();
            }
        }