Beispiel #1
0
 public GEditorScroller(GEditorPanel panel) : base(0, 0)
 {
     this.m_State     = State.Inactive;
     this.m_Panel     = panel;
     base.LargeOffset = 0x15;
     base.WheelOffset = 0x15;
     base.SmallOffset = 7;
 }
Beispiel #2
0
 public GEditorScroller(GEditorPanel panel)
     : base(0, 0)
 {
     this.m_State = State.Inactive;
     this.m_Panel = panel;
     base.LargeOffset = 0x15;
     base.WheelOffset = 0x15;
     base.SmallOffset = 7;
 }
Beispiel #3
0
        public GObjectEditor(object obj) : base(0, 0, 0x13d, 0x188)
        {
            Gumps.Focus   = this;
            this.m_Object = obj;
            base.m_NonRestrictivePicking = true;
            base.Text = "Option Editor";
            PropertyInfo[] properties = obj.GetType().GetProperties();
            Hashtable      c          = new Hashtable();

            for (int i = 0; i < properties.Length; i++)
            {
                PropertyInfo        mi         = properties[i];
                OptionableAttribute optionable = this.GetAttribute(mi, typeof(OptionableAttribute)) as OptionableAttribute;
                if (optionable != null)
                {
                    ArrayList list = (ArrayList)c[optionable.Category];
                    if (list == null)
                    {
                        c[optionable.Category] = list = new ArrayList();
                    }
                    list.Add(new ObjectEditorEntry(mi, obj, optionable, this.GetAttribute(mi, typeof(OptionRangeAttribute)), this.GetAttribute(mi, typeof(OptionHueAttribute))));
                }
            }
            ArrayList list2 = new ArrayList(c);

            list2.Sort(new CategorySorter());
            ArrayList panels = new ArrayList();

            foreach (DictionaryEntry entry in list2)
            {
                string         key     = (string)entry.Key;
                ArrayList      entries = (ArrayList)entry.Value;
                GCategoryPanel panel   = new GCategoryPanel(obj, key, entries);
                panels.Add(panel);
            }
            GEditorPanel toAdd = new GEditorPanel(panels, 360);

            this.m_Panel = toAdd;
            toAdd.X     += 2;
            toAdd.Y     += 3;
            base.Client.m_NonRestrictivePicking = true;
            base.Client.Children.Add(toAdd);
            this.Center();
        }
Beispiel #4
0
 public GObjectEditor(object obj)
     : base(0, 0, 0x13d, 0x188)
 {
     Gumps.Focus = this;
     this.m_Object = obj;
     base.m_NonRestrictivePicking = true;
     base.Text = "Option Editor";
     PropertyInfo[] properties = obj.GetType().GetProperties();
     Hashtable c = new Hashtable();
     for (int i = 0; i < properties.Length; i++)
     {
         PropertyInfo mi = properties[i];
         OptionableAttribute optionable = this.GetAttribute(mi, typeof(OptionableAttribute)) as OptionableAttribute;
         if (optionable != null)
         {
             ArrayList list = (ArrayList) c[optionable.Category];
             if (list == null)
             {
                 c[optionable.Category] = list = new ArrayList();
             }
             list.Add(new ObjectEditorEntry(mi, obj, optionable, this.GetAttribute(mi, typeof(OptionRangeAttribute)), this.GetAttribute(mi, typeof(OptionHueAttribute))));
         }
     }
     ArrayList list2 = new ArrayList(c);
     list2.Sort(new CategorySorter());
     ArrayList panels = new ArrayList();
     foreach (DictionaryEntry entry in list2)
     {
         string key = (string) entry.Key;
         ArrayList entries = (ArrayList) entry.Value;
         GCategoryPanel panel = new GCategoryPanel(obj, key, entries);
         panels.Add(panel);
     }
     GEditorPanel toAdd = new GEditorPanel(panels, 360);
     this.m_Panel = toAdd;
     toAdd.X += 2;
     toAdd.Y += 3;
     base.Client.m_NonRestrictivePicking = true;
     base.Client.Children.Add(toAdd);
     this.Center();
 }