Esempio n. 1
0
        public GenericWrapper GetRemoteValue()
        {
            if (CurrentEditor == null)
            {
                throw new InvalidOperationException("Unable to get the value, because there is no current editor.");
            }

            IRemoteEditor remoteEditor = CurrentEditor as IRemoteEditor;

            if (remoteEditor == null)
            {
                throw new InvalidOperationException("Unable to get a remote value, because the current editor"
                                                    + " is not a remote editor.");
            }

            return(remoteEditor.GetRemoteValue());
        }
Esempio n. 2
0
        public void DisplayRemoteValue(GenericWrapper wrapper)
        {
            if (CurrentEditor == null)
            {
                throw new InvalidOperationException("Unable to display the value, because there is no current editor.");
            }

            IRemoteEditor remoteEditor = CurrentEditor as IRemoteEditor;

            if (remoteEditor == null)
            {
                throw new InvalidOperationException("Unable to display a remote value, because the current editor"
                                                    + " is not a remote editor.");
            }

            remoteEditor.DisplayRemoteValue(wrapper);
        }