public override void SaveToXml(System.Xml.XmlElement xmlEl , System.Xml.XmlDocument doc)
 {
     base.SaveToXml(xmlEl, doc);
     xmlEl.SetAttribute("T" , TypeString);
     xmlEl.SetAttribute("GE", this.GrOrEq);
     xmlEl.SetAttribute("LE", this.LessOrEq);
 }
Ejemplo n.º 2
0
 public override void SetAttributes(System.Xml.XmlElement Element)
 {
     Element.SetAttribute("type", ScriptConsts.TYPE_SAVE);
     Element.SetAttribute("file", FileName);
     Element.SetAttribute("encoding", DefaulEncoding);
     Element.SetAttribute("append", Append.ToString());
     Element.SetAttribute("ascending", ChildrenFlow.ToString());
     Element.SetAttribute("break", BreakFlow.ToString());
 }
Ejemplo n.º 3
0
        private static string CheckForId(Heading parent, System.Xml.XmlElement element)
        {
            string id = element.GetAttribute("id");
              if (id == null || id.Length == 0)
              {
            StringBuilder builder = new StringBuilder();
            foreach (char c in element.InnerText)
            {
              if (char.IsLetterOrDigit(c))
            builder.Append(c);
              else if (char.IsWhiteSpace(c))
              {
            //don't consider whitespace
              }
              else
            builder.Append('_');

              if (builder.Length >= 100)
            break;
            }

            id = builder.ToString();

            //Add the parent id
            if (parent.IsRoot() == false)
              id = parent.Id + "_" + id;

            element.SetAttribute("id", id);
              }

              return id;
        }
Ejemplo n.º 4
0
 CreateAttribute(
     string name,
     string value,
     System.Xml.XmlElement parent)
 {
     parent.SetAttribute(name, value);
 }
Ejemplo n.º 5
0
		internal void SaveUserData(System.Xml.XmlElement node)
		{
			node.SetAttribute("showMessages", this.buttonMessages.Checked.ToString(CultureInfo.InvariantCulture));
			node.SetAttribute("showWarnings", this.buttonWarnings.Checked.ToString(CultureInfo.InvariantCulture));
			node.SetAttribute("showErrors", this.buttonErrors.Checked.ToString(CultureInfo.InvariantCulture));
			node.SetAttribute("showCore", this.buttonCore.Checked.ToString(CultureInfo.InvariantCulture));
			node.SetAttribute("showEditor", this.buttonEditor.Checked.ToString(CultureInfo.InvariantCulture));
			node.SetAttribute("showGame", this.buttonGame.Checked.ToString(CultureInfo.InvariantCulture));
			node.SetAttribute("autoClear", this.checkAutoClear.Checked.ToString(CultureInfo.InvariantCulture));
			node.SetAttribute("pauseOnError", this.buttonPauseOnError.Checked.ToString(CultureInfo.InvariantCulture));
		}
Ejemplo n.º 6
0
        internal void SaveToXml(System.Xml.XmlElement xmlEl, System.Xml.XmlDocument doc)
        {
            xmlEl.SetAttribute("UN" , this.UniqueName);

            foreach(DataMember dmem in this.DataMembers) //members
            {
                System.Xml.XmlElement childEl=doc.CreateElement("M");
                dmem.SaveToXml(childEl , doc);
                xmlEl.AppendChild(childEl);
            }

            foreach(DataMember cmem in this.CalculatedMembers) //calc mems
            {
                System.Xml.XmlElement childEl=doc.CreateElement("M");
                cmem.SaveToXml(childEl , doc);
                xmlEl.AppendChild(childEl);
            }

            if(this._orderTupleMember!=null) // order tuple member
            {
                System.Xml.XmlElement childEl=doc.CreateElement("OTM");
                childEl.SetAttribute("UN" , this._orderTupleMember);
                xmlEl.AppendChild(childEl);
            }
        }
Ejemplo n.º 7
0
 public override void SetAttributes(System.Xml.XmlElement Element)
 {
     Element.SetAttribute("type", ScriptConsts.TYPE_GET_VAR);
 }
 public void Save(System.Xml.XmlElement element, XmlTestStoreParameters parameters)
 {
     if (!string.IsNullOrEmpty(this.RegistryHive))
     {
         element.SetAttribute(RegistryHiveAttributeName, this.RegistryHive);
     }
     if (!string.IsNullOrEmpty(this.AdditionalCommandLineArguments))
     {
         element.SetAttribute(AdditionalCommandLineArgumentsAttributeName, this.AdditionalCommandLineArguments);
     }
     if (!string.IsNullOrEmpty(this.AdditionalTestData))
     {
         element.SetAttribute(AdditionalTestDataAttributeName, this.AdditionalTestData);
     }
 }
