Exemplo n.º 1
1
        public void PropertyValueChanged(PropertyValueChangedEventArgs e, PropertyGrid mPropertyGrid)
        {
            UnreferencedFilesManager.Self.ProcessRefreshOfUnreferencedFiles();

            #region Check for Errors

            if (mPropertyGrid == null)
            {
                System.Windows.Forms.MessageBox.Show("There has been an internal error in Glue related to updating the PropertyGrid.  This likely happens if there has been an earlier error in Glue.  You should probably restart Glue.");
                MainGlueWindow.Self.HasErrorOccurred = true;
            }

            #endregion

            string changedMember = e.ChangedItem.PropertyDescriptor.Name;
            object oldValue = e.OldValue;
            string variableName = e.ChangedItem.Label;
            string parentGridItemName = null;
            if (e.ChangedItem != null && e.ChangedItem.Parent != null)
            {
                parentGridItemName = e.ChangedItem.Parent.Label;
            }

            ReactToPropertyChanged(changedMember, oldValue, variableName, parentGridItemName);
        }
Exemplo n.º 2
0
 private void propertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     if (this.PropertyValueChanged != null)
     {
         this.PropertyValueChanged(s, e);
     }
 }
 private void SettingsGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (AccountsList.SelectedIndex > -1)
     {
         AccountsList.Items[AccountsList.SelectedIndex] = SettingsGrid.SelectedObject;
     }
 }
Exemplo n.º 4
0
 private void propertyGrid_main_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (toolStrip_main.Visible == false)
     {
         toolStrip_main.Visible = true;
     }
 }
        private void PropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            mIsBackgroundMove = mParticleSystem.IsBackgroundMove;
            mPlayToolStripButton.Enabled = !mParticleSystem.IsLoop;

            mDll.Invoke<MParticleChanged, bool>(mParticleSystem.Scale,mParticleSystem.IsBackgroundMove, mParticleSystem.Angle, mParticleSystem.AngleVar, (int)mParticleSystem.DestBlendFunc, (int)mParticleSystem.SrcBlendFunc,
                mParticleSystem.Duration, mParticleSystem.EmissionRate, (int)mParticleSystem.Mode,
                mParticleSystem.EndColor.R, mParticleSystem.EndColor.G, mParticleSystem.EndColor.B, mParticleSystem.EndColor.A,
                mParticleSystem.EndColorVar.R, mParticleSystem.EndColorVar.G, mParticleSystem.EndColorVar.B, mParticleSystem.EndColorVar.A,
                mParticleSystem.EndRadius, mParticleSystem.EndRadiusVar,
                mParticleSystem.EndSize, mParticleSystem.EndSizeVar,
                mParticleSystem.EndSpin, mParticleSystem.EndSpinVar,
                mParticleSystem.GravityX, mParticleSystem.GravityY,
                mParticleSystem.IsAutoRemoveOnFinish, 
                mParticleSystem.Life, mParticleSystem.LifeVar,
                (int)mParticleSystem.PositionType,
                mParticleSystem.PosVarX, mParticleSystem.PosVarY,
                mParticleSystem.RadialAccel, mParticleSystem.RadialAccelVar,
                mParticleSystem.RotatePerSecond, mParticleSystem.RotatePerSecondVar,
                mParticleSystem.SourcePositionX, mParticleSystem.SourcePositionY,
                mParticleSystem.Speed, mParticleSystem.SpeedVar,
                mParticleSystem.StartColor.R, mParticleSystem.StartColor.G, mParticleSystem.StartColor.B, mParticleSystem.StartColor.A,
                mParticleSystem.StartColorVar.R, mParticleSystem.StartColorVar.G, mParticleSystem.StartColorVar.B, mParticleSystem.StartColorVar.A,
                mParticleSystem.StartRadius, mParticleSystem.StartRadiusVar,
                mParticleSystem.StartSize, mParticleSystem.StartSizeVar,
                mParticleSystem.StartSpin, mParticleSystem.StartSpinVar,
                mParticleSystem.TangentialAccel, mParticleSystem.TangentialAccelVar,
                mParticleSystem.PlistPath,mParticleSystem.TexturePath,mParticleSystem.TextureImageData,
                mParticleSystem.TotalParticles
                );


        }
 private void DefinitionObjectPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (this.lastNode != null)
     {
         this.lastNode.PropertyChanged();
     }
 }
