private void SmartFormatDemo_Load(object sender, EventArgs e)
        {
            this.args = new PropertyGridObject();
            var nestedColors = new Color[] {
                Color.Orange,
                Color.LightYellow,
                Color.LightGreen,
                Color.LightCyan,
                Color.LightSkyBlue,
                Color.Lavender,
            };

            rtfOutput = new RTFOutput(nestedColors, Color.LightPink);

            args.Person    = TestFactory.GetPerson();
            args.Date      = DateTime.Now;
            args.Inventory = TestFactory.GetItems();
            args.Xml       = XElement.Parse(XmlSourceTest.TwoLevelXml);
            propertyGrid1.SelectedObject = args;


            Smart.Default.Settings.FormatErrorAction = ErrorAction.OutputErrorInResult;
            Smart.Default.Settings.ParseErrorAction  = ErrorAction.ThrowError;

            LoadExamples();
        }
Beispiel #2
0
        private void SmartFormatDemo_Load(object sender, EventArgs e)
        {
            this.args = new PropertyGridObject();
            var nestedColors = new Color[] {
                Color.Orange,
                Color.LightYellow,
                Color.LightGreen,
                Color.LightCyan,
                Color.LightSkyBlue,
                Color.Lavender,
            };

            rtfOutput = new RTFOutput(nestedColors, Color.LightPink);

            args.arg0 = TestFactory.GetPerson();
            args.arg1 = DateTime.Now;

            propertyGrid1.SelectedObject = args;


            Smart.Default.ErrorAction        = ErrorAction.OutputErrorInResult;
            Smart.Default.Parser.ErrorAction = ErrorAction.ThrowError;

            LoadExamples();
        }
        private void SmartFormatDemo_Load(object sender, EventArgs e)
        {
            this.args = new PropertyGridObject();
            var nestedColors = new Color[] {
                Color.Orange,
                Color.LightYellow,
                Color.LightGreen,
                Color.LightCyan,
                Color.LightSkyBlue,
                Color.Lavender,
            };
            rtfOutput = new RTFOutput(nestedColors, Color.LightPink);
            
            args.Person = TestFactory.GetPerson();
            args.Date = DateTime.Now;
	        args.Inventory = TestFactory.GetItems();

            propertyGrid1.SelectedObject = args;


            Smart.Default.ErrorAction = ErrorAction.OutputErrorInResult;
            Smart.Default.Parser.ErrorAction = ErrorAction.ThrowError;

            LoadExamples();
        }
Beispiel #4
0
        public bool ApplyChanges()
        {
            var service = (IConfigurationService)GetService(typeof(IConfigurationService));

            PropertyGridObject.Apply();
            service.ServerManager.CommitChanges();
            return(true);
        }
Beispiel #5
0
 private void CleanPropertiesPaneEntries(PropertyGridObject Obj = null)
 {
     if (Obj != null)
     {
         Obj.Clear();
     }
     else if (_SelectedObject != null)
     {
         _SelectedObject.Clear();
     }
     this.PropertyPane.ItemsSource = null;
 }
Beispiel #6
0
 public void Update(PropertyGridObject Obj = null)
 {
     if (Obj != null)
     {
         UpdatePropertiesPaneEntries(Obj);
     }
     else if (_SelectedObject != null)
     {
         UpdatePropertiesPaneEntries(_SelectedObject);
     }
     else
     {
         CleanPropertiesPaneEntries();
     }
 }
Beispiel #7
0
 private void UpdatePropertiesPaneEntries(PropertyGridObject Obj)
 {
     this.PropertyPane.ItemsSource = Obj.PropertyList;
     UpdateChildrenBindings();
 }