Ejemplo n.º 9
0
        internal void Serialize(System.Xml.XmlElement xmlThisBar, bool bPropertiesOnly)
        {
            // Creates serialization context
            ItemSerializationContext context = new ItemSerializationContext();
            context.Serializer = this;
            context.HasDeserializeItemHandlers = ((ICustomSerialization)this).HasDeserializeItemHandlers;
            context.HasSerializeItemHandlers = ((ICustomSerialization)this).HasSerializeItemHandlers;

            xmlThisBar.SetAttribute("name", this.Name);
            xmlThisBar.SetAttribute("candockleft", System.Xml.XmlConvert.ToString(m_CanDockLeft));
            xmlThisBar.SetAttribute("candockright", System.Xml.XmlConvert.ToString(m_CanDockRight));
            xmlThisBar.SetAttribute("candocktop", System.Xml.XmlConvert.ToString(m_CanDockTop));
            xmlThisBar.SetAttribute("candockbottom", System.Xml.XmlConvert.ToString(m_CanDockBottom));
            xmlThisBar.SetAttribute("candockdoc", System.Xml.XmlConvert.ToString(m_CanDockDocument));
            xmlThisBar.SetAttribute("candocktab", System.Xml.XmlConvert.ToString(m_CanDockTab));
            xmlThisBar.SetAttribute("text", this.Text);
            xmlThisBar.SetAttribute("dockline", System.Xml.XmlConvert.ToString(m_DockLine));
            if (/*m_DockOffset==0 && this.Left>0 && */ (this.DockSide == eDockSide.Top || this.DockSide == eDockSide.Bottom))
                xmlThisBar.SetAttribute("dockoffset", System.Xml.XmlConvert.ToString(this.Left));
            else if (/*m_DockOffset==0 && this.Top>0 &&*/ (this.DockSide == eDockSide.Left || this.DockSide == eDockSide.Right))
                xmlThisBar.SetAttribute("dockoffset", System.Xml.XmlConvert.ToString(this.Top));
            //else
            //    xmlThisBar.SetAttribute("dockoffset",System.Xml.XmlConvert.ToString(m_DockOffset));
            xmlThisBar.SetAttribute("grabhandle", System.Xml.XmlConvert.ToString((int)m_GrabHandleStyle));
            xmlThisBar.SetAttribute("menubar", System.Xml.XmlConvert.ToString(m_MenuBar));
            xmlThisBar.SetAttribute("stretch", System.Xml.XmlConvert.ToString(m_DockStretch));
            xmlThisBar.SetAttribute("style", System.Xml.XmlConvert.ToString((int)m_ItemContainer.Style));
            xmlThisBar.SetAttribute("wrapdock", System.Xml.XmlConvert.ToString(m_WrapItemsDock));
            xmlThisBar.SetAttribute("wrapfloat", System.Xml.XmlConvert.ToString(m_WrapItemsFloat));
            if (m_LockDockPosition)
                xmlThisBar.SetAttribute("lockdockpos", System.Xml.XmlConvert.ToString(m_LockDockPosition));
            if (!m_CanUndock)
                xmlThisBar.SetAttribute("canundock", System.Xml.XmlConvert.ToString(m_CanUndock));
            if (m_TabNavigation)
                xmlThisBar.SetAttribute("tabnav", System.Xml.XmlConvert.ToString(m_TabNavigation));

            if (!m_ShowToolTips)
                xmlThisBar.SetAttribute("tooltips", System.Xml.XmlConvert.ToString(m_ShowToolTips));

            if (m_ItemContainer.MoreItemsOnMenu)
                xmlThisBar.SetAttribute("overflowmenu", System.Xml.XmlConvert.ToString(m_ItemContainer.MoreItemsOnMenu));

            if (m_AutoHideState)
            {
                xmlThisBar.SetAttribute("state", System.Xml.XmlConvert.ToString((int)eBarState.Docked));
                eDockSide dockside = eDockSide.None;
                switch (m_LastDockSiteInfo.DockSide)
                {
                    case DockStyle.Left:
                        dockside = eDockSide.Left;
                        break;
                    case DockStyle.Right:
                        dockside = eDockSide.Right;
                        break;
                    case DockStyle.Top:
                        dockside = eDockSide.Top;
                        break;
                    case DockStyle.Bottom:
                        dockside = eDockSide.Bottom;
                        break;
                }
                xmlThisBar.SetAttribute("dockside", System.Xml.XmlConvert.ToString((int)dockside));
            }
            else
            {
                xmlThisBar.SetAttribute("state", System.Xml.XmlConvert.ToString((int)m_BarState));
                xmlThisBar.SetAttribute("dockside", System.Xml.XmlConvert.ToString((int)this.DockSide));
                if (this.DockSide == eDockSide.None && m_Float != null)
                    xmlThisBar.SetAttribute("fpos", m_Float.Location.X + "," + m_Float.Location.Y + "," + this.DisplayRectangle.Width + "," + this.DisplayRectangle.Height);
            }

            IOwnerBarSupport ownersupport = m_Owner as IOwnerBarSupport;
            if (m_BarState == eBarState.Floating && !this.Visible && ownersupport != null && ownersupport.WereVisible.Count > 0 && ownersupport.WereVisible.Contains(this))
                xmlThisBar.SetAttribute("visible", System.Xml.XmlConvert.ToString(true));
            else
            {
                if (m_AutoHideState)
                {
                    xmlThisBar.SetAttribute("visible", System.Xml.XmlConvert.ToString(true));
                    xmlThisBar.SetAttribute("autohide", System.Xml.XmlConvert.ToString(true));
                }
                else
                    xmlThisBar.SetAttribute("visible", System.Xml.XmlConvert.ToString(this.Visible));
            }
            xmlThisBar.SetAttribute("custom", System.Xml.XmlConvert.ToString(m_CustomBar));
            xmlThisBar.SetAttribute("canhide", System.Xml.XmlConvert.ToString(m_CanHide));
            xmlThisBar.SetAttribute("imagesize", System.Xml.XmlConvert.ToString((int)m_ImageSize));
            xmlThisBar.SetAttribute("itemsp", System.Xml.XmlConvert.ToString(m_ItemContainer.ItemSpacing));

            xmlThisBar.SetAttribute("themes", System.Xml.XmlConvert.ToString(m_ThemeAware));

            if (!m_ItemContainer.CanCustomize)
                xmlThisBar.SetAttribute("cancust", System.Xml.XmlConvert.ToString(m_ItemContainer.CanCustomize));

            // Save Font information if needed
            if (this.Font != null)
            {
                if (m_CustomFont)
                {
                    xmlThisBar.SetAttribute("fontname", this.Font.Name);
                    xmlThisBar.SetAttribute("fontemsize", System.Xml.XmlConvert.ToString(this.Font.Size));
                    xmlThisBar.SetAttribute("fontstyle", System.Xml.XmlConvert.ToString((int)this.Font.Style));
                }
            }

            if (!m_ItemContainer.m_BackgroundColor.IsEmpty)
                xmlThisBar.SetAttribute("backcolor", BarFunctions.ColorToString(m_ItemContainer.BackColor));
            xmlThisBar.SetAttribute("layout", System.Xml.XmlConvert.ToString((int)m_ItemContainer.LayoutType));
            xmlThisBar.SetAttribute("eqbutton", System.Xml.XmlConvert.ToString(m_ItemContainer.EqualButtonSize));
            if (m_DockedBorder != eBorderType.None)
                xmlThisBar.SetAttribute("dborder", System.Xml.XmlConvert.ToString((int)m_DockedBorder));

            if (!m_AcceptDropItems)
                xmlThisBar.SetAttribute("acceptdrop", System.Xml.XmlConvert.ToString(m_AcceptDropItems));

            if (m_SingleLineColor != SystemColors.ControlDark)
                xmlThisBar.SetAttribute("slcolor", BarFunctions.ColorToString(m_SingleLineColor));

            if (!m_CaptionBackColor.IsEmpty)
                xmlThisBar.SetAttribute("captionbc", BarFunctions.ColorToString(m_CaptionBackColor));
            if (!m_CaptionForeColor.IsEmpty)
                xmlThisBar.SetAttribute("captionfc", BarFunctions.ColorToString(m_CaptionForeColor));

            if (m_AlwaysDisplayDockTab)
                xmlThisBar.SetAttribute("showtab", System.Xml.XmlConvert.ToString(m_AlwaysDisplayDockTab));

            if (this.AutoHide)
            {
                if (m_ItemContainer.MinWidth != 0)
                    xmlThisBar.SetAttribute("dockwidth", System.Xml.XmlConvert.ToString(m_ItemContainer.MinWidth));
                else if (m_LastDockSiteInfo.DockedWidth != 0)
                    xmlThisBar.SetAttribute("dockwidth", System.Xml.XmlConvert.ToString(m_LastDockSiteInfo.DockedWidth));
                if (m_ItemContainer.MinHeight != 0)
                    xmlThisBar.SetAttribute("dockheight", System.Xml.XmlConvert.ToString(m_ItemContainer.MinHeight));
                else if (m_LastDockSiteInfo.DockedHeight != 0)
                    xmlThisBar.SetAttribute("dockheight", System.Xml.XmlConvert.ToString(m_LastDockSiteInfo.DockedHeight));
            }
            else
            {
                if (m_ItemContainer.MinWidth != 0 && this.CanSaveMinWidth)
                    xmlThisBar.SetAttribute("dockwidth", System.Xml.XmlConvert.ToString(m_ItemContainer.MinWidth));
                if (m_ItemContainer.MinHeight != 0 && this.CanSaveMinHeight)
                    xmlThisBar.SetAttribute("dockheight", System.Xml.XmlConvert.ToString(m_ItemContainer.MinHeight));
            }

            if (m_SplitDockWidthPercent > 0)
                xmlThisBar.SetAttribute("splitwidthpercent", System.Xml.XmlConvert.ToString(m_SplitDockWidthPercent));
            if (m_SplitDockHeightPercent > 0)
                xmlThisBar.SetAttribute("splitheightpercent", System.Xml.XmlConvert.ToString(m_SplitDockHeightPercent));


            if (m_ItemContainer.PaddingBottom != 1)
                xmlThisBar.SetAttribute("padbottom", System.Xml.XmlConvert.ToString(m_ItemContainer.PaddingBottom));
            if (m_ItemContainer.PaddingLeft != 1)
                xmlThisBar.SetAttribute("padleft", System.Xml.XmlConvert.ToString(m_ItemContainer.PaddingLeft));
            if (m_ItemContainer.PaddingRight != 1)
                xmlThisBar.SetAttribute("padright", System.Xml.XmlConvert.ToString(m_ItemContainer.PaddingRight));
            if (m_ItemContainer.PaddingTop != 1)
                xmlThisBar.SetAttribute("padtop", System.Xml.XmlConvert.ToString(m_ItemContainer.PaddingTop));

            if (m_ItemContainer.LayoutType == eLayoutType.DockContainer && this.SelectedDockTab >= 0)
                xmlThisBar.SetAttribute("seldocktab", System.Xml.XmlConvert.ToString(this.SelectedDockTab));

            if (!m_CanAutoHide)
                xmlThisBar.SetAttribute("canautohide", System.Xml.XmlConvert.ToString(m_CanAutoHide));
            if (!m_CanReorderTabs)
                xmlThisBar.SetAttribute("canreordertabs", System.Xml.XmlConvert.ToString(m_CanReorderTabs));
            if (!m_CanTearOffTabs)
                xmlThisBar.SetAttribute("cantearoff", System.Xml.XmlConvert.ToString(m_CanTearOffTabs));

            // TODO: Menu Merge Implementation
            //if(m_MergeEnabled)
            //	xmlThisBar.SetAttribute("merge",System.Xml.XmlConvert.ToString(m_MergeEnabled));

            if (!m_HideFloatingInactive)
                xmlThisBar.SetAttribute("hidein", System.Xml.XmlConvert.ToString(m_HideFloatingInactive));

            if (m_DockTabAlignment != eTabStripAlignment.Bottom)
                xmlThisBar.SetAttribute("tabalign", System.Xml.XmlConvert.ToString((int)m_DockTabAlignment));

            if (m_AutoHideAnimationTime != 100)
                xmlThisBar.SetAttribute("ahanim", System.Xml.XmlConvert.ToString(m_AutoHideAnimationTime));

            if (!m_AutoCreateCaptionMenu)
                xmlThisBar.SetAttribute("autocaptionmenu", System.Xml.XmlConvert.ToString(m_AutoCreateCaptionMenu));

            if (m_AutoSyncBarCaption)
                xmlThisBar.SetAttribute("autocaptionsync", System.Xml.XmlConvert.ToString(m_AutoSyncBarCaption));

            if (!m_SaveLayoutChanges)
                xmlThisBar.SetAttribute("savelayout", System.Xml.XmlConvert.ToString(m_SaveLayoutChanges));

            if (m_ColorScheme.SchemeChanged)
            {
                System.Xml.XmlElement xmlScheme = xmlThisBar.OwnerDocument.CreateElement("colorscheme");
                m_ColorScheme.Serialize(xmlScheme);
                xmlThisBar.AppendChild(xmlScheme);
            }

            if (this.BackgroundImage != null)
            {
                System.Xml.XmlElement elementImage = xmlThisBar.OwnerDocument.CreateElement("backimage");
                xmlThisBar.AppendChild(elementImage);
                BarFunctions.SerializeImage(this.BackgroundImage, elementImage);
                elementImage.SetAttribute("pos", ((int)m_BackgroundImagePosition).ToString());
                elementImage.SetAttribute("alpha", m_BackgroundImageAlpha.ToString());
            }

            if (!bPropertiesOnly)
            {
                System.Xml.XmlElement xmlItems = xmlThisBar.OwnerDocument.CreateElement("items");
                xmlThisBar.AppendChild(xmlItems);
                foreach (BaseItem objItem in m_ItemContainer.SubItems)
                {
                    if (objItem.ShouldSerialize)
                    {
                        System.Xml.XmlElement xmlItem = xmlThisBar.OwnerDocument.CreateElement("item");
                        xmlItems.AppendChild(xmlItem);
                        context.ItemXmlElement = xmlItem;
                        objItem.Serialize(context);
                    }
                }
            }
        }
        protected override void SaveToXml(System.Xml.XmlDocument doc, System.Xml.XmlElement el)
        {
            base.SaveToXml(doc, el);

            el.SetAttribute("MAXCNT" , this.MaxKeyCount.ToString());

            foreach(string key in this._keyList)
            {
                System.Xml.XmlElement childEl=doc.CreateElement("KEY");
                childEl.Value=key;
                el.AppendChild(childEl);
            }
        }
