예제 #1
0
 public void svcSendConfInfo(string from, string to, int confid, clsPageInfo pageinfo, string ipaddress)
 {
     if (EntsvcSendConfInfo != null)
     {
         EntsvcSendConfInfo(from, to, confid, pageinfo, ipaddress);
     }
 }
예제 #2
0
 public void svcSetSpecialMsgs(clsPageInfo objPageInfo)
 {
     if (EntsvcPageSetSpecialMsg != null)
     {
         EntsvcPageSetSpecialMsg(objPageInfo);
     }
 }
예제 #3
0
 public void svcSetSpecialMsg(clsPageInfo objPageInfo, string IPAddress)
 {
     if (EntsvcNetP2PPageSetSpecialMsg != null)
     {
         EntsvcNetP2PPageSetSpecialMsg(objPageInfo, IPAddress);
     }
 }
예제 #4
0
 public void LoadMeetingPage(clsPageInfo objPageInfo)
 {
     try
     {
         int pCnt = 0;
         for (pCnt = 0; pCnt < pageControl.Items.Count; pCnt++)
         {
             if (((VMuktiGrid.ctlPage.TabItem)pageControl.Items[pCnt]).OwnerID == objPageInfo.intOwnerID && ((VMuktiGrid.ctlPage.TabItem)pageControl.Items[pCnt]).OwnerPageIndex == objPageInfo.intOwnerPageIndex)
             {
                 pageControl.LoadMeetingPage(objPageInfo, pCnt);
                 break;
             }
         }
         if (pCnt == pageControl.Items.Count)
         {
             pageControl.LoadNewMeetingPage(objPageInfo);
         }
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "LoadMeetingPage()", "Controls\\VMuktiGrid\\ctlVmuktiGrid.cs");
     }
 }