Exemplo n.º 7
0
        private void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            //form view click on propertygrid1 goto prop and click on events and doubleclick on propertyvaluechanged to generat this.
            Reload();//reload method

            //form view prop select 'selectedObject' choose button1 and at runtime can get propery's for button1 or any object is set.
        }
Exemplo n.º 8
0
 private void pgSettings_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (lbAccounts.SelectedIndex > -1)
     {
         lbAccounts.Items[lbAccounts.SelectedIndex] = pgSettings.SelectedObject;
     }
 }
Exemplo n.º 9
0
 private void propDisplay_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     if (e.ChangedItem.Label == "Description" && this.propDisplay.SelectedObject is IDescribed)
     {
         this.tree.SelectedNode.Text = ((IDescribed)this.propDisplay.SelectedObject).Description;
     }
 }
Exemplo n.º 10
0
 private void PropertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     var assemblyBrowser = ServiceProvider.GetInstance().GetService<IAssemblyBrowser>();
     var selection = assemblyBrowser.ActiveItem;
     assemblyBrowser.ActiveItem = null;
     assemblyBrowser.ActiveItem = selection;
 }
Exemplo n.º 11
0
        // ---

        // --- PROPERTY GRID EVENTS
        private void pgrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            SvgElement ele = GetCurrentSvgElement();

            if (ele == null)
            {
                return;
            }

            // fill XML text
            txtXML.Text = ele.GetTagXml();

            // if the Id changes the tree node has to be refreshed
            if (e.ChangedItem.Label == "Id")
            {
                string sNodeName = ele.getElementName();
                string sId;
                sId = ele.Id;

                if (sId != "")
                {
                    sNodeName += "(";
                    sNodeName += sId;
                    sNodeName += ")";
                }

                TreeNode nod = FindNodeByTag(null, ele.getInternalId().ToString());
                if (nod != null)
                {
                    nod.Text = sNodeName;
                }
            }
        }
Exemplo n.º 12
0
 private void propertyGrid1_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     if (propertyGrid1.SelectedObject is HSDAccessor accessor)
     {
         panel1.SetBytes(accessor._s.GetData());
     }
 }
Exemplo n.º 13
0
        /// <summary>
        /// 属性窗属性值更改事件
        /// 当是否使用缺省文本属性改变时,保存是否使用缺省文本设置
        /// 当文本属性更改时,更新控件文本属性(因为不会自动更新)
        /// </summary>
        /// <param name="s"></param>
        /// <param name="e"></param>
        private void propertyGrid1_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            bool boolOld = false;
            bool boolNew = false;

            //是否使用缺省文本属性
            if (e.ChangedItem.Label == "IsUseDefaultText")
            {
                boolOld = (bool)e.OldValue;
                boolNew = (bool)e.ChangedItem.Value;
            }
            //展开文本属性
            else if (e.ChangedItem.Label == "ControlText")
            {
                ControlText OldText    = (ControlText)e.OldValue;
                ControlText NewText    = (ControlText)e.ChangedItem.Value;
                OwnControl  ownControl = (OwnControl)this.propertyGrid1.SelectedObject;
                ownControl.ControlText = NewText;
                boolOld = OldText.IsUseDefaultText;
                boolNew = NewText.IsUseDefaultText;
            }
            //文本属性
            else if (e.ChangedItem.Label == "Text")
            {
                OwnControl  ownControl = (OwnControl)this.propertyGrid1.SelectedObject;
                ControlText NewText    = new ControlText((string)e.ChangedItem.Value, ownControl.ControlText.IsUseDefaultText);
                ownControl.ControlText = NewText;
            }

            //保存到Xml文件
            if (boolOld != boolNew)
            {
                design.SaveIsUseDefaultTextSetting(this.cboControlList.Text, boolNew);
            }
        }
Exemplo n.º 14
0
        private void C_PropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            TreeNode selectedNode = this.C_StyleTree.SelectedNode;

            if (selectedNode.Text == "Rows Style" && selectedNode.Parent != null)
            {
                BasicStyle alternateStyle = (this.C_StyleTree.SelectedNode.Nodes[0].Tag) as BasicStyle;
                SetStyleValue(alternateStyle, e);
            }

            //TreeNode childNode = null;

            if (selectedNode.Parent == null)
            {
                foreach (TreeNode childNode in selectedNode.Nodes)
                {
                    BasicStyle rowsStyle = childNode.Tag as BasicStyle;

                    SetStyleValue(rowsStyle, e);

                    if (childNode.Nodes.Count > 1)
                    {
                        SetStyleValue(childNode.Nodes[0].Tag as BasicStyle, e);
                    }
                }
            }
        }