Ejemplo n.º 11
0
 public override void WriteXml(System.Xml.XmlElement element)
 {
     base.WriteXml(element);
     element.SetAttribute("useSocialLogin", this.UseSocialLogin);
     element.SetAttribute("address", this.Address);
     if (this.UseSocialLogin)
     {
         element.SetAttribute("janrainAppName", JanrainAppName);
         element.SetAttribute("userId", JabbRApplication.Instance.EncryptString(this.Address, this.Id, this.UserId));
     }
     else
     {
         element.SetAttribute("userName", JabbRApplication.Instance.EncryptString(this.Address, this.Id + "-user", this.UserName));
         element.SetAttribute("password", JabbRApplication.Instance.EncryptString(this.Address, this.Id + "-pass", this.Password));
     }
 }
Ejemplo n.º 12
0
 protected override void XmlSetAttributes(System.Xml.XmlElement element) {
   base.XmlSetAttributes(element);
   element.SetAttribute("Operation", Op); 
 }
Ejemplo n.º 13
0
 public void WriteXml(System.Xml.XmlElement element)
 {
     element.WriteChildListXml(servers, "server", "servers");
     element.WriteChildListXml(highlights, "highlight", "highlights");
     if (this.BadgeDisplay != BadgeDisplayMode.Highlighted)
         element.SetAttribute("badgeDisplay", this.BadgeDisplay);
     if (this.UseMetroTheme)
         element.SetAttribute("useMetroTheme", this.UseMetroTheme);
 }
        // ---------------------------------------------------------------------------------------------------
        // SetElementAttribute
        //
        // Sets the attributes of the XMLElement with name and type
        //
        // Param xmlDoc: The root XML document
        // Param propertyName: The name of the member
        // Param type: The member type
        // ---------------------------------------------------------------------------------------------------
        private static void SetElementAttribute(System.Xml.XmlElement xmlElement, string propertyName, Type type)
        {
            xmlElement.SetAttribute("name", propertyName);

            string sType = "xs:string";

            switch (type.Name)
            {
                case "Int32":
                case "Int64":
                    sType = "xs:integer";
                    break;
                case "Single":
                    sType = "xs:float";
                    break;
                case "Boolean":
                    sType = "xs:boolean";
                    break;
                case "Byte":
                case "SByte":
                    sType = "xs:byte";
                    break;
                case "Decimal":
                    sType = "xs:decimal";
                    break;
                case "Double":
                    sType = "xs:double";
                    break;
                case "UInt32":
                    sType = "xs:unsignedInt";
                    break;
                case "UInt64":
                    sType = "xs:unsignedLong";
                    break;
                case "Int16":
                    sType = "xs:short";
                    break;
                case "UInt16":
                    sType = "xs:unsignedShort";
                    break;
            }

            xmlElement.SetAttribute("type", sType);
        }
Ejemplo n.º 15
0
 public void WriteXml(System.Xml.XmlElement element)
 {
     element.SetAttribute("split", splitter.Position);
 }
Ejemplo n.º 16
0
        public override void SaveXml(System.Xml.XmlDocument doc, System.Xml.XmlElement element)
        {
            base.SaveXml(doc, element);

            element.SetAttribute("usarSigla", sigla.ToString());
            element.SetAttribute("omitirBrasil", omitirBrasil.ToString());
        }
