Example #1
0
 void pgHome_EntsvcSetSpecialMsgBuddiesClick(string from, List<string> to, string msg, clsModuleInfo objModInfo, string IPAddress, clsPageInfo objPageInfo)
 {
     try
     {
         if (to.Contains(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName))
         {
             objModInfo.lstUsersDropped.Remove(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName);
             objModInfo.lstUsersDropped.Add(from);
             this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, objDelSetSpecialMsgBuddiesClick, objModInfo, objPageInfo);
         }
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "pgHome_EntsvcSetSpecialMsgBuddiesClick()", "pgHome.xaml.cs");
     }
 }
Example #2
0
        public void HttpRemoveDraggedBuddy(string from, string[] to, string msg, clsModuleInfo objModInfo)
        {
            try
            {

            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "HttpRemoveDraggedBuddy()--delGetMessage", "pgHome.xaml.cs");
            }
        }
Example #3
0
 void delSetSpecialMsgBuddiesClick(clsModuleInfo objModInfo, clsPageInfo objPageInfo)
 {
     try
     {
         #region popup
         FncShowPopup(objModInfo.lstUsersDropped[objModInfo.lstUsersDropped.Count - 1], objModInfo);
         #endregion
         objVMuktiGrid.LoadMeetingPage(objPageInfo);
         //objVMuktiGrid.LoadNewMultipleBuddyPage(objModInfo, objPageInfo);
         if (((WindowState)(this.Parent.GetValue(Window.WindowStateProperty))) == WindowState.Minimized)
         {
             Beep(750, 300);
         }
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "delSetSpecialMsgBuddiesClick()", "pgHome.xaml.cs");
     }
 }
        public void LoadNewMultipleBuddyPage(clsModuleInfo objModInfo)
        {
            try
            {
               


                if (pageControl.Items.Count == 0)
                {
            pageControl.LoadMultipleBuddyPage(objModInfo);
        }
                else
                {
                    ((VMuktiGrid.CustomGrid.ctlGrid)((VMuktiGrid.ctlTab.TabItem)((VMuktiGrid.ctlTab.TabControl)((VMuktiGrid.ctlPage.TabItem)(pageControl.SelectedItem)).Content).SelectedItem).Content).LoadMultipleBuddyGrid(objModInfo);

                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "LoadMultipleBuddyPage()--2", "Controls\\VMuktiGrid\\ctlVmuktiGrid.cs");
            }
        }
 public void svcAddDraggedBuddy(string from, string to, string msg, clsModuleInfo objModInfo, string IPAddress)
 {
     if (EntsvcAddDraggedBuddy != null)
     {
         EntsvcAddDraggedBuddy(from, to, msg, objModInfo, IPAddress);
     }
 }
Example #6
0
        void pgHome_EntsvcSetSpecialMsg(string from, string to, string msg, clsModuleInfo objModInfo, string IPAddress)
        {
            try
            {
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName == to)
                {

                    if (((WindowState)(this.Parent.GetValue(Window.WindowStateProperty))) == WindowState.Minimized)
                    {
                        ((Window)this.Parent).BringIntoView();
                        Beep(750, 300);
                    }

                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "pgHome_EntsvcSetSpecialMsg()", "pgHome.xaml.cs");
            }
        }
Example #7
0
 public void delRemoveDraggedBuddy(clsModuleInfo objModInfo, string from)
 {
     try
     {
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "delRemoveDraggedBuddy()", "pgHome.xaml.cs");
     }
 }
