Example #1
0
 public static void Prompt_Click(object data)
 {
     if (data is PromptText)
     {
         PromptText castedObject = data as PromptText;
         editor_pg.SelectedObject = castedObject;
     }
     else if (data is PromptMultiline)
     {
         PromptMultiline castedObject = data as PromptMultiline;
         editor_pg.SelectedObject = castedObject;
     }
     else if (data is PromptDate)
     {
         PromptDate castedObject = data as PromptDate;
         editor_pg.SelectedObject = castedObject;
     }
     else if (data is PromptCheckbox)
     {
         PromptCheckbox castedObject = data as PromptCheckbox;
         editor_pg.SelectedObject = castedObject;
     }
     else if (data is PromptUserDefined)
     {
         PromptUserDefined castedObject = data as PromptUserDefined;
         editor_pg.SelectedObject = castedObject;
     }
     else
     {
         AbstractPrompt castedObject = data as AbstractPrompt;
         editor_pg.SelectedObject = castedObject;
     }
 }
Example #2
0
            public static AbstractPrompt Parse(XmlElement anXmlElement)
            {
                PromptUserDefined tPrompt = (PromptUserDefined)AbstractPrompt.Factory.CreateInstance(typeof(PromptUserDefined));

                parsePromptChildren(tPrompt, anXmlElement);

                return(tPrompt);
            }
Example #3
0
        public override AbstractPrompt Clone()
        {
            PromptUserDefined tNewCheckbox = (PromptUserDefined)AbstractPrompt.Factory.CreateInstance(this.GetType());

            tNewCheckbox.Name        = "CopyOf" + this.Name;
            tNewCheckbox.Description = this.Description;
            tNewCheckbox.ClassName   = this.ClassName;
            return(tNewCheckbox);
        }
Example #4
0
 private static void parsePromptChildren(PromptUserDefined aPrompt, XmlNode aPromptNode)
 {
     foreach (XmlNode tPromptNode in aPromptNode.ChildNodes)
     {
         if (tPromptNode.Name == "type")
         {
             aPrompt.ClassName = getRequiredAttribute(tPromptNode, "class");
         }
     }
 }