Ejemplo n.º 17
0
		internal void Serialize(System.Xml.XmlElement xmlThisBar)
		{
            // Creates serialization context
            ItemSerializationContext context = new ItemSerializationContext();
            context.Serializer = this;
            context.HasDeserializeItemHandlers = ((ICustomSerialization)this).HasDeserializeItemHandlers;
            context.HasSerializeItemHandlers = ((ICustomSerialization)this).HasSerializeItemHandlers;

			xmlThisBar.SetAttribute("name",this.Name);
			
			// Save Font information if needed
			if(this.Font!=null)
			{
				if(this.Font.Name!=System.Windows.Forms.SystemInformation.MenuFont.Name || this.Font.Size!=System.Windows.Forms.SystemInformation.MenuFont.Size || this.Font.Style!=System.Windows.Forms.SystemInformation.MenuFont.Style)
				{
					xmlThisBar.SetAttribute("fontname",this.Font.Name);
					xmlThisBar.SetAttribute("fontemsize",System.Xml.XmlConvert.ToString(this.Font.Size));
					xmlThisBar.SetAttribute("fontstyle",System.Xml.XmlConvert.ToString((int)this.Font.Style));
				}
			}

//			if(this.BackColor!=SystemColors.Control)
//				xmlThisBar.SetAttribute("backcolor",BarFunctions.ColorToString(this.BackColor));
//			if(this.ForeColor!=SystemColors.ControlText)
//				xmlThisBar.SetAttribute("forecolor",BarFunctions.ColorToString(this.ForeColor));

			//xmlThisBar.SetAttribute("x",System.Xml.XmlConvert.ToString(this.Location.X));
			//xmlThisBar.SetAttribute("y",System.Xml.XmlConvert.ToString(this.Location.Y));
			xmlThisBar.SetAttribute("width",System.Xml.XmlConvert.ToString(this.Width));
			xmlThisBar.SetAttribute("height",System.Xml.XmlConvert.ToString(this.Height));
			if(!m_AnimationEnabled)
				xmlThisBar.SetAttribute("animate",System.Xml.XmlConvert.ToString(m_AnimationEnabled));
			System.Xml.XmlElement xmlItems=xmlThisBar.OwnerDocument.CreateElement("items");
			xmlThisBar.AppendChild(xmlItems);
			foreach(BaseItem objItem in m_ItemContainer.SubItems)
			{
				if(objItem.ShouldSerialize)
				{
					System.Xml.XmlElement xmlItem=xmlThisBar.OwnerDocument.CreateElement("item");
					xmlItems.AppendChild(xmlItem);
                    context.ItemXmlElement = xmlItem;
					objItem.Serialize(context);
				}
			}

			System.Xml.XmlElement xmlStyle=xmlThisBar.OwnerDocument.CreateElement("backstyle");
			xmlThisBar.AppendChild(xmlStyle);
            SerializeElementStyle(m_BackStyle,xmlStyle);
		}
Ejemplo n.º 18
0
 public virtual void SaveToXml(System.Xml.XmlElement xmlEl, System.Xml.XmlDocument doc)
 {
     xmlEl.SetAttribute("UN" , _uniqueName);
     xmlEl.SetAttribute("N" , _name);
     xmlEl.SetAttribute("CC" , _childCount.ToString());
     xmlEl.SetAttribute("LD" , _levelDepth.ToString());
 }
Ejemplo n.º 19
0
		internal void Serialize(System.Xml.XmlElement styleElement)
		{
			if(!m_BackColor1.IsEmpty)
			{
				if(m_BackColor1.ColorSchemePart==eColorSchemePart.Custom)
				{
					styleElement.SetAttribute("bc1",BarFunctions.ColorToString(m_BackColor1.Color));
					styleElement.SetAttribute("bc1a",m_BackColor1.Alpha.ToString());
				}
				else
					styleElement.SetAttribute("bc1csp",m_BackColor1.ColorSchemePart.ToString());
			}
			if(!m_BackColor2.IsEmpty)
			{
				if(m_BackColor2.ColorSchemePart==eColorSchemePart.Custom)
				{
					styleElement.SetAttribute("bc2",BarFunctions.ColorToString(m_BackColor2.Color));
					styleElement.SetAttribute("bc2a",m_BackColor2.Alpha.ToString());
				}
				else
					styleElement.SetAttribute("bc2csp",m_BackColor2.ColorSchemePart.ToString());
			}
			if(!m_ForeColor.IsEmpty)
			{
				if(m_ForeColor.ColorSchemePart==eColorSchemePart.Custom)
				{
					styleElement.SetAttribute("fc",BarFunctions.ColorToString(m_ForeColor.Color));
					styleElement.SetAttribute("fca",m_ForeColor.Alpha.ToString());
				}
				else
					styleElement.SetAttribute("fccsp",m_ForeColor.ColorSchemePart.ToString());
			}
			if(!m_BorderColor.IsEmpty)
			{
				if(m_BorderColor.ColorSchemePart==eColorSchemePart.Custom)
				{
					styleElement.SetAttribute("borderc",BarFunctions.ColorToString(m_BorderColor.Color));
					styleElement.SetAttribute("borderca",m_BorderColor.Alpha.ToString());
				}
				else
					styleElement.SetAttribute("bordercsp",m_BorderColor.ColorSchemePart.ToString());
			}
			styleElement.SetAttribute("ga",m_GradientAngle.ToString());
			if(m_Font!=null)
			{
				styleElement.SetAttribute("fontname",m_Font.Name);
				styleElement.SetAttribute("fontemsize",System.Xml.XmlConvert.ToString(m_Font.Size));
				styleElement.SetAttribute("fontstyle",System.Xml.XmlConvert.ToString((int)m_Font.Style));
			}
			if(m_BackgroundImage!=null)
			{
				System.Xml.XmlElement elementImage=styleElement.OwnerDocument.CreateElement("backimage");
				styleElement.AppendChild(elementImage);
				BarFunctions.SerializeImage(m_BackgroundImage,elementImage);
				elementImage.SetAttribute("pos",((int)m_BackgroundImagePosition).ToString());
				elementImage.SetAttribute("alpha",m_BackgroundImageAlpha.ToString());
			}
			if(m_WordWrap)
				styleElement.SetAttribute("wordwrap",System.Xml.XmlConvert.ToString(m_WordWrap));
			if(m_Alignment!=StringAlignment.Near)
				styleElement.SetAttribute("align",System.Xml.XmlConvert.ToString((int)m_Alignment));
			if(m_LineAlignment!=StringAlignment.Center)
				styleElement.SetAttribute("valign",System.Xml.XmlConvert.ToString((int)m_LineAlignment));
			if(m_TextTrimming!=StringTrimming.EllipsisCharacter)
				styleElement.SetAttribute("trim",System.Xml.XmlConvert.ToString((int)m_TextTrimming));
            if(m_Border!=eBorderType.None)
				styleElement.SetAttribute("border",System.Xml.XmlConvert.ToString((int)m_Border));
			if(m_BorderWidth!=1)
				styleElement.SetAttribute("borderw",m_BorderWidth.ToString());

			if(m_CornerDiameter!=DEFAULT_CORNER_DIAMETER)
				styleElement.SetAttribute("cornerdiameter",m_CornerDiameter.ToString());
			if(m_CornerType!=eCornerType.Square)
				styleElement.SetAttribute("cornertype",System.Xml.XmlConvert.ToString((int)m_CornerType));
		}