Exemplo n.º 15
0
        private void pg_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            if (this.Tag == null)
            {
                return;
            }
            if (pob == null)
            {
                return;
            }
            SimPe.Plugin.MaterialDefinition md = (SimPe.Plugin.MaterialDefinition) this.Tag;
            object o = pob.Properties[e.ChangedItem.Label];

            if (o is Boolean)
            {
                if ((bool)o)
                {
                    md.GetProperty(e.ChangedItem.Label).Value = "1";
                }
                else
                {
                    md.GetProperty(e.ChangedItem.Label).Value = "0";
                }
            }
            else
            {
                md.GetProperty(e.ChangedItem.Label).Value = o.ToString();
            }

            md.Parent.Changed = true;
        }
Exemplo n.º 16
0
 /// <summary>
 /// Record the changes made to properties.
 /// </summary>
 /// <param name="pSender"></param>
 /// <param name="pEventArgs"></param>
 private void onChanged(object pSender, PropertyValueChangedEventArgs pEventArgs)
 {
     string name = pEventArgs.ChangedItem.Label ?? "";
     object val = pEventArgs.ChangedItem.Value ?? "";
     val = (name.ToLower() == "password") ? "*****" : val;
     _logger.Fine("Changed {0}:{1} to {2}:{3}", _oldName, _oldValue, name, val);
 }
