コード例 #1
0
ファイル: EditorDialog.cs プロジェクト: formist/LinkMe
        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());
        }
コード例 #2
0
ファイル: EditorDialog.cs プロジェクト: formist/LinkMe
        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);
        }