Ejemplo n.º 20
0
        internal void SerializeLayout(System.Xml.XmlElement xmlThisBar)
        {
            if (this.CustomBar)
            {
                this.Serialize(xmlThisBar, true);
            }
            else
            {
                xmlThisBar.SetAttribute("name", this.Name);
                xmlThisBar.SetAttribute("dockline", System.Xml.XmlConvert.ToString(m_DockLine));
                xmlThisBar.SetAttribute("layout", System.Xml.XmlConvert.ToString((int)this.LayoutType));

                if (m_DockOffset == 0 && this.Left > 0 && (this.DockSide == eDockSide.Top || this.DockSide == eDockSide.Bottom))
                    xmlThisBar.SetAttribute("dockoffset", System.Xml.XmlConvert.ToString(this.Left));
                else if (m_DockOffset == 0 && this.Top > 0 && (this.DockSide == eDockSide.Left || this.DockSide == eDockSide.Right))
                    xmlThisBar.SetAttribute("dockoffset", System.Xml.XmlConvert.ToString(this.Top));
                else
                    xmlThisBar.SetAttribute("dockoffset", System.Xml.XmlConvert.ToString(m_DockOffset));

                if (m_AutoHideState)
                {
                    xmlThisBar.SetAttribute("state", System.Xml.XmlConvert.ToString((int)eBarState.Docked));
                    eDockSide dockside = eDockSide.None;
                    switch (m_LastDockSiteInfo.DockSide)
                    {
                        case DockStyle.Left:
                            dockside = eDockSide.Left;
                            break;
                        case DockStyle.Right:
                            dockside = eDockSide.Right;
                            break;
                        case DockStyle.Top:
                            dockside = eDockSide.Top;
                            break;
                        case DockStyle.Bottom:
                            dockside = eDockSide.Bottom;
                            break;
                    }
                    xmlThisBar.SetAttribute("dockside", System.Xml.XmlConvert.ToString((int)dockside));
                }
                else
                {
                    xmlThisBar.SetAttribute("state", System.Xml.XmlConvert.ToString((int)m_BarState));
                    xmlThisBar.SetAttribute("dockside", System.Xml.XmlConvert.ToString((int)this.DockSide));
                    if (this.DockSide == eDockSide.None && m_Float != null)
                        xmlThisBar.SetAttribute("fpos", m_Float.Location.X + "," + m_Float.Location.Y + "," + this.DisplayRectangle.Width + "," + this.DisplayRectangle.Height);
                    else if (!m_FloatingRect.IsEmpty)
                        xmlThisBar.SetAttribute("fpos", m_FloatingRect.X + "," + m_FloatingRect.Y + "," + m_FloatingRect.Width + "," + m_FloatingRect.Height);
                }

                IOwnerBarSupport ownersupport = m_Owner as IOwnerBarSupport;
                if (m_BarState == eBarState.Floating && !this.Visible && ownersupport != null && ownersupport.WereVisible.Count > 0 && ownersupport.WereVisible.Contains(this))
                    xmlThisBar.SetAttribute("visible", System.Xml.XmlConvert.ToString(true));
                else
                {
                    if (m_AutoHideState)
                    {
                        xmlThisBar.SetAttribute("visible", System.Xml.XmlConvert.ToString(true));
                        xmlThisBar.SetAttribute("autohide", System.Xml.XmlConvert.ToString(true));
                    }
                    else
                        xmlThisBar.SetAttribute("visible", System.Xml.XmlConvert.ToString(this.Visible));
                }

                if (m_ItemContainer.MinWidth != 0)
                    xmlThisBar.SetAttribute("dockwidth", System.Xml.XmlConvert.ToString(m_ItemContainer.MinWidth));
                if (m_ItemContainer.MinHeight != 0)
                    xmlThisBar.SetAttribute("dockheight", System.Xml.XmlConvert.ToString(m_ItemContainer.MinHeight));
                if (m_SplitDockWidthPercent > 0)
                    xmlThisBar.SetAttribute("splitwidthpercent", System.Xml.XmlConvert.ToString(m_SplitDockWidthPercent));
                if (m_SplitDockHeightPercent > 0)
                    xmlThisBar.SetAttribute("splitheightpercent", System.Xml.XmlConvert.ToString(m_SplitDockHeightPercent));

                if (m_ItemContainer.LayoutType == eLayoutType.DockContainer && this.SelectedDockTab >= 0)
                    xmlThisBar.SetAttribute("seldocktab", System.Xml.XmlConvert.ToString(this.SelectedDockTab));
            }

            System.Xml.XmlElement xmlItems = xmlThisBar.OwnerDocument.CreateElement("items");

            foreach (BaseItem item in m_ItemContainer.SubItems)
            {
                if (item.OriginalBarName != "" || item.OriginalPosition >= 0 || item.UserCustomized || this.CustomBar || m_TabsRearranged || this.LayoutType == eLayoutType.DockContainer)
                {
                    System.Xml.XmlElement xmlItem = xmlThisBar.OwnerDocument.CreateElement("item");
                    xmlItem.SetAttribute("name", item.Name);
                    xmlItem.SetAttribute("origBar", item.OriginalBarName);
                    xmlItem.SetAttribute("origPos", System.Xml.XmlConvert.ToString(item.OriginalPosition));
                    xmlItem.SetAttribute("pos", System.Xml.XmlConvert.ToString(m_ItemContainer.SubItems.IndexOf(item)));
                    if (!item.Visible)
                        xmlItem.SetAttribute("visible", System.Xml.XmlConvert.ToString(item.Visible));
                    xmlItems.AppendChild(xmlItem);
                }
            }

            if (xmlItems.ChildNodes.Count > 0)
                xmlThisBar.AppendChild(xmlItems);
        }
 public override void SaveToXml(System.Xml.XmlElement xmlEl , System.Xml.XmlDocument doc)
 {
     base.SaveToXml(xmlEl, doc);
     xmlEl.SetAttribute("T" , TypeString);
     xmlEl.SetAttribute("F" , this.Aggregation.ToString());
 }