Exemplo n.º 17
0
        public override bool UISetValue(System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            bool          r    = true;
            List <string> msgs = new List <string>();
            string        v    = "";

            if (e.ChangedItem.Label.Equals(mItemHost.Name))
            {
                v = (string)e.ChangedItem.Value;
                r = Validator.ValidateString(msgs, this.mItemHost.Name, v);
                if (r)
                {
                    this.Host           = v;
                    this.mItemURL.Value = this.URL;
                }
            }
            else if (e.ChangedItem.Label.Equals(mItemPort.Name))
            {
                v = (string)e.ChangedItem.Value;
                r = Validator.ValidateInt(msgs, this.mItemPort.Name, v, 1, 65535);
                if (r)
                {
                    this.Port = Convert.ToInt32(v);
                    if (this.Host.Length != 0)
                    {
                        this.mItemURL.Value = this.URL;
                    }
                }
            }
            else if (e.ChangedItem.Label.Equals(mItemCamID.Name))
            {
                v = (string)e.ChangedItem.Value;
                r = Validator.ValidateInt(msgs, this.mItemCamID.Name, v, 1, 65535);
                if (r)
                {
                    this.CamID = Convert.ToInt32(v);
                    if (this.Host.Length != 0)
                    {
                        this.mItemURL.Value = this.URL;
                    }
                }
            }
            else
            {
                r = base.UISetValue(e);
                if (r && e.ChangedItem.Label.Equals(mItemStream.Name))
                {
                    if (this.Host.Length != 0)
                    {
                        this.mItemURL.Value = this.URL;
                    }
                }
                return(r);
            }
            if (r == false)
            {
                MessageBox.Show(Validator.MergeMessages(msgs), MotionPreference.Instance.MessageBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return(r);
        }
Exemplo n.º 18
0
        public virtual bool UISetValue(System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            List <string> msgs = new List <string>();
            bool          r    = true;

            if (e.ChangedItem.Label.Equals(mItemStream.Name))
            {
                this.Stream = (IPCAM)e.ChangedItem.Value;
            }
            else
            {
                string v = (string)e.ChangedItem.Value;
                if (e.ChangedItem.Label.Equals(mItemURL.Name) && mItemURL.IsReadOnly == false)
                {
                    r = Validator.ValidateURL(msgs, this.mItemURL.Name, v);
                    if (r)
                    {
                        this.URL = v;
                    }
                }
                else if (e.ChangedItem.Label.Equals(mItemUsername.Name))
                {
                    this.Username = v;
                }
                else if (e.ChangedItem.Label.Equals(mItemPassword.Name))
                {
                    this.Password = v;
                }
            }
            if (r == false)
            {
                MessageBox.Show(Validator.MergeMessages(msgs), MotionPreference.Instance.MessageBoxCaption, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            return(r);
        }
Exemplo n.º 19
0
		protected virtual void OnPropertyValueChanged(PropertyValueChangedEventArgs e)
		{
			if (this.PropertyValueChanged != null)
			{
				this.PropertyValueChanged(this, e);
			}
		}
Exemplo n.º 20
0
 void propertyGrid1_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     if (_editor.IsReady)
     {
         saveBT.Enabled = _editor.IsModified;
     }
 }
Exemplo n.º 21
0
        protected override void OnPropertyValueChanged(PropertyValueChangedEventArgs e)
        {
            base.OnPropertyValueChanged(e);

            //String property = e.ChangedItem.Label;
            //GridItem gridItem = e.ChangedItem;

            //while (gridItem.Parent.Parent.Parent != null)
            //{
            //    gridItem = gridItem.Parent;
            //    property = gridItem.Label;
            //}

            //Object oldValue = mTemp.GetType().InvokeMember(
            //    property,
            //    BindingFlags.Public |
            //    BindingFlags.NonPublic |
            //    BindingFlags.Instance |
            //    BindingFlags.GetProperty,
            //    null,
            //    mTemp,
            //    null
            //);

            //mActionManager.ExecuteCommand(new SetProperty(SelectedObject, property, gridItem.Value, oldValue));
            //mActionManager.ExecuteCommand(new SetProperty(mTemp, property, gridItem.Value));
            //mActionManager.FinaliseCommand();
        }
Exemplo n.º 22
0
        void OnPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            string propertyName = e.ChangedItem.Label;

            CustomVariable customVariable = null;
            


            if (mCurrentNos.SourceType == SourceType.Entity && !string.IsNullOrEmpty(mCurrentNos.SourceClassType))
            {
                IElement entitySave = ObjectFinder.Self.GetIElement(mCurrentNos.SourceClassType);
                customVariable = entitySave.GetCustomVariable(propertyName).Clone();
            }
            else
            {
                customVariable = new CustomVariable();
                customVariable.Name = propertyName;
            }
            customVariable.DefaultValue = e.ChangedItem.Value;

            customVariable.Type = mCurrentNos.GetCustomVariable(propertyName).Type;
            mCurrentElementRuntime.SetCustomVariable(customVariable);

            if (mRuntimeOptions.ShouldSave)
            {

                GlueViewCommands.Self.GlueProjectSaveCommands.SaveGlux();
            }
        }
Exemplo n.º 23
0
		void mPropertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
		{
			if (mPropertyGrid.SelectedObjects.Length == 0)
				return;

			mParent.GetFocusedLevelEditor().UpdateRedraw();
		}
Exemplo n.º 24
0
 private void PropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     if (OnPropertyChanged != null)
     {
         OnPropertyChanged(s, e);
     }
 }
Exemplo n.º 25
0
 private void PropertyGridPropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     PropertyInfo pInfo = typeof(ColorArray).GetProperty(e.ChangedItem.PropertyDescriptor.Name,
         BindingFlags.Public | BindingFlags.Instance);
     pInfo.SetValue(StyleManager.GetControlDescription(treeView.SelectedNode.Text).ColorArray,
                    ((OColor) e.ChangedItem.Value).ToColor4(), null);
 }
 private void propertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     if (PropertyChanged != null)
     {
         PropertyChanged(_symbol);
     }
 }
Exemplo n.º 27
0
		protected override void OnPropertyValueChanged(PropertyValueChangedEventArgs args) {
			if (args == null) {
				Logging.LogNullError(nameof(args));
				return;
			}

			base.OnPropertyValueChanged(args);
			ASFConfig.Save();

			BotConfig botConfig = ASFConfig as BotConfig;
			if (botConfig != null) {
				if (!botConfig.Enabled) {
					return;
				}

				Tutorial.OnAction(Tutorial.EPhase.BotEnabled);
				if (!string.IsNullOrEmpty(botConfig.SteamLogin) && !string.IsNullOrEmpty(botConfig.SteamPassword)) {
					Tutorial.OnAction(Tutorial.EPhase.BotReady);
				}
				return;
			}

			GlobalConfig globalConfig = ASFConfig as GlobalConfig;
			if (globalConfig == null) {
				return;
			}

			if (globalConfig.SteamOwnerID != 0) {
				Tutorial.OnAction(Tutorial.EPhase.GlobalConfigReady);
			}
		}
