Author Topic: Layer Manager  (Read 2276 times)

0 Members and 1 Guest are viewing this topic.

Jeff H

  • Needs a day job
  • Posts: 6151
Layer Manager
« on: August 26, 2010, 02:56:21 PM »
I am messing around with a layer manager
I am using a Listview Control and it basiclly pulls all the layer properties from exteranl drawings and fills it
Using the FocusedText property in the double Click event I grab the name and import the Layer and set it to current and if anything is currently selected it change Its layer

It also changes or creates layer for existing or demo by adding -E or -D to the end and changing its color to what you specify in the context menu.
And will handle showing new demo and existing states.

I am trying to work how to show the color visually I can make 255 png 16X16 of each color and tie it to color number
I thought about a Datagridview but I lose the abiltly of grouping, tile view, list view, detail view, and all of the different views.
Any ideas on how to show the color


LE3

  • Guest
Re: Layer Manager
« Reply #1 on: August 26, 2010, 09:59:00 PM »
Something like this:  :roll:

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Layer Manager
« Reply #2 on: August 26, 2010, 10:22:56 PM »
Perhaps Try something like
Quote
           string[] s = { "Colum1_Data", "Column2_Data" };
            ListViewItem lvi = new ListViewItem(s);

            myListView.Items.Add(lvi);

                 // Important

            myListView.Items[0].UseItemStyleForSubItems = false;

                //  Change the Particular Cell Property of Style

           myListView.Items[0].SubItems[1].BackColor = Color.Red;

kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff H

  • Needs a day job
  • Posts: 6151
Re: Layer Manager
« Reply #4 on: August 27, 2010, 12:46:00 AM »
Thanks alot Kerry


Kerry

  • Mesozoic relic
  • Seagull
  • Posts: 11654
  • class keyThumper<T>:ILazy<T>
Re: Layer Manager
« Reply #5 on: August 27, 2010, 12:50:52 AM »

You're most welcome.
kdub, kdub_nz in other timelines.
Perfection is not optional.
Everything will work just as you expect it to, unless your expectations are incorrect.
Discipline: None at all.

Jeff H

  • Needs a day job
  • Posts: 6151
Re: Layer Manager
« Reply #6 on: August 27, 2010, 07:57:09 AM »
One more Question
It just fills the list view with the properties of the Layer, once you double click it  if the current database does  not contain the Layer it grabs it from an external drawing

The little I have messed around with it I have not noticed any performace issues
Would it better to bring all the Layers in and purge them later or will this method not cause much performance difference