예제 #1
0
파일: Icon.cs 프로젝트: sweenr/odbc2kml
 public Icon(Icon i)
 {
     location = i.getLocation();
     conditions = i.getDeepCopyOfConditions();
     iconId = i.getId();
     isLocal = i.getLocality();
 }
예제 #2
0
 public Icon(Icon i)
 {
     location   = i.getLocation();
     conditions = i.getDeepCopyOfConditions();
     iconId     = i.getId();
     isLocal    = i.getLocality();
 }
예제 #3
0
        /// <summary>
        /// Constructor. Sets the icon, color, and style name.
        /// </summary>
        /// <param name="icon">Icon --> Used for icon location when creating styles in KML</param>
        /// <param name="color">int --> Overlay color for KML</param>
        /// <param name="styleName">String --> unique style name</param>
        public Style(Icon icon, UInt64 color, String styleName)
        {
            this.icon = new Icon();
            this.icon.setId(icon.getId());
            this.icon.setLocality(icon.getLocality());
            this.icon.setLocation(icon.getLocation());

            foreach (Condition c in icon.getConditions())
            {
                this.icon.setConditions(c);
            }

            this.color     = color;
            this.styleName = styleName;
        }
예제 #4
0
파일: Style.cs 프로젝트: sweenr/odbc2kml
        /// <summary>
        /// Constructor. Sets the icon, color, and style name. 
        /// </summary>
        /// <param name="icon">Icon --> Used for icon location when creating styles in KML</param>
        /// <param name="color">int --> Overlay color for KML</param>
        /// <param name="styleName">String --> unique style name</param>
        public Style(Icon icon, UInt64 color, String styleName)
        {
            this.icon = new Icon();
            this.icon.setId(icon.getId());
            this.icon.setLocality(icon.getLocality());
            this.icon.setLocation(icon.getLocation());

            foreach (Condition c in icon.getConditions())
            {
                this.icon.setConditions(c);
            }

            this.color = color;
            this.styleName = styleName;
        }
예제 #5
0
        //Removes an icon assocaiated with a connection and all conditions associated with it
        protected void removeIconFromConnFunct(object sender, EventArgs e)
        {
            ImageButton sendBtn = (ImageButton)sender;
            String args = sendBtn.CommandArgument.ToString();

            Icon icn = new Icon();
            Icon iconSaved = new Icon();
            icn.setId(args);

            foreach (Icon icon in iconList)
            {
                if (icon.getId().Equals(icn.getId()))
                {
                    iconList.Remove(icon);
                    break;
                }
            }
            foreach (Icon icon in conn.icons)
            {
                if (icon.getId().Equals(icn.getId()))
                {
                    conn.icons.Remove(icon);
                    break;
                }
            }
            try
            {
                foreach (Icon icon in iconListAvailableToRemove)
                {

                    if (icon.getId().Equals(icn.getId()))
                    {
                        iconSaved.setId(icon.getId());
                        iconSaved.setLocation(icon.getLocation());
                        iconListAvailableToRemove.Remove(icon);
                        int j = 0;
                        foreach (Icon icon2 in iconListAvailableToAdd)
                        {
                            if (System.Convert.ToInt32(iconSaved.getId()) < System.Convert.ToInt32(icon2.getId()))
                            {
                                iconListAvailableToAdd.Insert(j, iconSaved);
                                break;
                            }
                            j += 1;
                            if (j == iconListAvailableToAdd.Count)
                            {
                                iconListAvailableToAdd.Add(iconSaved);
                                break;
                            }
                        }
                        this.fillIconLibraryPopup();
                        this.fillIconLibraryPopupRemove();
                        this.genIconConditionTable(sender, e);
                        break;
                    }
                }
            }
            catch (ODBC2KMLException ex)
            {
                ErrorHandler eh = new ErrorHandler(ex.errorText, errorPanel1);
                eh.displayError();
                return;
            }
            sessionSave();
        }