Example #8
0
        void InformMultipleBuddy()
        {
            //if condition only for online buddies

            for (int onlineBuddyCnt = 0; onlineBuddyCnt < onlineBuddy.Count; onlineBuddyCnt++)
            {
                this.AddBuddy(onlineBuddy[onlineBuddyCnt]);
            }
            if (onlineBuddy.Count > 0)
            {
                VMuktiGrid.ctlPage.TabItem objSelectedPage = ((VMuktiGrid.ctlPage.TabItem)((VMuktiGrid.ctlTab.TabControl)((VMuktiGrid.ctlTab.TabItem)((ctlGrid)((Grid)((ItemsControl)this.Parent).Parent).Parent).Parent).Parent).Parent);
                VMuktiGrid.ctlTab.TabItem objSelectedTab = ((VMuktiGrid.ctlTab.TabItem)((ctlGrid)((Grid)((ItemsControl)this.Parent).Parent).Parent).Parent);

                List<string> lstBuddyList = new List<string>();
                StackPanel stPodBuddyList = this.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);
                    }
                }

                clsModuleInfo objModInfo = new clsModuleInfo();
                objModInfo.intModuleId = this.ModuleID;
                objModInfo.strDropType = "OnPod";
                objModInfo.strModuleName = this.Title;
                objModInfo.strPageid = objSelectedPage.ObjectID.ToString();
                objModInfo.strPodid = objSelectedTab.ObjectID.ToString();
                objModInfo.strUri = this.WCFUri;
                objModInfo.ModPermissions = this._arrPermissionValue;
                objModInfo.lstUsersDropped = this.onlineBuddy;

                clsPageInfo objPageInfo = new clsPageInfo();
                objPageInfo.intPageID = objSelectedPage.ObjectID;
                objPageInfo.strPageTitle = ((VMuktiGrid.CustomMenu.ctlPgTabHeader)objSelectedPage.Header).Title;
                if (objSelectedPage.OwnerID != VMuktiAPI.VMuktiInfo.CurrentPeer.ID)
                {
                    objPageInfo.intOwnerID = objSelectedPage.OwnerID;
                    objPageInfo.intOwnerPageIndex = objSelectedPage.OwnerPageIndex;
                }
                else
                {
                    objPageInfo.intOwnerID = VMuktiAPI.VMuktiInfo.CurrentPeer.ID;
                    objPageInfo.intOwnerPageIndex = objSelectedPage.OwnerPageIndex;
                }
                //objPageInfo.strDropType = "OnPod";
                objPageInfo.strDropType = "OnBuddyClick";

                List<clsTabInfo> lstTabInfos = new List<clsTabInfo>();
                lstTabInfos.Add(new clsTabInfo());
                int tabinfoscount = lstTabInfos.Count - 1;
                lstTabInfos[tabinfoscount].intTabID = objSelectedTab.ObjectID;
                lstTabInfos[tabinfoscount].strTabTitle = ((VMuktiGrid.CustomMenu.ctlPgTabHeader)objSelectedTab.Header).Title;
                VMuktiGrid.CustomGrid.ctlGrid objSelectedGrid = (VMuktiGrid.CustomGrid.ctlGrid)objSelectedTab.Content;

                lstTabInfos[tabinfoscount].intOwnerTabIndex = objSelectedTab.OwnerTabIndex;
                lstTabInfos[tabinfoscount].dblC1Width = objSelectedGrid.LeftPanelContainer.ActualWidth;
                lstTabInfos[tabinfoscount].dblC2Width = objSelectedGrid.CentralPanelContainer.ActualWidth;
                lstTabInfos[tabinfoscount].dblC3Width = objSelectedGrid.RightPanelContainer.ActualWidth;
                lstTabInfos[tabinfoscount].dblC4Height = objSelectedGrid.TopPanelContainer.ActualHeight;
                lstTabInfos[tabinfoscount].dblC5Height = objSelectedGrid.BottomPanelContainer.ActualHeight;

                List<clsPodInfo> lstPodInfo = new List<clsPodInfo>();
                lstPodInfo.Add(new clsPodInfo());
                lstPodInfo[lstPodInfo.Count - 1].intModuleId = this.ModuleID;
                lstPodInfo[lstPodInfo.Count - 1].strPodTitle = this.Title;
                lstPodInfo[lstPodInfo.Count - 1].strUri = this.WCFUri;
                lstPodInfo[lstPodInfo.Count - 1].intColumnNumber = this.ColNo;
                if (this.ColNo == 1)
                {
                    this.OwnerPodIndex = objSelectedGrid.LeftPanelContainer.Items.Count;
                }
                else if (this.ColNo == 2)
                {
                    this.OwnerPodIndex = objSelectedGrid.CentralPanelContainer.Items.Count;
                }
                else if (this.ColNo == 3)
                {
                    this.OwnerPodIndex = objSelectedGrid.RightPanelContainer.Items.Count;
                }

                lstPodInfo[lstPodInfo.Count - 1].intOwnerPodIndex = this.OwnerPodIndex;                
                lstBuddyList.Clear();
                lstPodInfo[lstPodInfo.Count - 1].straPodBuddies = lstBuddyList.ToArray();                
                lstTabInfos[lstTabInfos.Count - 1].objaPods = lstPodInfo.ToArray();

                objPageInfo.objaTabs = lstTabInfos.ToArray();
                objPageInfo.strFrom = VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName;
                //objPageInfo.strTo = ((VMukti.Presentation.Controls.CtlExpanderItem)e.Data.GetData(typeof(VMukti.Presentation.Controls.CtlExpanderItem))).Caption;
                objPageInfo.strTo = this.onlineBuddy[0].ToString();
                objPageInfo.strMsg = "OPEN_PAGE";

                //this.SetMaxCounter(1, ((VMukti.Presentation.Controls.CtlExpanderItem)e.Data.GetData(typeof(VMukti.Presentation.Controls.CtlExpanderItem))).Caption);
                this.SetMaxCounter(1, this.onlineBuddy[0].ToString());

                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithNetP2P || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.BootStrap || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.SuperNode)
                {
                    //VMukti.App.chNetP2PSuperNodeChannel.svcSetSpecialMsg(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo, VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP);
                    VMukti.App.chNetP2PSuperNodeChannel.svcSetSpecialMsg(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo, VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP, objPageInfo);
                }
                else
                {
                    try
                    {
                        //VMukti.App.chHttpSuperNodeService.svcSetSpecialMsgs(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo);
                        VMukti.App.chHttpSuperNodeService.svcSetSpecialMsgs(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo, objPageInfo);
                    }
                    catch (System.ServiceModel.EndpointNotFoundException ex)
                    {
                        VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "InformMultipleBuddy()", "Controls\\VMuktiGrid\\Grid\\ctlPOD.xaml.cs");                        
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        //VMukti.App.chHttpSuperNodeService.svcSetSpecialMsgs(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo);
                        VMukti.App.chHttpSuperNodeService.svcSetSpecialMsgs(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo,objPageInfo);
                    }
                    catch (System.ServiceModel.CommunicationException ex)
                    {
                        VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "InformMultipleBuddy--2", "Controls\\VMuktiGrid\\Grid\\ctlPOD.xaml.cs");                        
                        VMuktiAPI.VMuktiHelper.CallEvent("GetSuperNodeIP", null, null);
                        //VMukti.App.chHttpSuperNodeService.svcSetSpecialMsgs(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo);
                        VMukti.App.chHttpSuperNodeService.svcSetSpecialMsgs(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, onlineBuddy, "OPEN_PAGE4MultipleBuddies", objModInfo,objPageInfo);
                    }

                }
            }
        }
 public void svcSetSpecialMsg(string from, string to, string msg, clsModuleInfo objModInfo, string IPAddress)
 {
     if (EntsvcNetP2PSetSpecialMsg != null)
     {
         EntsvcNetP2PSetSpecialMsg(from, to, msg, objModInfo, IPAddress);
     }
 }
 public void svcSetSpecialMsgs(string from, List<string> to, string msg, clsModuleInfo objModInfo)
 {
     if (EntsvcSetSpecialMsg4MultipleBuddies != null)
     {
         EntsvcSetSpecialMsg4MultipleBuddies(from, to, msg, objModInfo);
     }
 }
