Esempio n. 1
0
        private void OpenEditor()
        {
            KVFile kvFile = contextRegistry.ActiveContext.As <KVFile>();

            if (kvFile != null)
            {
                //Open the file in a Key-Value editor
                kvEditor.OpenKVDocument(kvFile);
                return;
            }

            TextFile textFile = contextRegistry.ActiveContext.As <TextFile>();

            if (textFile != null)
            {
                //Open the file in a Text Editor

                textEditor.OpenDocument(textFile);
            }
        }