Esempio n. 1
0
        public static void ViewGlobalDict()
        {
            var dv = new DictionaryViewer(
                CustomDictionary.GetDictionaryNames,
                CustomDictionary.GetEntryNames,
                CustomDictionary.GetValue,
                CustomDictionary.SetValue
                );

            Application.ShowModalWindow(dv);
        }
        private void Dictionaries_Cliked(object sender, RoutedEventArgs e)
        {
            try
            {
                DictionaryViewer dictionary = new DictionaryViewer();

                ControlDialog.Show("Dictionaries", dictionary, string.Empty, showOkButton: false, autoSize: false);
            }
            catch (Exception err)
            {
                ErrorLog.ShowError(err);
            }
        }
Esempio n. 3
0
        public static void ViewObjectDict()
        {
            var id = Interaction.GetEntity("\nSelect entity");

            if (id == ObjectId.Null)
            {
                return;
            }
            var dv = new DictionaryViewer(  // Currying
                () => CustomObjectDictionary.GetDictionaryNames(id),
                dict => CustomObjectDictionary.GetEntryNames(id, dict),
                (dict, key) => CustomObjectDictionary.GetValue(id, dict, key),
                (dict, key, value) => CustomObjectDictionary.SetValue(id, dict, key, value)
                );

            Application.ShowModalWindow(dv);
        }