Example #11
0
        //Call this method when closing page or tab
        public void btnCloseFromPage_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (this.grdBody.Children.Count >= 2)
                {
                    MethodInfo mi = this.grdBody.Children[1].GetType().GetMethod("ClosePod");
                    if (mi != null)
                    {
                        mi.Invoke(this.grdBody.Children[1], null);
                    }


                    if (sender != null)
                    {
                        for (int i = 0; i < this.objBuddyList.stPanel.Children.Count; i++)
                        {
                            if (this.objBuddyList.stPanel.Children[i].GetType() == typeof(ctlBuddy))
                            {
                                if (VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName != ((ctlBuddy)this.objBuddyList.stPanel.Children[i]).Title)
                                {
                                    lstUsersDropped.Add(((ctlBuddy)this.objBuddyList.stPanel.Children[i]).Title);
                                }
                            }
                        }
                        if (this.lstUsersDropped.Count > 0)
                        {
                            clsModuleInfo cmi = new clsModuleInfo();
                            cmi.strPageid = ((VMuktiGrid.ctlPage.TabItem)((VMuktiGrid.ctlTab.TabControl)((VMuktiGrid.ctlTab.TabItem)((ctlGrid)((Grid)((ItemsControl)this.Parent).Parent).Parent).Parent).Parent).Parent).ObjectID.ToString();
                            cmi.strTabid = ((VMuktiGrid.ctlTab.TabItem)((ctlGrid)((Grid)((ItemsControl)this.Parent).Parent).Parent).Parent).ObjectID.ToString();
                            cmi.strPodid = this.ObjectID.ToString();
                            cmi.strDropType = "Pod Type";

                            try
                            {
                                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.NodeWithNetP2P || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.BootStrap || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == VMuktiAPI.PeerType.SuperNode)
                                {
                                    App.chNetP2PSuperNodeChannel.svcSetRemoveDraggedBuddy(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, lstUsersDropped, "CLOSE MODULE", cmi, VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP);
                                }
                                else
                                {
                                    App.chHttpSuperNodeService.svcSetRemoveDraggedBuddy(VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName, lstUsersDropped, "CLOSE MODULE", cmi);
                                }
                            }
                            catch (Exception ex)
                            {
                                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "btnClose_Click()", "Controls\\VMuktiGrid\\Grid\\ctlPOD.xaml.cs");
                            }
                        }
                    }
                }

                if (ObjectID != int.MinValue)
                {
                    ((VMuktiGrid.CustomGrid.ctlGrid)((Grid)((ItemsControl)this.Parent).Parent).Parent).DeletePOD(ObjectID);
                }


                // ((ItemsControl)this.Parent).Items.Remove(this);
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "btnCloseFromPage_Click()", "Controls\\VMuktiGrid\\Grid\\ctlPOD.xaml.cs");
            }

        }
 public void svcSetSpecialMsgs(string from, string to, string msg, clsModuleInfo objModInfo)
 {
     if (EntsvcSetSpecialMsg != null)
     {
         EntsvcSetSpecialMsg(from, to, msg, objModInfo);
     }
 }
