예제 #1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            object newObject = value;

            IWindowsFormsEditorService svc = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));

            m_world = context.Instance as WorldAdapter;

            if (svc != null)
            {
                ContinentSizeScroll ctrl = new ContinentSizeScroll();
                ctrl.World = m_world;
                ctrl.Value = int.Parse(value.ToString());

                svc.DropDownControl(ctrl);

                newObject = ctrl.Value;
            }

            return newObject;
        }
예제 #2
0
        private void tvwWorld_AfterSelect(object sender, TreeViewEventArgs e)
        {
            if (e.Node.Tag != null)
            {
                VectorID id = e.Node.Tag as VectorID;

                if (Azmyth.Assets.Assets.Store[id] is World)
                {
                    WorldAdapter adp = new WorldAdapter(gridProperties, (World)Azmyth.Assets.Assets.Store[id]);
                    adp.Map = tabMain.TabPages[tabMain.TabPages.IndexOfKey(adp.WorldID.ToString())].Controls["av" + adp.WorldID.ID] as MapViewer;
                    gridProperties.SelectedObject = adp;

                }
                else
                    gridProperties.SelectedObject = Azmyth.Assets.Assets.Store[id];
            }
        }