internal void AddModule(ModuleList list)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = pd.GetTab(CurrentReference);

            PortalDefinition.Module m = new PortalDefinition.Module();
            m.reference = Guid.NewGuid().ToString();

            if (list == ModuleListCtrl_Left)
            {
                t.left.Add(m);
            }
            else if (list == ModuleListCtrl_Middle)
            {
                t.middle.Add(m);
            }
            else if (list == ModuleListCtrl_Right)
            {
                t.right.Add(m);
            }

            pd.Save();

            // Rebind
            LoadData(CurrentReference);

            EditModule(m.reference);
        }
        internal void MoveModuleDown(int idx, ModuleList list)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = pd.GetTab(CurrentReference);

            ArrayList a = null;

            if (list == ModuleListCtrl_Left)
            {
                a = t.left;
            }
            else if (list == ModuleListCtrl_Middle)
            {
                a = t.middle;
            }
            else if (list == ModuleListCtrl_Right)
            {
                a = t.right;
            }

            if (idx >= a.Count - 1)
            {
                return;
            }

            PortalDefinition.Module m = (PortalDefinition.Module)a[idx];
            a.RemoveAt(idx);
            a.Insert(idx + 1, m);

            pd.Save();

            // Rebind
            LoadData(CurrentReference);
        }
Example #3
0
        override public void AddModule(ModuleList list)
        {
            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = CurrentTab;

            PortalDefinition.Module m = PortalDefinition.Module.Create();

            if (list == ModuleListCtrl_Left)
            {
                t.left.Add(m);
            }
            else if (list == ModuleListCtrl_Middle)
            {
                t.middle.Add(m);
            }
            else if (list == ModuleListCtrl_Right)
            {
                t.right.Add(m);
            }

            pd.Save();

            // Rebind
            LoadData(CurrentTab);

            EditModule(m.reference);
        }
Example #4
0
//		internal void MoveModuleUp(int idx, ModuleList list)
        override public void MoveModuleUp(int idx, ModuleList list)
        {
            if (idx <= 0)
            {
                return;
            }

            PortalDefinition pd = PortalDefinition.Load();

            PortalDefinition.Tab t = CurrentTab;

            ArrayList a = null;

            if (list == ModuleListCtrl_Left)
            {
                a = t.left;
            }
            else if (list == ModuleListCtrl_Middle)
            {
                a = t.middle;
            }
            else if (list == ModuleListCtrl_Right)
            {
                a = t.right;
            }

            PortalDefinition.Module m = (PortalDefinition.Module)a[idx];
            a.RemoveAt(idx);
            a.Insert(idx - 1, m);

            pd.Save();

            // Rebind
            LoadData(CurrentTab);
        }
Example #5
0
		override public   void AddModule(ModuleList list)
		{
			PortalDefinition pd = PortalDefinition.Load();
			PortalDefinition.Tab t = CurrentTab;

			PortalDefinition.Module m = PortalDefinition.Module.Create();

			if(list == ModuleListCtrl_Left)
			{
				t.left.Add(m);
			}
			else if(list == ModuleListCtrl_Middle)
			{
				t.middle.Add(m);
			} 
			else if(list == ModuleListCtrl_Right)
			{
				t.right.Add(m);
			}

			pd.Save();

			// Rebind
			LoadData(CurrentTab);

			EditModule(m.reference);
		}
Example #6
0
//		internal void MoveModuleDown(int idx, ModuleList list)
		override public   void MoveModuleDown(int idx, ModuleList list)
		{
			PortalDefinition pd = PortalDefinition.Load();
			PortalDefinition.Tab t = CurrentTab;

			ArrayList a = null;

			if(list == ModuleListCtrl_Left)
			{
				a = t.left;
			}
			else if(list == ModuleListCtrl_Middle)
			{
				a = t.middle;
			} 
			else if(list == ModuleListCtrl_Right)
			{
				a = t.right;
			}

			if(idx >= a.Count-1) return;

			PortalDefinition.Module m = (PortalDefinition.Module)a[idx];
			a.RemoveAt(idx);
			a.Insert(idx + 1, m);

			pd.Save();

			// Rebind
			LoadData(CurrentTab);
		}
Example #7
0
 abstract public void MoveModuleDown(int idx, ModuleList list);
Example #8
0
 abstract public void AddModule(ModuleList list);
Example #9
0
	    abstract public  void MoveModuleDown(int idx, ModuleList list);
Example #10
0
	    abstract public  void AddModule(ModuleList list);