Example #13
0
        public ctlTab.TabControl LoadMultipleBuddyTab(clsModuleInfo objModInfo)
        {

            try
            {
                ctlTab.TabControl objTabControl = new ctlTab.TabControl();
                objTabControl.SetValue(Grid.RowProperty, 1);
                objTabControl.TabItemMinWidth = 150;
                objTabControl.TabItemMaxWidth = 300;
                objTabControl.TabItemMinHeight = 30;
                objTabControl.TabItemMaxHeight = 50;
                objTabControl.VerticalAlignment = VerticalAlignment.Top;
                objTabControl.Margin = new Thickness(5);


                ctlTab.TabItem objTabItem = new ctlTab.TabItem();
                objTabItem.Width = 250;
                objTabItem.MinWidth = 250;
                objTabItem.MaxWidth = 250;
                objTabItem.OwnerTabIndex = VMukti.App.tabCounter++;
                //TextBlock txtTabBlock = new TextBlock();
                //txtTabBlock.Text = "New Tab - 0";
                objTabItem.ObjectID = -1;
                objTabItem.IsSaved = false;

                ctlPgTabHeader objPgTabHeader = new ctlPgTabHeader();
                objPgTabHeader.Title = "New Tab";

                Image imgTabIcon = new Image();
                imgTabIcon.Source = new BitmapImage(new Uri(@"\Skins\Images\VMuktiIcon.ico", UriKind.RelativeOrAbsolute));
                imgTabIcon.Height = 16;
                imgTabIcon.Width = 16;

                objTabItem.Content = new CustomGrid.ctlGrid();
                ((CustomGrid.ctlGrid)objTabItem.Content).LoadMultipleBuddyGrid(objModInfo);

                //objTabItem.Header = txtTabBlock;
                objTabItem.Header = objPgTabHeader;
                objTabItem.Icon = imgTabIcon;

                objTabControl.Items.Add(objTabItem);
                objTabItem.StartBlinking();
                return objTabControl;
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "LoadMultipleBuddyPage()-4", "Controls\\VMuktiGrid\\Page\\TabControl.cs");
                return null;
            }



        }
