Пример #1
0
        private void GetValues(ArchivableDictionary dictionary)
        {
            if (null == dictionary)
            {
                return;
            }

            RhinoApp.WriteLine(dictionary.Name);

            int integer_value;

            if (dictionary.TryGetInteger(INTEGER_VALUE, out integer_value))
            {
                m_integer_value = integer_value;
                RhinoApp.WriteLine("  Integer = {0}", m_integer_value);
            }
            else
            {
                RhinoApp.WriteLine("  Integer = <none>");
            }

            double double_value;

            if (dictionary.TryGetDouble(DOUBLE_VALUE, out double_value))
            {
                m_double_value = double_value;
                RhinoApp.WriteLine("  Double = {0}", m_double_value);
            }
            else
            {
                RhinoApp.WriteLine("  Double = <none>");
            }
        }
 /// <summary>
 /// Command.EndCommand event handler
 /// </summary>
 private void OnEndCommand(object sender, CommandEventArgs e)
 {
     if (CommandTrackingEnabled && e.CommandResult == Result.Success)
     {
         string key = e.CommandEnglishName;
         m_dictionary.TryGetInteger(key, out int value);
         m_dictionary.Set(key, ++value);
     }
 }