Ejemplo n.º 22
0
        /// <summary>
        /// Save the current contents of these controls to an xml file
        /// </summary>
        /// <param name="oDatasetElement"></param>
        /// <param name="strDestFolder"></param>
        /// <param name="bDefaultResolution"></param>
        /// <returns></returns>
        internal virtual ExtractSaveResult Save(System.Xml.XmlElement oDatasetElement, string strDestFolder, DownloadSettings.DownloadCoordinateSystem eCS)
        {
            double dMaxX, dMinX, dMaxY, dMinY;
             double dProjMinX, dProjMinY, dProjMaxX, dProjMaxY;
             string strProjCoordinateSystem;
             bool bNewMap = true;
             bool bInvalidReprojection = false;

             // --- save the dataset type ---

             System.Xml.XmlAttribute oTypeAttr = oDatasetElement.OwnerDocument.CreateAttribute("type");
             oTypeAttr.Value = m_oDAPLayer.DAPType;
             oDatasetElement.Attributes.Append(oTypeAttr);

             // --- set the server url ---

             System.Xml.XmlAttribute oAttr = oDatasetElement.OwnerDocument.CreateAttribute("title");
             oAttr.Value = m_oDAPLayer.Title;
             oDatasetElement.Attributes.Append(oAttr);

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("url");
             oAttr.Value = m_oDAPLayer.ServerURL;
             oDatasetElement.Attributes.Append(oAttr);

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("id");
             oAttr.Value = m_oDAPLayer.DatasetName;
             oDatasetElement.Attributes.Append(oAttr);

             // --- get the dataset coordinate system ---

             string strSrcCoordinateSystem = m_strLayerProjection;
             if (string.IsNullOrEmpty(strSrcCoordinateSystem))
            return ExtractSaveResult.Ignore;

             // --- get the dataset extents ---

             if (!MainForm.MontajInterface.GetExtents(m_oDAPLayer.ServerURL, m_oDAPLayer.DatasetName, out dMaxX, out dMinX, out dMaxY, out dMinY))
                return ExtractSaveResult.Ignore;

             // --- Sanity check on the data ---

             double dMapInWGS84_MinX = dMinX;
             double dMapInWGS84_MinY = dMinY;
             double dMapInWGS84_MaxX = dMaxX;
             double dMapInWGS84_MaxY = dMaxY;
             if (MainForm.MontajInterface.ProjectBoundingRectangle(strSrcCoordinateSystem, ref dMapInWGS84_MinX, ref dMapInWGS84_MinY, ref dMapInWGS84_MaxX, ref dMapInWGS84_MaxY, Resolution.WGS_84))
             {
            if (Math.Abs(m_oDAPLayer.m_hDataSet.Boundary.MinX - dMapInWGS84_MinX) > 0.01 ||
                    Math.Abs(m_oDAPLayer.m_hDataSet.Boundary.MinY - dMapInWGS84_MinY) > 0.01 ||
                    Math.Abs(m_oDAPLayer.m_hDataSet.Boundary.MaxX - dMapInWGS84_MaxX) > 0.01 ||
                    Math.Abs(m_oDAPLayer.m_hDataSet.Boundary.MaxY - dMapInWGS84_MaxY) > 0.01)
            {
                    Geosoft.Dap.Common.BoundingBox oReprojectedBox = new Geosoft.Dap.Common.BoundingBox(dMapInWGS84_MaxX, dMapInWGS84_MaxY, dMapInWGS84_MinX, dMapInWGS84_MinY);

                    Program.ShowMessageBox(
                        "A problem was encountered while preparing to download dataset " + m_oDAPLayer.Title + "\n" +
                        "The WGS 84 bounding box advertised by the server:\n" +
                        m_oDAPLayer.m_hDataSet.Boundary.ToString(2) + "\n" +
                        "does not match up with the reprojected extents of the layer's metadata:\n" +
                        oReprojectedBox.ToString(2) + "\n" +
                        "The dataset will not be downloaded.  Contact the server administrator.",
                        "Extract Datasets",
                        MessageBoxButtons.OK,
                        MessageBoxDefaultButton.Button1,
                        MessageBoxIcon.Error);
                    return ExtractSaveResult.Ignore;
            }
             }

             // End sanity check.  Insanity may resume.

             // --- calculate the extract area ---

             dProjMaxX = dMaxX;
             dProjMaxY = dMaxY;
             dProjMinX = dMinX;
             dProjMinY = dMinY;
             strProjCoordinateSystem = strSrcCoordinateSystem;

             if (MainForm.MontajInterface.ProjectBoundingRectangle(strSrcCoordinateSystem, ref dProjMinX, ref dProjMinY, ref dProjMaxX, ref dProjMaxY, Resolution.WGS_84))
             {
            dProjMaxX = Math.Min(m_oViewedAoi.East, dProjMaxX);
            dProjMinX = Math.Max(m_oViewedAoi.West, dProjMinX);
            dProjMaxY = Math.Min(m_oViewedAoi.North, dProjMaxY);
            dProjMinY = Math.Max(m_oViewedAoi.South, dProjMinY);

            if (eCS == DownloadSettings.DownloadCoordinateSystem.OriginalMap)
            {
               if (MainForm.MontajInterface.ProjectBoundingRectangle(Resolution.WGS_84, ref dProjMinX, ref dProjMinY, ref dProjMaxX, ref dProjMaxY, m_strMapProjection))
                  strProjCoordinateSystem = m_strMapProjection;
               else
                  bInvalidReprojection = true;
            }
            else
            {
               if (MainForm.MontajInterface.ProjectBoundingRectangle(Resolution.WGS_84, ref dProjMinX, ref dProjMinY, ref dProjMaxX, ref dProjMaxY, strSrcCoordinateSystem))
                  strProjCoordinateSystem = strSrcCoordinateSystem;
               else
                  bInvalidReprojection = true;
            }
             }
             else
             {
            bInvalidReprojection = true;
             }

             // --- check to see if we require a new ---

             if (!bInvalidReprojection && MainForm.MontajInterface.HostHasOpenMap())
             {
            bNewMap = !IntersectMap(ref dProjMinX, ref dProjMinY, ref dProjMaxX, ref dProjMaxY, strProjCoordinateSystem);
             }

             // --- check to see if this is a valid bounding box ---

             if (bInvalidReprojection || !(dProjMaxX > dProjMinX && dProjMaxY > dProjMinY))
             {
            // --- invalid box ---

            dProjMaxX = dMaxX;
            dProjMaxY = dMaxY;
            dProjMinX = dMinX;
            dProjMinY = dMinY;
            strProjCoordinateSystem = strSrcCoordinateSystem;
            bNewMap = true;
             }

             // --- save the extents and coordinate system ---

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("new_map");
             oAttr.Value = (bNewMap && OpenInMap).ToString();
             oDatasetElement.Attributes.Append(oAttr);

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("minx");
            oAttr.Value = dProjMinX.ToString("R", CultureInfo.InvariantCulture);
             oDatasetElement.Attributes.Append(oAttr);

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("miny");
            oAttr.Value = dProjMinY.ToString("R", CultureInfo.InvariantCulture);
             oDatasetElement.Attributes.Append(oAttr);

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("maxx");
            oAttr.Value = dProjMaxX.ToString("R", CultureInfo.InvariantCulture);
             oDatasetElement.Attributes.Append(oAttr);

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("maxy");
            oAttr.Value = dProjMaxY.ToString("R", CultureInfo.InvariantCulture);
             oDatasetElement.Attributes.Append(oAttr);

             oAttr = oDatasetElement.OwnerDocument.CreateAttribute("coordinate_system");
             oAttr.Value = strProjCoordinateSystem;
             oDatasetElement.Attributes.Append(oAttr);

            if (m_oDAPLayer != null)
            {
                oAttr = oDatasetElement.OwnerDocument.CreateAttribute("meta_stylesheet_name");
                oAttr.Value = m_oDAPLayer.StyleSheetID;
                oDatasetElement.Attributes.Append(oAttr);
            }

            #if DEBUG
             double dMapBoundMinX_WGS84 = dMinX;
             double dMapBoundMaxX_WGS84 = dMaxX;
             double dMapBoundMinY_WGS84 = dMinY;
             double dMapBoundMaxY_WGS84 = dMaxY;

             double dClipBoundMinX_WGS84 = dProjMinX;
             double dClipBoundMaxX_WGS84 = dProjMaxX;
             double dClipBoundMinY_WGS84 = dProjMinY;
             double dClipBoundMaxY_WGS84 = dProjMaxY;

             MainForm.MontajInterface.ProjectBoundingRectangle(strSrcCoordinateSystem, ref dMapBoundMinX_WGS84, ref dMapBoundMinY_WGS84, ref dMapBoundMaxX_WGS84, ref dMapBoundMaxY_WGS84, Resolution.WGS_84);
             MainForm.MontajInterface.ProjectBoundingRectangle(strProjCoordinateSystem, ref dClipBoundMinX_WGS84, ref dClipBoundMinY_WGS84, ref dClipBoundMaxX_WGS84, ref dClipBoundMaxY_WGS84, Resolution.WGS_84);

             oDatasetElement.SetAttribute("map_wgs84_west", dMapBoundMinX_WGS84.ToString("f5", CultureInfo.InvariantCulture));
            oDatasetElement.SetAttribute("map_wgs84_south", dMapBoundMinY_WGS84.ToString("f5", CultureInfo.InvariantCulture));
            oDatasetElement.SetAttribute("map_wgs84_east", dMapBoundMaxX_WGS84.ToString("f5", CultureInfo.InvariantCulture));
            oDatasetElement.SetAttribute("map_wgs84_north", dMapBoundMaxY_WGS84.ToString("f5", CultureInfo.InvariantCulture));

            oDatasetElement.SetAttribute("clip_wgs84_west", dClipBoundMinX_WGS84.ToString("f5", CultureInfo.InvariantCulture));
            oDatasetElement.SetAttribute("clip_wgs84_south", dClipBoundMinY_WGS84.ToString("f5", CultureInfo.InvariantCulture));
            oDatasetElement.SetAttribute("clip_wgs84_east", dClipBoundMaxX_WGS84.ToString("f5", CultureInfo.InvariantCulture));
            oDatasetElement.SetAttribute("clip_wgs84_north", dClipBoundMaxY_WGS84.ToString("f5", CultureInfo.InvariantCulture));
            #endif

            return ExtractSaveResult.Extract;
        }
Ejemplo n.º 23
0
 protected override void SerializeCore(System.Xml.XmlElement element, SaveContext context)
 {
     element.SetAttribute(NameAttributeName, this.Name);
     element.SetAttribute(DescriptionAttributeName, this.Description);
     element.SetAttribute(GuidAttributeName, this.GUID.ToString());
     //the states are already serialized
     foreach (var serializedNode in this.SerializedNodes)
     {
         //need to import the node to cross xml contexts
         var importNode = element.OwnerDocument.ImportNode(serializedNode, true);
         element.AppendChild(importNode);
     }
 }
