예제 #1
0
 /// <summary>
 /// The protected OnRaiseProperty method raises the event by invoking
 /// the delegates. The sender is always this, the current instance
 /// of the class.
 /// </summary>
 /// <param name="e"></param>
 protected virtual void OnAddWizardResult(PropertyPairEvent e)
 {
     if (e != null)
     {
         // Invokes the delegates.
         _AddWizardResultEvent(this, e);
     }
 }
 // The protected OnAddReceiveHandlerProperty method raises the event by invoking
 // the delegates. The sender is always this, the current instance
 // of the class.
 protected virtual void OnAddDesignerProperty(PropertyPairEvent e)
 {
     if (e != null)
     {
         // Invokes the delegates.
         _AddDesignerPropertyEvent(this, e);
     }
 }
예제 #3
0
        private void AddDesignerProperty(object sender, PropertyPairEvent e)
        {
            try
            {
                AddProperty(DesignerProperties, e);
            }
            catch (Exception err)
            {
#if DEBUG
                MessageBox.Show(this, err.ToString());
#else
                MessageBox.Show(this, err.Message);
#endif
                Trace.WriteLine(err.Message + Environment.NewLine + err.StackTrace);
            }
        }
예제 #4
0
 private void AddProperty(Hashtable ht, PropertyPairEvent e)
 {
     if (e.Remove)
     {
         if (ht[e.Name] != null)
         {
             ht.Remove(e.Name);
         }
         return;
     }
     //Replace the value if it already exists
     if (ht[e.Name] != null)
     {
         ht.Remove(e.Name);
     }
     ht.Add(e.Name, e.Value);
 }
예제 #5
0
        private void AddWizardResult(object sender, PropertyPairEvent e)
        {
            try
            {
                //Replace the value if it already exists
                if (_WizardResults.ContainsKey(e.Name))
                {
                    _WizardResults.Remove(e.Name);
                }
                _WizardResults.Add(e.Name, e.Value);
            }
            catch (Exception err)
            {
#if DEBUG
                MessageBox.Show(this, err.ToString());
#else
                MessageBox.Show(this, err.Message);
#endif
                Trace.WriteLine(err.Message + Environment.NewLine + err.StackTrace);
            }
        }
예제 #6
0
        protected void AddWizardResult(string strName, object Value)
        {
            PropertyPairEvent PropertyPair = new PropertyPairEvent(strName, Value);

            OnAddWizardResult(PropertyPair);
        }
        protected void RemoveDesignerProperty(string strName)
        {
            PropertyPairEvent PropertyPair = new PropertyPairEvent(strName, null, true);

            OnAddDesignerProperty(PropertyPair);
        }
        protected void AddDesignerProperty(string strName, string strValue)
        {
            PropertyPairEvent PropertyPair = new PropertyPairEvent(strName, strValue);

            OnAddDesignerProperty(PropertyPair);
        }