Exemplo n.º 28
0
        void actionPropertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            if (actionsListView.SelectedItems.Count == 0)
                return;

            InstallerAction action = (InstallerAction)actionsListView.SelectedItems[0].Tag;
            actionsListView.SelectedItems[0].SubItems[1].Text = action.ActionDetails;
        }
Exemplo n.º 29
0
 private void propertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     var sceneObject = context.Instance as SceneObject;
     if (sceneObject != null)
     {
         sceneObject.UpdateAndRender();
     }
 }
Exemplo n.º 30
0
        private void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            var o = disenchantrixPropertyGrid.SelectedObject as ItemSettings;

            if(o != null) {
                o.Save();
            }
        }
 void volumesPropertyGrid_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     Sound.SFX sfx = (Client.Sound.SFX)Enum.Parse(typeof(Client.Sound.SFX), e.ChangedItem.Label);
     float newValue = (float)e.ChangedItem.Value;
     newValue = Common.Math.Clamp(newValue, 0, 1);
     if (soundManager != null)
         soundManager.SetSoundEffectBaseVolume(sfx, newValue);
 }
 private void OnPropertyValueChanged(object o,
                                     SWF.PropertyValueChangedEventArgs args)
 {
     if (args.ChangedItem == provider.ListItemProvider.ObjectItem)
     {
         RaiseAutomationPropertyChangedEvent();
     }
 }
Exemplo n.º 33
0
 protected override void OnPropertyValueChanged(PropertyValueChangedEventArgs e)
 {
     if (CommandRegister != null)
     {
         RegisterCommand(e);
     }
     base.OnPropertyValueChanged(e);
 }
Exemplo n.º 34
0
        private void propertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            mapPanel.Refresh();

            if (e.ChangedItem.PropertyDescriptor.Name == "Text")
            {
                UpdateList((Com.Delta.Print.Engine.Map.MapPoint)propertyGrid.SelectedObject);
            }
        }
Exemplo n.º 35
0
        private void propertyGridCriteria_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            double[] value=TriMeshColorByCriteria.Instance.SetColor(e.ChangedItem.Label, Mesh, criteriaInfo);

            ReSetDataGrid(value);

            GlobalSetting.DisplaySetting.DisplayMode = EnumDisplayMode.Basic;
            OnChanged(EventArgs.Empty);
        }
Exemplo n.º 36
0
 void propertyGrid_PropertyValueChanged(object sender, PropertyValueChangedEventArgs e)
 {
     // Fire our customized collection event...
     if (EnumValueCollectionEditor.MyPropertyValueChanged != null)
     {
         EnumValueCollectionEditor.MyPropertyValueChanged(this, e);
     }
     if (HelperEditor.HandlerInterface != null) HelperEditor.HandlerInterface.SetModified();
 }
Exemplo n.º 37
0
 void propertyGrid1_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     var obj = propertyGrid1.SelectedObject as ICardWrapper;
     if (obj == null)
         return;
     if (!objNodes.ContainsKey(obj.getCardObject()))
         return;
     objNodes[obj.getCardObject()].Text = obj.getCardObject().ID.ToString("X04") + " " + obj.getCardObject().Description;
 }
Exemplo n.º 38
0
        private void CurveConfigPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            CCurve Curve = (CCurve)CurveConfigPropertyGrid.SelectedObject;

            Curve.ComputeCaracteristicsParams();
            SpectrumPictureBox.Redraw();
            UpdateCurveComboBoxFromCurveList();
            CurveListComboBox.SelectedItem = CurveConfigPropertyGrid.SelectedObject;
        }
Exemplo n.º 39
0
        private void C_PropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            if (_CurSelectedButton != null)
            {
                ButtonTags thistag = (ButtonTags)_CurSelectedButton.Tag;

                this._CurSelectedButton.Text = thistag.filter.FilterName;
            }
        }
Exemplo n.º 40
0
        private void propertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            if (nodeSelected == null)
            {
                throw new NullReferenceException("nodeSelected is null");
            }

            nodeSelected.Text = ((ToolStripMenuItem)nodeSelected.Tag).Text;
        }
Exemplo n.º 41
0
        private void LegendItemPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            if (nChartControl1 == null)
            {
                return;
            }

            nChartControl1.Refresh();
        }