Ejemplo n.º 24
0
 protected override void XmlSetAttributes(System.Xml.XmlElement thisElement) {
   base.XmlSetAttributes(thisElement);
   thisElement.SetAttribute("Operation", this.Op); 
 }
 protected override void SaveToXml(System.Xml.XmlDocument doc, System.Xml.XmlElement el)
 {
     base.SaveToXml (doc, el);
     el.SetAttribute("TYPE" , CutomerParameter.TypeCode);
 }
Ejemplo n.º 26
0
		public void Serialize(System.Xml.XmlElement xmlElem)
		{
			if(m_BarBackgroundCustom)
				xmlElem.SetAttribute("barback",BarFunctions.ColorToString(m_BarBackground));
			if(m_BarBackground2Custom)
				xmlElem.SetAttribute("barback2",BarFunctions.ColorToString(m_BarBackground2));
			if(m_BarBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("barbackga",m_BarBackgroundGradientAngle.ToString());
			if(m_BarStripeColorCustom)
				xmlElem.SetAttribute("barstripeclr",BarFunctions.ColorToString(m_BarStripeColor));
			if(m_BarCaptionBackgroundCustom)
				xmlElem.SetAttribute("barcapback",BarFunctions.ColorToString(m_BarCaptionBackground));
			if(m_BarCaptionBackground2Custom)
				xmlElem.SetAttribute("barcapback2",BarFunctions.ColorToString(m_BarCaptionBackground2));
			if(m_BarCaptionBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("barcapbackga",m_BarCaptionBackgroundGradientAngle.ToString());
			if(m_BarCaptionInactiveBackgroundCustom)
				xmlElem.SetAttribute("barcapiback",BarFunctions.ColorToString(m_BarCaptionInactiveBackground));
			if(m_BarCaptionInactiveBackground2Custom)
				xmlElem.SetAttribute("barcapiback2",BarFunctions.ColorToString(m_BarCaptionInactiveBackground2));
			if(m_BarCaptionInactiveBackgroundGAngle!=90)
				xmlElem.SetAttribute("barcapibackga",m_BarCaptionInactiveBackgroundGAngle.ToString());
			if(m_BarDockedBorderCustom)
				xmlElem.SetAttribute("bardockborder",BarFunctions.ColorToString(m_BarDockedBorder));
			if(m_BarCaptionInactiveTextCustom)
				xmlElem.SetAttribute("barcapitext",BarFunctions.ColorToString(m_BarCaptionInactiveText));
			if(m_BarCaptionTextCustom)
				xmlElem.SetAttribute("barcaptext",BarFunctions.ColorToString(m_BarCaptionText));
			if(m_BarFloatingBorderCustom)
				xmlElem.SetAttribute("barfloatb",BarFunctions.ColorToString(m_BarFloatingBorder));
			if(m_BarPopupBackgroundCustom)
				xmlElem.SetAttribute("barpopupback",BarFunctions.ColorToString(m_BarPopupBackground));
			if(m_BarPopupBorderCustom)
				xmlElem.SetAttribute("barpopupb",BarFunctions.ColorToString(m_BarPopupBorder));
			if(m_ItemBackgroundCustom)
				xmlElem.SetAttribute("itemback",BarFunctions.ColorToString(m_ItemBackground));
			if(m_ItemBackground2Custom)
				xmlElem.SetAttribute("itemback2",BarFunctions.ColorToString(m_ItemBackground2));
			if(m_ItemBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("itembackga",m_ItemBackgroundGradientAngle.ToString());
			if(m_ItemCheckedBackgroundCustom)
				xmlElem.SetAttribute("itemchkback",BarFunctions.ColorToString(m_ItemCheckedBackground));
			if(m_ItemCheckedBackground2Custom)
				xmlElem.SetAttribute("itemchkback2",BarFunctions.ColorToString(m_ItemCheckedBackground2));
			if(m_ItemCheckedBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("itemchkbackga",m_ItemCheckedBackgroundGradientAngle.ToString());
			if(m_ItemCheckedBorderCustom)
				xmlElem.SetAttribute("itemchkb",BarFunctions.ColorToString(m_ItemCheckedBorder));
			if(m_ItemCheckedTextCustom)
				xmlElem.SetAttribute("itemchktext",BarFunctions.ColorToString(m_ItemCheckedText));
			if(m_ItemDisabledBackgroundCustom && !m_ItemDisabledBackground.IsEmpty)
				xmlElem.SetAttribute("itemdisback",BarFunctions.ColorToString(m_ItemDisabledBackground));
			if(m_ItemDisabledTextCustom)
				xmlElem.SetAttribute("itemdistext",BarFunctions.ColorToString(m_ItemDisabledText));
			if(m_ItemExpandedShadowCustom)
				xmlElem.SetAttribute("itemexpshadow",BarFunctions.ColorToString(m_ItemExpandedShadow));
			if(m_ItemExpandedBackgroundCustom)
				xmlElem.SetAttribute("itemexpback",BarFunctions.ColorToString(m_ItemExpandedBackground));
			if(m_ItemExpandedBackground2Custom)
				xmlElem.SetAttribute("itemexpback2",BarFunctions.ColorToString(m_ItemExpandedBackground2));
			if(m_ItemExpandedBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("itemexpbackga",m_ItemExpandedBackgroundGradientAngle.ToString());
			if(m_ItemExpandedTextCustom)
				xmlElem.SetAttribute("itemexptext",BarFunctions.ColorToString(m_ItemExpandedText));
			if(m_ItemExpandedBorderCustom)
				xmlElem.SetAttribute("itemexpborder",BarFunctions.ColorToString(m_ItemExpandedBorder));
			if(m_ItemHotBackgroundCustom)
				xmlElem.SetAttribute("itemhotback",BarFunctions.ColorToString(m_ItemHotBackground));
			if(m_ItemHotBackground2Custom)
				xmlElem.SetAttribute("itemhotback2",BarFunctions.ColorToString(m_ItemHotBackground2));
			if(m_ItemHotBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("itemhotbackga",m_ItemHotBackgroundGradientAngle.ToString());
			if(m_ItemHotBorderCustom)
				xmlElem.SetAttribute("itemhotb",BarFunctions.ColorToString(m_ItemHotBorder));
			if(m_ItemHotTextCustom)
				xmlElem.SetAttribute("itemhottext",BarFunctions.ColorToString(m_ItemHotText));
			if(m_ItemPressedBackgroundCustom)
				xmlElem.SetAttribute("itempressback",BarFunctions.ColorToString(m_ItemPressedBackground));
			if(m_ItemPressedBackground2Custom)
				xmlElem.SetAttribute("itempressback2",BarFunctions.ColorToString(m_ItemPressedBackground2));
			if(m_ItemPressedBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("itempressbackga",m_ItemPressedBackgroundGradientAngle.ToString());
			if(m_ItemPressedBorderCustom)
				xmlElem.SetAttribute("itempressb",BarFunctions.ColorToString(m_ItemPressedBorder));
			if(m_ItemPressedTextCustom)
				xmlElem.SetAttribute("itempresstext",BarFunctions.ColorToString(m_ItemPressedText));
			if(m_ItemSeparatorCustom)
				xmlElem.SetAttribute("itemsep",BarFunctions.ColorToString(m_ItemSeparator));
			if(m_ItemTextCustom)
				xmlElem.SetAttribute("itemtext",BarFunctions.ColorToString(m_ItemText));
			if(m_MenuBackgroundCustom)
				xmlElem.SetAttribute("menuback",BarFunctions.ColorToString(m_MenuBackground));
			if(m_MenuBackground2Custom)
				xmlElem.SetAttribute("menuback2",BarFunctions.ColorToString(m_MenuBackground2));
			if(m_MenuBackgroundGradientAngle!=0)
				xmlElem.SetAttribute("menubackga",m_MenuBackgroundGradientAngle.ToString());
			if(m_MenuBarBackgroundCustom)
				xmlElem.SetAttribute("menubarback",BarFunctions.ColorToString(m_MenuBarBackground));
			if(m_MenuBarBackground2Custom)
				xmlElem.SetAttribute("menubarback2",BarFunctions.ColorToString(m_MenuBarBackground2));
			if(m_MenuBarBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("menubarbackga",m_MenuBarBackgroundGradientAngle.ToString());
			if(m_MenuBorderCustom)
				xmlElem.SetAttribute("menub",BarFunctions.ColorToString(m_MenuBorder));
			if(m_MenuSideCustom)
				xmlElem.SetAttribute("menuside",BarFunctions.ColorToString(m_MenuSide));
			if(m_MenuSide2Custom)
				xmlElem.SetAttribute("menuside2",BarFunctions.ColorToString(m_MenuSide2));
			if(m_MenuSideGradientAngle!=0)
				xmlElem.SetAttribute("menusidega",m_MenuSideGradientAngle.ToString());
			if(m_MenuUnusedBackgroundCustom)
				xmlElem.SetAttribute("menuuback",BarFunctions.ColorToString(m_MenuUnusedBackground));
			if(m_MenuUnusedSideCustom)
				xmlElem.SetAttribute("menuuside",BarFunctions.ColorToString(m_MenuUnusedSide));
			if(m_MenuUnusedSide2Custom)
				xmlElem.SetAttribute("menuuside2",BarFunctions.ColorToString(m_MenuUnusedSide2));
			if(m_MenuSideGradientAngle!=0)
				xmlElem.SetAttribute("menuusidega",m_MenuSideGradientAngle.ToString());
			if(m_ItemDesignTimeBorderCustom)
				xmlElem.SetAttribute("menudtb",BarFunctions.ColorToString(m_ItemDesignTimeBorder));
			if(m_CustomizeBackgroundCustom)
				xmlElem.SetAttribute("customback",BarFunctions.ColorToString(m_CustomizeBackground));
			if(m_CustomizeBackground2Custom)
				xmlElem.SetAttribute("customback2",BarFunctions.ColorToString(m_CustomizeBackground2));
			if(m_CustomizeTextCustom)
				xmlElem.SetAttribute("customtext",BarFunctions.ColorToString(m_CustomizeText));
			if(m_CustomizeBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("custombackga",m_CustomizeBackgroundGradientAngle.ToString());

			// Panel Colors
			if(m_PanelBackgroundCustom)
				xmlElem.SetAttribute("panelback",BarFunctions.ColorToString(m_PanelBackground));
			if(m_PanelBackground2Custom)
				xmlElem.SetAttribute("panelback2",BarFunctions.ColorToString(m_PanelBackground2));
			if(m_PanelBorderCustom)
				xmlElem.SetAttribute("panelborder",BarFunctions.ColorToString(m_PanelBorder));
			if(m_PanelTextCustom)
				xmlElem.SetAttribute("paneltext",BarFunctions.ColorToString(m_PanelText));
			if(m_PanelBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("panelbackga",m_PanelBackgroundGradientAngle.ToString());

            // Splitter Colors
            if (m_SplitterBackgroundCustom)
                xmlElem.SetAttribute("splitterback", BarFunctions.ColorToString(m_SplitterBackground));
            if (m_SplitterBackground2Custom)
                xmlElem.SetAttribute("splitterback2", BarFunctions.ColorToString(m_SplitterBackground2));
            if (m_SplitterBorderCustom)
                xmlElem.SetAttribute("splitterborder", BarFunctions.ColorToString(m_SplitterBorder));
            if (m_SplitterTextCustom)
                xmlElem.SetAttribute("splittertext", BarFunctions.ColorToString(m_SplitterText));
            if (m_SplitterBackgroundGradientAngle != 90)
                xmlElem.SetAttribute("splitterbackga", m_SplitterBackgroundGradientAngle.ToString());

			// Explorer Bar
			if(m_ExplorerBarBackgroundCustom)
				xmlElem.SetAttribute("exbarback",BarFunctions.ColorToString(m_ExplorerBarBackground));
			if(m_ExplorerBarBackground2Custom)
				xmlElem.SetAttribute("exbarback2",BarFunctions.ColorToString(m_ExplorerBarBackground2));
			if(m_ExplorerBarBackgroundGradientAngle!=90)
				xmlElem.SetAttribute("exbarbackga",m_ExplorerBarBackgroundGradientAngle.ToString());

			// Dock Site colors
			if(m_DockSiteBackColorCustom)
				xmlElem.SetAttribute("dsback",BarFunctions.ColorToString(m_DockSiteBackColor));
			if(m_DockSiteBackColor2Custom)
				xmlElem.SetAttribute("dsback2",BarFunctions.ColorToString(m_DockSiteBackColor2));
			if(m_DockSiteBackColorGradientAngle!=0)
				xmlElem.SetAttribute("dsbackga",m_DockSiteBackColorGradientAngle.ToString());

            if (!m_MdiSystemItemForeground.IsEmpty)
                xmlElem.SetAttribute("mdisystemitemforeground", BarFunctions.ColorToString(m_MdiSystemItemForeground));

			if(m_PredefinedColorScheme!=ePredefinedColorScheme.AutoGenerated)
				xmlElem.SetAttribute("predefcolorscheme",System.Xml.XmlConvert.ToString(((int)m_PredefinedColorScheme)));
		}
        public override void SaveToXml(System.Xml.XmlElement xmlEl , System.Xml.XmlDocument doc)
        {
            base.SaveToXml(xmlEl, doc);
            xmlEl.SetAttribute("C", "1");
            xmlEl.SetAttribute("FS" , ((int)this.Format).ToString() );
            if(this._prompt)
                xmlEl.SetAttribute("PR", "1");

            foreach(Object obj in this._mdxParameters) //calculated member references
            {
                if(obj is Dimension) // dimension
                {
                    throw new NotImplementedException();
                }
                else if(obj is Hierarchy) // hierarchy
                {
                    System.Xml.XmlElement childEl=doc.CreateElement("H");
                    childEl.SetAttribute("UN" , obj.UniqueName);
                    xmlEl.AppendChild(childEl);
                }
                else if(obj is Level) // level
                {
                    System.Xml.XmlElement childEl=doc.CreateElement("L");
                    childEl.SetAttribute("UN" , obj.UniqueName);
                    xmlEl.AppendChild(childEl);
                }
                else if(obj is Member) // member
                {
                    Member mem=obj as Member;

                    System.Xml.XmlElement childEl=doc.CreateElement("M");
                    mem.SaveToXml(childEl, doc);
                    if(mem.Hierarchy!=this.Hierarchy)
                        childEl.SetAttribute("H" , mem.Hierarchy.UniqueName);
                    xmlEl.AppendChild(childEl);
                }

            }
        }
 public override void SaveToXml(System.Xml.XmlElement xmlEl , System.Xml.XmlDocument doc)
 {
     base.SaveToXml(xmlEl, doc);
     xmlEl.SetAttribute("T", TypeString);
     xmlEl.SetAttribute("O", this.Operator.ToString());
     xmlEl.SetAttribute("V", this.Value);
 }
Ejemplo n.º 29
0
 internal void SaveUserData(System.Xml.XmlElement node)
 {
     node.SetAttribute("autoRefresh", this.buttonAutoRefresh.Checked.ToString(CultureInfo.InvariantCulture));
     node.SetAttribute("locked", this.buttonLock.Checked.ToString(CultureInfo.InvariantCulture));
     node.SetAttribute("titleText", this.Text);
     node.SetAttribute("debug", this.buttonDebug.Checked.ToString(CultureInfo.InvariantCulture));
 }
Ejemplo n.º 30
0
 protected virtual void SaveToXml(System.Xml.XmlDocument doc, System.Xml.XmlElement el)
 {
     el.SetAttribute("CAPT" , this.Caption);
 }