Example #14
0
        public void LoadMultipleBuddyPage(clsModuleInfo objModInfo)
        {
            try
            {
                TabItem tbiPage = new TabItem();
                tbiPage.ObjectID = -1;
                tbiPage.IsSaved = false;
                tbiPage.OwnerID = VMuktiAPI.VMuktiInfo.CurrentPeer.ID;
                tbiPage.OwnerPageIndex = VMukti.App.pageCounter++;

                tbiPage.Width = 250;
                tbiPage.MinWidth = 250;
                tbiPage.MaxWidth = 250;

                ctlPgTabHeader objPgTabHeader = new ctlPgTabHeader();
                objPgTabHeader.Title = "New Page";
                //TextBlock txtBlock = new TextBlock();
                //txtBlock.Text = "New Tab - " + this.Items.Count.ToString();

                Image imgIcon = new Image();
                imgIcon.Source = new BitmapImage(new Uri(@"\Skins\Images\VMuktiIcon.ico", UriKind.RelativeOrAbsolute));
                imgIcon.Height = 16;
                imgIcon.Width = 16;

                //item.Header = txtBlock;
                tbiPage.Header = objPgTabHeader;
                tbiPage.Icon = imgIcon;

                tbiPage.Content = LoadMultipleBuddyTab(objModInfo);

                //if (i == -1 || i == this.Items.Count - 1 || AddNewTabToEnd)
                this.Items.Add(tbiPage);
                //else
                //this.Items.Insert(++i, item);

                if (SelectNewTabOnCreate)
                {
                    //SelectedItem = tbiPage;

                    VirtualizingTabPanel itemsHost = Helper.FindVirtualizingTabPanel(this);
                    if (itemsHost != null)
                        itemsHost.MakeVisible(tbiPage, Rect.Empty);

                   // tbiPage.Focus();
                }

                if (TabItemAdded != null)
                    TabItemAdded(this, new TabItemEventArgs(tbiPage));

                tbiPage.StartBlinking();
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "LoadMultipleBuddyPage()--3", "Controls\\VMuktiGrid\\Page\\TabControl.cs");
            }
        }
Example #15
0
        public void FncShowPopup(string Host, clsModuleInfo objModuleInfo)
        {

            try
            {

                objPopup.FnvLoadpopup(Host, objModuleInfo.strModuleName, objModuleInfo.lstUsersDropped);


            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "FncShowPopup()", "pgHome.xaml.cs");

            }
        }
 public void svcSetSpecialMsg(string from, List<string> to, string msg, clsModuleInfo objModInfo, string IPAddress)
 {
     if (EntsvcNetP2PSetSpecialMsg4MultipleBuddies != null)
     {
         EntsvcNetP2PSetSpecialMsg4MultipleBuddies(from, to, msg, objModInfo, IPAddress);
     }
 }
Example #17
0
        void pgHome_EntsvcAddDraggedBuddy(string from, string to, string msg, clsModuleInfo objModInfo, string IPAddress)
        {
            try
            {


            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "pgHome_EntsvcAddDraggedBuddy()", "pgHome.xaml.cs");
            }
        }
 public void svcSetSpecialMsg(string from, List<string> to, string msg, clsModuleInfo objModInfo, string IPAddress, clsPageInfo objPageInfo)
 {
     if (EntsvcNetP2PSetSpecialMsgBuddiesClick != null)
     {
         EntsvcNetP2PSetSpecialMsgBuddiesClick(from, to, msg, objModInfo, IPAddress, objPageInfo);
     }
 }
Example #19
0
        void pgHome_EntsvcSetRemoveDraggedBuddy(string from, List<string> to, string msg, clsModuleInfo objModInfo, string IPAddress)
        {
            try
            {
                for (int j = 0; j < to.Count; j++)
                {
                    if (VMuktiAPI.VMuktiInfo.CurrentPeer.DisplayName == to[j])
                    {
                        #region Pod Type

                        if (objModInfo.strDropType == "Pod Type")
                        {
                            object[] objarr = new object[1];
                            objarr[0] = from;
                            this.Dispatcher.BeginInvoke(DispatcherPriority.Normal, objDelRemoveDraggedBuddy, objModInfo, objarr);
                        }
                        #endregion
                    }
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "pgHome_EntsvcSetRemoveDraggedBuddy()", "pgHome.xaml.cs");
            }
        }
 public void svcSetRemoveDraggedBuddy(string from, List<string> to, string msg, clsModuleInfo objModInfo, string IPAddress)
 {
     if (EntsvcSetRemoveDraggedBuddy != null)
     {
         EntsvcSetRemoveDraggedBuddy(from, to, msg, objModInfo, IPAddress);
     }
 }
