Example #1
0
		internal void raiseInitEvent(ChartObject item)
		{
			switch (item.getType())
			{
			case ItemType.Box:
				if (InitializeBox != null)
				{
					BoxEventArgs args = new BoxEventArgs(item as Box);
					InitializeBox(this, args);
				}
				break;
			case ItemType.ControlHost:
				if (InitializeControlHost != null)
				{
					ControlHostEventArgs args = new ControlHostEventArgs(item as ControlHost);
					InitializeControlHost(this, args);
				}
				break;
			case ItemType.Table:
				if (InitializeTable != null)
				{
					TableEventArgs args = new TableEventArgs(item as Table);
					InitializeTable(this, args);
				}
				break;
			case ItemType.Arrow:
				if (InitializeArrow != null)
				{
					ArrowEventArgs args = new ArrowEventArgs(item as Arrow);
					InitializeArrow(this, args);
				}
				break;
			}
		}
Example #2
0
		internal void fireItemPasted(ChartObject item)
		{
			switch (item.getType())
			{
				case ItemType.Box:
					if (BoxPasted != null)
					{
						Box box = item as Box;
						BoxEventArgs args = new BoxEventArgs(box);
						BoxPasted(this, args);
					}
					break;
				case ItemType.ControlHost:
					if (ControlHostPasted != null)
					{
						ControlHost host = item as ControlHost;
						ControlHostEventArgs args = new ControlHostEventArgs(host);
						ControlHostPasted(this, args);
					}
					break;
				case ItemType.Table:
					if (TablePasted != null)
					{
						Table table = item as Table;
						TableEventArgs args = new TableEventArgs(table);
						TablePasted(this, args);
					}
					break;
				case ItemType.Arrow:
					if (ArrowPasted != null)
					{
						Arrow arrow = item as Arrow;
						ArrowEventArgs args = new ArrowEventArgs(arrow);
						ArrowPasted(this, args);
					}
					break;
			}
		}
Example #3
0
		private void OnDocumentHostDeleted(object sender, ControlHostEventArgs e)
		{
			RefreshScales();
		}