예제 #5
0
        void TabControl_Drop(object sender, DragEventArgs e)
        {
            try
            {
                e.Handled = true;

                bool blnBuddyType = true;

                if (e.Data.GetData("VMukti.Presentation.Controls.CtlExpanderItem") != null && e.Data.GetData("VMukti.Presentation.Controls.CtlExpanderItem").GetType() == typeof(CtlExpanderItem))
                {
                    CtlExpanderItem elt = e.Data.GetData("VMukti.Presentation.Controls.CtlExpanderItem") as CtlExpanderItem;

                    #region Check whether it is module or buddy dropped

                    string[]      strTag = elt.Tag.ToString().Split(',');
                    List <string> lstTag = new List <string>();
                    for (int i = 0; i < strTag.Length; i++)
                    {
                        if (strTag[i] == "ModuleType")
                        {
                            blnBuddyType = false;
                            break;
                        }
                    }

                    #endregion

                    if (blnBuddyType && this.AddBuddy(((CtlExpanderItem)e.Data.GetData(typeof(CtlExpanderItem))).Caption, this.SelectedIndex))
                    {
                        clsPageInfo objPageInfo = new clsPageInfo();
                        objPageInfo.intPageID    = ((VMuktiGrid.ctlPage.TabItem) this.Parent).ObjectID;
                        objPageInfo.strPageTitle = ((VMuktiGrid.CustomMenu.ctlPgTabHeader)((VMuktiGrid.ctlPage.TabItem) this.Parent).Header).Title;

                        objPageInfo.intOwnerID = VMuktiAPI.VMuktiInfo.CurrentPeer.ID;
                        //objPageInfo.intOwnerPageIndex = ((VMuktiGrid.ctlPage.TabControl)((VMuktiGrid.ctlPage.TabItem)this.Parent).Parent).SelectedIndex;
                        objPageInfo.intOwnerPageIndex = ((VMuktiGrid.ctlPage.TabItem) this.Parent).OwnerPageIndex;

                        objPageInfo.strDropType = "OnTab";

                        List <clsTabInfo> lstTabInfos = new List <clsTabInfo>();
                        lstTabInfos.Add(new clsTabInfo());

                        lstTabInfos[lstTabInfos.Count - 1].intTabID    = ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).ObjectID;
                        lstTabInfos[lstTabInfos.Count - 1].strTabTitle = ((VMuktiGrid.CustomMenu.ctlPgTabHeader)((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).Header).Title;

                        List <string> lstBuddyList   = new List <string>();
                        StackPanel    stTabBuddyList = ((ctlMenu)((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).Template.FindName("objMenu", (VMuktiGrid.ctlTab.TabItem) this.SelectedItem)).objEMIBuddyList.objBuddyList.stBuddyPanel;
                        for (int i = 0; i < stTabBuddyList.Children.Count; i++)
                        {
                            lstBuddyList.Add(((VMuktiGrid.Buddy.ctlBuddy)stTabBuddyList.Children[i]).Title);
                        }
                        lstTabInfos[lstTabInfos.Count - 1].straTabBuddies = lstBuddyList.ToArray();
                        VMuktiGrid.CustomGrid.ctlGrid objSelectedGrid = (VMuktiGrid.CustomGrid.ctlGrid)((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).Content;
                        //lstTabInfos[lstTabInfos.Count - 1].intOwnerTabIndex = this.SelectedIndex;
                        lstTabInfos[lstTabInfos.Count - 1].intOwnerTabIndex = ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).OwnerTabIndex;
                        lstTabInfos[lstTabInfos.Count - 1].dblC1Width       = objSelectedGrid.LeftPanelContainer.ActualWidth;
                        lstTabInfos[lstTabInfos.Count - 1].dblC2Width       = objSelectedGrid.CentralPanelContainer.ActualWidth;
                        lstTabInfos[lstTabInfos.Count - 1].dblC3Width       = objSelectedGrid.RightPanelContainer.ActualWidth;

                        lstTabInfos[lstTabInfos.Count - 1].dblC4Height = objSelectedGrid.TopPanelContainer.ActualHeight;
                        lstTabInfos[lstTabInfos.Count - 1].dblC5Height = objSelectedGrid.BottomPanelContainer.ActualHeight;

                        List <clsPodInfo> lstPodInfo = new List <clsPodInfo>();

                        ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).NoOfPODs = 0;
                        for (int pCnt = 0; pCnt < objSelectedGrid.LeftPanelContainer.Items.Count; pCnt++)
                        {
                            if (objSelectedGrid.LeftPanelContainer.Items[pCnt].GetType() == typeof(VMuktiGrid.CustomGrid.ctlPOD))
                            {
                                lstPodInfo.Add(new clsPodInfo());
                                fncGetPodInfo(lstPodInfo, lstPodInfo.Count - 1, ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.LeftPanelContainer.Items[pCnt]));
                                lstPodInfo[lstPodInfo.Count - 1].intColumnNumber = 1;

                                lstBuddyList.Clear();
                                StackPanel stPodBuddyList = ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.LeftPanelContainer.Items[pCnt]).objBuddyList.stPanel;
                                for (int i = 0; i < stPodBuddyList.Children.Count; i++)
                                {
                                    if (stPodBuddyList.Children[i].GetType() == typeof(VMuktiGrid.Buddy.ctlBuddy))
                                    {
                                        lstBuddyList.Add(((VMuktiGrid.Buddy.ctlBuddy)stPodBuddyList.Children[i]).Title);
                                    }
                                }
                                lstPodInfo[lstPodInfo.Count - 1].straPodBuddies = lstBuddyList.ToArray();

                                ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).NoOfPODs++;
                            }
                        }

                        for (int pCnt = 0; pCnt < objSelectedGrid.CentralPanelContainer.Items.Count; pCnt++)
                        {
                            if (objSelectedGrid.CentralPanelContainer.Items[pCnt].GetType() == typeof(VMuktiGrid.CustomGrid.ctlPOD))
                            {
                                lstPodInfo.Add(new clsPodInfo());
                                fncGetPodInfo(lstPodInfo, lstPodInfo.Count - 1, ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.CentralPanelContainer.Items[pCnt]));

                                lstPodInfo[lstPodInfo.Count - 1].intColumnNumber = 2;
                                lstBuddyList.Clear();
                                StackPanel stPodBuddyList = ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.CentralPanelContainer.Items[pCnt]).objBuddyList.stPanel;
                                for (int i = 0; i < stPodBuddyList.Children.Count; i++)
                                {
                                    if (stPodBuddyList.Children[i].GetType() == typeof(VMuktiGrid.Buddy.ctlBuddy))
                                    {
                                        lstBuddyList.Add(((VMuktiGrid.Buddy.ctlBuddy)stPodBuddyList.Children[i]).Title);
                                    }
                                }
                                lstPodInfo[lstPodInfo.Count - 1].straPodBuddies = lstBuddyList.ToArray();

                                ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).NoOfPODs++;
                            }
                        }

                        for (int pCnt = 0; pCnt < objSelectedGrid.RightPanelContainer.Items.Count; pCnt++)
                        {
                            if (objSelectedGrid.RightPanelContainer.Items[pCnt].GetType() == typeof(VMuktiGrid.CustomGrid.ctlPOD))
                            {
                                lstPodInfo.Add(new clsPodInfo());
                                fncGetPodInfo(lstPodInfo, lstPodInfo.Count - 1, ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.RightPanelContainer.Items[pCnt]));

                                lstPodInfo[lstPodInfo.Count - 1].intColumnNumber = 3;

                                lstBuddyList.Clear();
                                StackPanel stPodBuddyList = ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.RightPanelContainer.Items[pCnt]).objBuddyList.stPanel;
                                for (int i = 0; i < stPodBuddyList.Children.Count; i++)
                                {
                                    if (stPodBuddyList.Children[i].GetType() == typeof(VMuktiGrid.Buddy.ctlBuddy))
                                    {
                                        lstBuddyList.Add(((VMuktiGrid.Buddy.ctlBuddy)stPodBuddyList.Children[i]).Title);
                                    }
                                }
                                lstPodInfo[lstPodInfo.Count - 1].straPodBuddies = lstBuddyList.ToArray();

                                ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).NoOfPODs++;
                            }
                        }

                        for (int pCnt = 0; pCnt < objSelectedGrid.TopPanelContainer.Items.Count; pCnt++)
                        {
                            if (objSelectedGrid.TopPanelContainer.Items[pCnt].GetType() == typeof(VMuktiGrid.CustomGrid.ctlPOD))
                            {
                                lstPodInfo.Add(new clsPodInfo());
                                fncGetPodInfo(lstPodInfo, lstPodInfo.Count - 1, ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.TopPanelContainer.Items[pCnt]));

                                lstPodInfo[lstPodInfo.Count - 1].intColumnNumber = 4;
                                lstBuddyList.Clear();
                                StackPanel stPodBuddyList = ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.TopPanelContainer.Items[pCnt]).objBuddyList.stPanel;
                                for (int i = 0; i < stPodBuddyList.Children.Count; i++)
                                {
                                    if (stPodBuddyList.Children[i].GetType() == typeof(VMuktiGrid.Buddy.ctlBuddy))
                                    {
                                        lstBuddyList.Add(((VMuktiGrid.Buddy.ctlBuddy)stPodBuddyList.Children[i]).Title);
                                    }
                                }
                                lstPodInfo[lstPodInfo.Count - 1].straPodBuddies = lstBuddyList.ToArray();

                                ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).NoOfPODs++;
                            }
                        }

                        for (int pCnt = 0; pCnt < objSelectedGrid.BottomPanelContainer.Items.Count; pCnt++)
                        {
                            if (objSelectedGrid.TopPanelContainer.Items[pCnt].GetType() == typeof(VMuktiGrid.CustomGrid.ctlPOD))
                            {
                                lstPodInfo.Add(new clsPodInfo());
                                fncGetPodInfo(lstPodInfo, lstPodInfo.Count - 1, ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.BottomPanelContainer.Items[pCnt]));

                                lstPodInfo[lstPodInfo.Count - 1].intColumnNumber = 5;

                                lstBuddyList.Clear();
                                StackPanel stPodBuddyList = ((VMuktiGrid.CustomGrid.ctlPOD)objSelectedGrid.BottomPanelContainer.Items[pCnt]).objBuddyList.stPanel;
                                for (int i = 0; i < stPodBuddyList.Children.Count; i++)
                                {
                                    if (stPodBuddyList.Children[i].GetType() == typeof(VMuktiGrid.Buddy.ctlBuddy))
                                    {
                                        lstBuddyList.Add(((VMuktiGrid.Buddy.ctlBuddy)stPodBuddyList.Children[i]).Title);
                                    }
                                }
                                lstPodInfo[lstPodInfo.Count - 1].straPodBuddies = lstBuddyList.ToArray();

                                ((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).NoOfPODs++;
                            }
                        }

                        lstTabInfos[lstTabInfos.Count - 1].objaPods = lstPodInfo.ToArray();
                        objPageInfo.objaTabs = lstTabInfos.ToArray();

                        objPageInfo.strFrom = VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName;
                        objPageInfo.strTo   = ((CtlExpanderItem)e.Data.GetData(typeof(CtlExpanderItem))).Caption;
                        objPageInfo.strMsg  = "OPEN_PAGE";

                        this.SetMaxCounter(((VMuktiGrid.ctlTab.TabItem) this.SelectedItem).NoOfPODs, ((CtlExpanderItem)e.Data.GetData(typeof(CtlExpanderItem))).Caption);

                        if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithNetP2P || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.BootStrap || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.SuperNode)
                        {
                            App.chNetP2PSuperNodeChannel.svcSetSpecialMsg(objPageInfo, VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP);
                        }
                        else
                        {
                            try
                            {
                                App.chHttpSuperNodeService.svcSetSpecialMsgs(objPageInfo);
                            }
                            catch (System.ServiceModel.EndpointNotFoundException ex)
                            {
                                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "TabControl_Drop()", "Controls\\VMuktiGrid\\Tab\\TabControl.cs");
                                VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);

                                App.chHttpSuperNodeService.svcSetSpecialMsgs(objPageInfo);
                            }
                            catch (System.ServiceModel.CommunicationException ex1)
                            {
                                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex1, "TabControl_Drop()--1", "Controls\\VMuktiGrid\\Tab\\TabControl.cs");
                                VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);

                                App.chHttpSuperNodeService.svcSetSpecialMsgs(objPageInfo);
                            }
                        }

                        //((ctlVMuktiGrid)((Grid)((VMuktiGrid.ctlPage.TabControl)((VMuktiGrid.ctlPage.TabItem)this.Parent).Parent).Parent).Parent).fncChannelSetPageMsg(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, ((VMukti.Presentation.Controls.CtlExpanderItem)e.Data.GetData(typeof(VMukti.Presentation.Controls.CtlExpanderItem))).Caption, "OPEN_PAGE", lstModuleInfo);
                        //VMukti.App.chNetP2PSuperNodeChannel.svcAddDraggedBuddy
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "TabControl_Drop()--2", "Controls\\VMuktiGrid\\Tab\\TabControl.cs");
            }
        }
예제 #6
0
 public void svcSetSpecialMsgs(string from, List <string> to, string msg, clsModuleInfo objModInfo, clsPageInfo objPageInfo)
 {
     if (EntsvcSetSpecialMsgBuddiesClick != null)
     {
         EntsvcSetSpecialMsgBuddiesClick(from, to, msg, objModInfo, objPageInfo);
     }
 }