Example #21
0
 void cpt_EntChannelSetMsg(string from, string to, string msg, clsModuleInfo cmi)
 {
     try
     {
         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(from, to, msg, cmi, VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP);
             App.chNetP2PSuperNodeChannel.svcAddDraggedBuddy(from, to, "Newly Dragged Buddy", cmi, VMuktiAPI.VMuktiInfo.CurrentPeer.SuperNodeIP);
         }
         else
         {
             App.chHttpSuperNodeService.svcSetSpecialMsgs(from, to, msg, cmi);
             App.chHttpSuperNodeService.svcAddDraggedBuddy(from, to, "Newly Dragged Buddy", cmi);
         }
     }
     catch (Exception ex)
     {
         VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "cpt_EntChannelSetMsg()", "pgHome.xaml.cs");
     }
 }
Example #22
0
        public void LoadMultipleBuddyGrid(clsModuleInfo objModInfo)
        {
            try
            {
                DocumentRoot.ColumnDefinitions[0].Width = new GridLength(250, GridUnitType.Pixel);
                DocumentRoot.ColumnDefinitions[1].Width = new GridLength(1, GridUnitType.Star);
                DocumentRoot.ColumnDefinitions[2].Width = new GridLength(250, GridUnitType.Pixel);

                VMukti.Business.VMuktiGrid.ClsModule objModule = VMukti.Business.VMuktiGrid.ClsModule.GetPodModule(objModInfo.intModuleId);

                ClsPermissionCollection objCPC = ClsPermissionCollection.Get_PermissionRefModule(objModInfo.intModuleId, VMuktiAPI.VMuktiInfo.CurrentPeer.RoleID);
                int[] arrPermissionValue = new int[objCPC.Count];
                for (int percount = 0; percount < objCPC.Count; percount++)
                {
                    arrPermissionValue[percount] = objCPC[percount].PermissionValue;
                }
                string uri = "";
                if (VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == PeerType.BootStrap || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == PeerType.SuperNode || VMuktiAPI.VMuktiInfo.CurrentPeer.CurrPeerType == PeerType.NodeWithNetP2P)
                {
                    uri = objModInfo.strUri[0];
                }
                else
                {
                    uri = objModInfo.strUri[1];
                }
                //CentralPanelContainer.Items.Add(new ctlPOD(objModInfo.intModuleId, objModule.ModuleTitle, objModule.IsCollaborative, uri, arrPermissionValue, false, "fromPeer", null, objModInfo.lstUsersDropped));
                if (LeftPanelContainer.Items.Count == 0)
                {
                    LeftPanelContainer.Items.Insert(0, new ctlPOD(objModInfo.intModuleId, objModule.ModuleTitle, objModule.IsCollaborative, uri, arrPermissionValue, false, "fromPeer", null, objModInfo.lstUsersDropped));
                }
                else if (CentralPanelContainer.Items.Count == 0)
                {
                    CentralPanelContainer.Items.Insert(0, new ctlPOD(objModInfo.intModuleId, objModule.ModuleTitle, objModule.IsCollaborative, uri, arrPermissionValue, false, "fromPeer", null, objModInfo.lstUsersDropped));
                }
                else if (RightPanelContainer.Items.Count == 0)
                {
                    RightPanelContainer.Items.Insert(0, new ctlPOD(objModInfo.intModuleId, objModule.ModuleTitle, objModule.IsCollaborative, uri, arrPermissionValue, false, "fromPeer", null, objModInfo.lstUsersDropped));
                }
                else
                {
                    CentralPanelContainer.Items.Insert(0, new ctlPOD(objModInfo.intModuleId, objModule.ModuleTitle, objModule.IsCollaborative, uri, arrPermissionValue, false, "fromPeer", null, objModInfo.lstUsersDropped));
                }
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "LoadMultipleBuddyGrid()", "Controls\\VmuktiGrid\\Grid\\CtlGrid.xaml.cs");
            }
        }