Exemplo n.º 42
0
 private void pgContainer_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     var propertySource = Selected as IDrawObjectProperty;
     if (propertySource != null)
     {
         ConfigToolContext.Instance.ToolDrawArea.RefreshToolDrawArea();
         propertySource.NotifyPropertyChanged(propertySource.Id);
     }
 }
Exemplo n.º 43
0
        private void C_PropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            Type type = e.OldValue.GetType();

            if (type == typeof(Webb.Reports.ExControls.Data.SummaryTypes))
            {
                this._MainView.CheckSummaryType();
            }
        }
Exemplo n.º 44
0
        //todo this validation is adhoc, get plugged in with TypeConverters etc.
        void pgridOptions_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            var vm = pgridOptions.SelectedObject as SettingsViewModel;

            var lastValidationError = vm.DequeueLastValidationError();
            if(e.ChangedItem.PropertyDescriptor.Name == lastValidationError.Item1) {
                showPropertyValidationWarning(lastValidationError.Item2);
                pgridOptions.Refresh();
            }
        }
Exemplo n.º 45
0
        private void propertyGrid1_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            ValidationRule vr   = this.propertyGrid1.SelectedObject as ValidationRule;
            Control        ctrl = this._ValidationComponents[this.ControlsDropDownList.SelectedItem] as Control;

            if (vr != null && ctrl != null & vr.IsRequired == true && !ctrl.Text.Equals(string.Empty) && !ctrl.Text.Equals(vr.InitialValue))
            {
                vr.InitialValue = ctrl.Text;
            }
        }
Exemplo n.º 46
0
        public bool UISetValue(System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            string v = (string)e.ChangedItem.Value;

            if (e.ChangedItem.Label.Equals(mItemDevice.Name))
            {
                this.Device = v;
            }
            return(true);
        }
Exemplo n.º 47
0
        protected override void HandlePropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            string name = e.ChangedItem.Label;

            if (name == "VelocityRangeType")
            {
                Instance = Instance;
                PropertyGrid.Refresh();
            }
        }
Exemplo n.º 48
0
 private void propertyGrid2_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
 {
     foreach (BSE.Windows.Forms.XPanderPanel xpanderPanel in this.xPanderPanelList3.XPanderPanels)
     {
         PropertyDescriptor propertyDescriptor = TypeDescriptor.GetProperties(xpanderPanel)[typeof(BSE.Windows.Forms.PanelStyle).Name];
         if (propertyDescriptor != null)
         {
             propertyDescriptor.SetValue(xpanderPanel, e.ChangedItem.Value);
         }
     }
 }
Exemplo n.º 49
0
        private void propertyGrid1_PropertyValueChanged_1(object s, PropertyValueChangedEventArgs e)
        {
            Console.WriteLine(s);

            if (e.ChangedItem.Label == "TerrainType") {
                MapManager.Current.SelectedMapTile.TerrainType = (TerrainData)e.ChangedItem.Value;
                MapManager.Current.SmoothTile(MapManager.Current.SelectedMapTile);
                MapManager.Current.SetTexturesTile(MapManager.Current.SelectedMapTile, 2);
                MapManager.Current.Dirty = true;
            }
        }
Exemplo n.º 50
0
 private void propertyGrid1_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     if (treeView1.SelectedNode == null)
     {
         return;
     }
     if (e.ChangedItem.Label == "Text")
     {
         treeView1.SelectedNode.Text = (string)e.ChangedItem.Value;
     }
 }
Exemplo n.º 51
0
        private void lightPropertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            // update preview
            lightPreview1.Refresh();

            // update sliders
            trackBar1.Value = (int)((editLighting.lights[listBox1.SelectedIndex].DirectionX + 1) * 100.0f);
            trackBar2.Value = (int)((editLighting.lights[listBox1.SelectedIndex].DirectionY + 1) * 100.0f);
            trackBar3.Value = (int)((editLighting.lights[listBox1.SelectedIndex].DirectionZ + 1) * 100.0f);

            changedEditing = true;
        }
Exemplo n.º 52
0
        /// <summary>プロパティ値変更時処理</summary>
        private void ctlPropertyList_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            var propertyObject = (PropertyObject)ctlPropertyList.SelectedObject;
            var command = propertyObject.Node.GetPropertyChangeCommand(e.ChangedItem, e.OldValue);

            if (command != null)
            {
                InvokeCommand(command);
            }

            InvokeCommand("RefreshSelectedNodeProperty");
        }
