Ejemplo n.º 1
0
        private void lb_mvnames_SelectedIndexChanged(object sender, EventArgs e)
        {
            String       t  = lb_mvtypes.SelectedItem.ToString();
            PythonReader pr = null;

            if (t == "common")
            {
                pr = StaticDataHolder.Header_Common;
            }
            else if (t == "operations")
            {
                pr = StaticDataHolder.Header_Operations;
            }
            else if (t == "triggers")
            {
                pr = StaticDataHolder.Header_Triggers;
            }
            String v = lb_mvnames.SelectedItem.ToString();

            for (int j = 0; j < pr.PythonItems.Length; ++j)
            {
                if (pr.Items[j].Name == v)
                {
                    lv_mvvals.Items.Clear();
                    lv_mvvals.Items.Add("Name").SubItems.Add(pr.PythonItems[j].Name);
                    lv_mvvals.Items.Add("Value").SubItems.Add(pr.PythonItems[j].Value.ToString());
                    lv_mvvals.Items.Add("Source").SubItems.Add(String.Format("\"{0}\"", pr.PythonItems[j].Source));
                }
            }
            splitContainer7.SplitterDistance = 50;
        }
Ejemplo n.º 2
0
        private void lb_mvtypes_SelectedIndexChanged(object sender, EventArgs e)
        {
            String       t  = lb_mvtypes.SelectedItem.ToString();
            PythonReader pr = null;

            if (t == "common")
            {
                pr = StaticDataHolder.Header_Common;
            }
            else if (t == "operations")
            {
                pr = StaticDataHolder.Header_Operations;
            }
            else if (t == "triggers")
            {
                pr = StaticDataHolder.Header_Triggers;
            }
            lb_mvnames.Items.Clear();
            SortedList <String, byte> tempsort = new SortedList <string, byte>();

            for (int j = 0; j < pr.Items.Length; ++j)
            {
                if (tempsort.ContainsKey(pr.Items[j].Name))
                {
                    for (int k = 0; k < 100; ++k)
                    {
                        if (!tempsort.ContainsKey(pr.Items[j].Name + "(" + k.ToString() + ")"))
                        {
                            tempsort.Add(pr.Items[j].Name + "(" + k.ToString() + ")", 0);
                            k = 100;
                        }
                    }
                }
                else
                {
                    tempsort.Add(pr.Items[j].Name, 0);
                }
            }
            foreach (KeyValuePair <String, byte> kvp in tempsort)
            {
                lb_mvnames.Items.Add(kvp.Key);
            }
        }
Ejemplo n.º 3
0
 internal static void ReadHeaderTriggers()
 {
     Header_Triggers = new PythonReader(null, Config.GetSetting("filelocation_pydir") + "header_triggers.py");
     Header_Triggers.Read();
 }
Ejemplo n.º 4
0
 internal static void ReadHeaderOperations()
 {
     Header_Operations = new PythonReader(null, Config.GetSetting("filelocation_pydir") + "header_operations.py");
     Header_Operations.Read();
 }
Ejemplo n.º 5
0
 internal static void ReadHeaderCommon()
 {
     Header_Common = new PythonReader(null, Config.GetSetting("filelocation_pydir") + "header_common.py");
     Header_Common.Read();
 }