Ejemplo n.º 1
0
		//-------------------------------------------------------------------------------------
		///
		protected override void AsyncTaskDoneBody(AsyncTask task)
		{
			#region MainMenu
			if(task.TaskName == "MainMenu")
			{
				_menu = (PulsarMainMenu)task.Result;
				ftvTree.Tree = _menu;
			}
			#endregion MainMenu
			#region Save
			if(task.TaskName == "Save")
			{
				//ITreeItem sel = ftvTree.SelectedNodeItem;
				//ftvTree.Se
			}
			#endregion Save
		}
Ejemplo n.º 2
0
		//-------------------------------------------------------------------------------------
		#region << Navigator and TabViewer Handlers and Methods>>
		private void NavigatorAddSubItems(PulsarMainMenu menu, FormInfo child,
																																					ToolStripItemCollection col)
		{
			TreeItem<FormInfo> i = menu[child];
			ToolStripItem item;
			if (i.HasChildren == false)
			{
				if (child.Caption == "-")
				{
					item = new ToolStripSeparator();
					item.Name = child.SD.ToString();
				}
				else
				{
					if (i.Level > 1)
						item = new ToolStripMenuItem();
					else
						item = new ToolStripButton();
					item.Image = child.Image == null ? global::Sim.Shell.Properties.Resources.Point_Shadow :
																																								GetResourceImage(child.Image);
					item.Name = child.SD.ToString();
					item.Text = child.Caption;
					item.Tag = child;
				}
			}
			else
			{
				item = new ToolStripDropDownButton();
				((ToolStripDropDownButton)item).DropDownItemClicked +=
						new ToolStripItemClickedEventHandler(navigator1.ToolStrips_ItemClicked);
				item.Image = child.Image == null ? global::Sim.Shell.Properties.Resources.Arrow_Gray : GetResourceImage(child.Image);
				item.Name = child.SD.ToString();
				item.Text = child.Caption;
				((ToolStripDropDownButton)item).ShowDropDownArrow = false;
				foreach(TreeItem<FormInfo> ch in i.Children.OrderBy(x => x, PulsarMainMenu.PulsarMainMenuSorter.Default))
					NavigatorAddSubItems(menu, ch.Object, ((ToolStripDropDownButton)item).DropDownItems);
			}
			col.Add(item);
		}
Ejemplo n.º 3
0
		//-------------------------------------------------------------------------------------
		/// <summary>
		/// 
		/// </summary>
		/// <param name="task"></param>
		protected override void AsyncTaskDoneBody(AsyncTask task)
		{
			#region Persons
			if(task.TaskName == "Persons")
			{
				users = (Persons)task.Result;
				comboBoxUsers.Items.Add(new ComboBoxItem<Person>(null, " (Bсе)"));
				foreach(Person u in users)
					comboBoxUsers.Items.Add(new ComboBoxItem<Person>(u));
			}
			#endregion Persons
			#region Security
			if(task.TaskName == "Security")
			{
				pSec = (PulsarSecurity)task.Result;
			}
			#endregion Security
			#region MainMenu
			if(task.TaskName == "MainMenu")
			{
				mMenu = (PulsarMainMenu)task.Result;
			}
			#endregion MainMenu
			#region SetACEsForSD
			if(task.TaskName == "SetACEsForSD")
			{
				ValuesPair<OID, PList<ACE>> i = (ValuesPair<OID, PList<ACE>>)task.Tag;
				pSec.SetACEsForSD(i.Value1, i.Value2);
				btnCancel_Click(btnCancel, EventArgs.Empty);
				RecheckUserAccess();
			}
			#endregion SetACEsForSD
		}