Exemplo n.º 53
0
        private void _pgMenu_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            switch (e.ChangedItem.Label)
            {
            case "Text":
            {
                _tvMenu.SelectedNode.Text = (string)e.ChangedItem.Value;
            } break;

            default: break;
            }
        }
Exemplo n.º 54
0
        private void SetStyleValue(BasicStyle style, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            Type type = typeof(BasicStyle);

            PropertyInfo property = type.GetProperty(e.ChangedItem.Label);

            if (property == null)
            {
                return;
            }

            property.SetValue(style, e.ChangedItem.Value, null);
        }
Exemplo n.º 55
0
        private void bookProperties_PropertyValueChanged(object s, PropertyValueChangedEventArgs e)
        {
            _modified = true;

            if (e.ChangedItem.Label == "Directory Name")
            {
                string dirname = e.ChangedItem.Value as string;
                _book.Files = System.IO.Directory.GetFiles(dirname);
                _book.IsDirectory = true;
                bookProperties.Refresh();

            }
        }
Exemplo n.º 56
0
        // update preview when properties change
        private void _propGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            // update preview
            ReportStyle style = _list.SelectedItem as ReportStyle;

            _preview.Image = style.GetPreview(true);

            // update list
            if (e.ChangedItem.PropertyDescriptor.Name == "Name")
            {
                int index = _list.SelectedIndex;
                _list.Items[index] = style;
            }

            // remember we're dirty
            _dirty = true;
        }
Exemplo n.º 57
0
 private void pGridMain_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     //处理重名的情况
     if (e.ChangedItem.Label == "Name")
     {
         if (e.ChangedItem.Value.ToString() != e.OldValue.ToString())
         {
             if (_CssList[e.ChangedItem.Value.ToString()] != null)
             {
                 MessageBox.Show("该名称已经存在,请重新命名。", "操作提示");
                 _CssList.GetCssByName(lstCssName.SelectedItem.ToString()).Name = e.OldValue.ToString();
             }
             lstCssName.Items.Insert(lstCssName.SelectedIndex, e.ChangedItem.Value.ToString());
             lstCssName.Items.Remove(lstCssName.SelectedItem);
         }
     }
 }
Exemplo n.º 58
0
        private void propertyGrid_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            if (OnPropertyValueChanged != null)
            {
                OnPropertyValueChanged(this, e);
            }
            object selObj = SelectedObject;

            if (selObj != null)
            {
                LocalizedObject lo = selObj as LocalizedObject;
                if (lo != null)
                {
                    app.DataChanged(lo.Object);
                }
            }
        }
Exemplo n.º 59
0
        /// <summary>
        /// Raises the <see cref="E:System.Windows.Forms.PropertyGrid.PropertyValueChanged"/> event.
        /// </summary>
        /// <param name="e">A <see cref="T:System.Windows.Forms.PropertyValueChangedEventArgs"/> that contains the event data.</param>
        protected override void OnPropertyValueChanged(System.Windows.Forms.PropertyValueChangedEventArgs e)
        {
            base.OnPropertyValueChanged(e);
            GridItem  gi = e.ChangedItem;
            ProxyInfo pi = this.SelectedObject as ProxyInfo;

            /*switch ( gi.Label ) {
             * case "Enabled":
             *  pi.Enabled = ( bool )gi.Value;
             *  break;
             * case "ExecuteOnUnload":
             *  pi.ExecuteOnUnload = ( bool )gi.Value;
             *  break;
             * case "ExecuteOnLoad":
             *  pi.ExecuteOnLoad = ( bool )gi.Value;
             *  break;
             * }*/
        }
Exemplo n.º 60
0
 private void pg_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
 {
     if (item == null)
     {
         return;
     }
     string[] n = e.ChangedItem.Label.Split(new char[] { ':' }, 2);
     if (n.Length > 0)
     {
         int v = Helper.StringToInt32(n[0], -1, 16);
         if (v >= 0)
         {
             item.PutValue(v, (ushort)((Ambertation.BaseChangeableNumber)e.ChangedItem.Value).Value);
             chgraw = true;
             UpdateNgbhItemsListView();
         }
     }
 }