예제 #1
0
 private void NotifyAllObjectRenamed(PlotObject value, string oldName)
 {
     foreach (PlotObject item in this)
     {
         item.ObjectRenamed(value, oldName);
     }
 }
예제 #2
0
 private void NotifyAllObjectAdded(PlotObject value)
 {
     foreach (PlotObject item in this)
     {
         item.ObjectAdded(value);
     }
 }
예제 #3
0
 private void HandleObjectRenamed(PlotObject value, string oldName)
 {
     if (this.ObjectRenamed != null)
     {
         this.ObjectRenamed(value, new PlotObjectRenamedEventArgs(value, oldName));
     }
 }
예제 #4
0
        protected override void SetupObjectBeforeAmbientControlBaseConnection(object value)
        {
            base.SetupObjectBeforeAmbientControlBaseConnection(value);
            PlotObject plotObject = value as PlotObject;

            if (this.BaseName != null && plotObject.Name == Const.EmptyString)
            {
                this.m_InitialSetup = true;
                int num = 0;
                foreach (PlotObject item in this)
                {
                    if (item.Name.ToUpper().StartsWith(this.BaseName.ToUpper()))
                    {
                        string s = item.Name.Substring(this.BaseName.Length);
                        if (double.TryParse(s, NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite, (IFormatProvider)CultureInfo.InvariantCulture, out double num2) && (int)num2 > num)
                        {
                            num = (int)num2;
                        }
                    }
                }
                plotObject.Name      = this.BaseName + " " + Convert2.ToString(num + 1);
                plotObject.TitleText = (value as PlotObject).Name;
            }
            else
            {
                this.m_InitialSetup = false;
            }
        }
예제 #5
0
 public override void ObjectRenamed(PlotObject value, string oldName)
 {
     base.ObjectRenamed(value, oldName);
     if (value is PlotDataView && oldName == this.m_DockDataViewName)
     {
         this.m_DockDataViewName = value.Name;
     }
 }
예제 #6
0
 public override void ObjectRemoved(PlotObject value)
 {
     base.ObjectRemoved(value);
     if (value == this.m_CachedDockDataView)
     {
         this.m_CachedDockDataView = null;
     }
 }
예제 #7
0
 public override void ObjectAdded(PlotObject value)
 {
     base.ObjectAdded(value);
     if (value is PlotDataView && value.Name == this.m_DockDataViewName)
     {
         this.m_CachedDockDataView = (value as PlotDataView);
     }
 }
예제 #8
0
 public override void ObjectRemoved(PlotObject value)
 {
     base.ObjectRemoved(value);
     if (value == this.m_CachedLegend)
     {
         this.m_CachedLegend = null;
     }
 }
예제 #9
0
 public override void ObjectAdded(PlotObject value)
 {
     base.ObjectAdded(value);
     if (value is PlotLegendBase && value.Name == this.m_LegendName)
     {
         this.m_CachedLegend = (value as PlotLegendBase);
     }
 }
예제 #10
0
 public override void ObjectRenamed(PlotObject value, string oldName)
 {
     base.ObjectRenamed(value, oldName);
     if (value is PlotChannelBase && oldName == this.m_ChannelName)
     {
         this.m_ChannelName = value.Name;
     }
 }
예제 #11
0
 public override void ObjectRemoved(PlotObject value)
 {
     base.ObjectRemoved(value);
     if (value == this.m_CachedChannel)
     {
         this.m_CachedChannel = null;
     }
 }
예제 #12
0
 public override void ObjectAdded(PlotObject value)
 {
     base.ObjectAdded(value);
     if (value is PlotChannelBase && value.Name == this.m_ChannelName)
     {
         this.m_CachedChannel = (value as PlotChannelBase);
     }
 }
예제 #13
0
 public override void ObjectAdded(PlotObject value)
 {
     base.ObjectAdded(value);
     if (value is PlotAxis && value.Name == this.m_DockStartAxisName)
     {
         this.m_CachedDockStartAxis = (value as PlotAxis);
     }
     else if (value is PlotAxis && value.Name == this.m_DockStopAxisName)
     {
         this.m_CachedDockStopAxis = (value as PlotAxis);
     }
 }
예제 #14
0
 public override void ObjectRemoved(PlotObject value)
 {
     base.ObjectRemoved(value);
     if (value == this.m_CachedDockStartAxis)
     {
         this.m_CachedDockStartAxis = null;
     }
     else if (value == this.m_CachedDockStopAxis)
     {
         this.m_CachedDockStopAxis = null;
     }
 }
예제 #15
0
 public override void ObjectRenamed(PlotObject value, string oldName)
 {
     base.ObjectRenamed(value, oldName);
     if (value is PlotAxis && oldName == this.m_DockStartAxisName)
     {
         this.m_DockStartAxisName = value.Name;
     }
     else if (value is PlotAxis && oldName == this.m_DockStopAxisName)
     {
         this.m_DockStopAxisName = value.Name;
     }
 }
예제 #16
0
 public override void ObjectAdded(PlotObject value)
 {
     base.ObjectAdded(value);
     if (value is PlotXAxis && value.Name == this.m_XAxisName)
     {
         this.m_CachedXAxis = (value as PlotXAxis);
     }
     else if (value is PlotYAxis && value.Name == this.m_YAxisName)
     {
         this.m_CachedYAxis = (value as PlotYAxis);
     }
 }
예제 #17
0
        int IComparer.Compare(object x, object y)
        {
            PlotObject plotObject  = x as PlotObject;
            PlotObject plotObject2 = y as PlotObject;

            if (plotObject == null)
            {
                throw new Exception("x is not a PlotObject object");
            }
            if (plotObject2 == null)
            {
                throw new Exception("y is not a PlotObject object");
            }
            return(plotObject.LayerWithSubLevel.CompareTo(plotObject2.LayerWithSubLevel));
        }
예제 #18
0
 public int IndexOf(PlotObject value)
 {
     return(this.m_List.IndexOf(value));
 }
예제 #19
0
 void IPlotObjectCollectionBase.NotifyAllObjectAdded(PlotObject value)
 {
     this.NotifyAllObjectAdded(value);
 }
예제 #20
0
 public PlotObjectRenamedEventArgs(PlotObject value, string oldName)
 {
     this.m_Object  = value;
     this.m_OldName = oldName;
 }
예제 #21
0
 public virtual void ObjectRenamed(PlotObject value, string oldName)
 {
 }
예제 #22
0
 public virtual void ObjectRemoved(PlotObject value)
 {
 }
예제 #23
0
 public virtual void ObjectAdded(PlotObject value)
 {
 }
예제 #24
0
 void IPlotObjectCollectionBase.HandleObjectRenamed(PlotObject value, string oldName)
 {
     this.HandleObjectRenamed(value, oldName);
 }
예제 #25
0
 void IPlotObjectCollectionBase.NotifyAllObjectRenamed(PlotObject value, string oldName)
 {
     this.NotifyAllObjectRenamed(value, oldName);
 }
예제 #26
0
 public int Add(PlotObject value)
 {
     return(this.m_List.Add(value));
 }