Example #1
0
        public ctlTab.TabControl NewTabControl()
        {
            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.Stretch;
                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++;
                ctlPgTabHeader objPgTabHeader = new ctlPgTabHeader();
                objPgTabHeader.Title = "(Untitled)";
                objTabItem.Content = new CustomGrid.ctlGrid();

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

                objTabControl.Items.Add(objTabItem);


                return objTabControl;
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "NweTabControl()", "Controls\\VMuktiGrid\\Page\\TabControl.cs");
                return null;
            }
        }
Example #2
0
        public ctlTab.TabControl NewTabControl(clsPageInfo objPageInfo)
        {
            try
            {
                ctlTab.TabControl objTabControl = new ctlTab.TabControl();

                objTabControl.AllowAddNew = false;

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

                for (int i = 0; i < objPageInfo.objaTabs.Length; i++)
                {
                    clsTabInfo objTab = objPageInfo.objaTabs[i];

                    ctlTab.TabItem objTabItem = new ctlTab.TabItem();
                    objTabItem.Width = 250;
                    objTabItem.MinWidth = 250;
                    objTabItem.MaxWidth = 250;
                    objTabItem.OwnerTabIndex = objTab.intOwnerTabIndex;
                    //TextBlock txtTabBlock = new TextBlock();
                    //txtTabBlock.Text = "New Tab - 0";
                    objTabItem.ObjectID = objPageInfo.objaTabs[i].intTabID;
                    objTabItem.IsSaved = true;

                    ctlPgTabHeader objPgTabHeader = new ctlPgTabHeader();
                    objPgTabHeader.Title = objTab.strTabTitle;

                    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).LoadNewMeetingGrid(objPageInfo, i);

                    //objTabItem.Header = txtTabBlock;
                    objTabItem.Header = objPgTabHeader;
                    objTabItem.Icon = imgTabIcon;
                    objTabItem.NoOfPODs = objPageInfo.objaTabs[i].objaPods.Length;

                    if (objPageInfo.strDropType == "OnTab")
                    {
                        for (int j = 0; j < objPageInfo.objaTabs[i].straTabBuddies.Length; j++)
                        {
                            objTabItem.AddBuddy(objPageInfo.objaTabs[i].straTabBuddies[j]);
                            objTabItem.SetMaxCounter(objPageInfo.objaTabs[i].objaPods.Length, objPageInfo.objaTabs[i].straTabBuddies[j]);
                        }
                        objTabItem.AddBuddy(objPageInfo.strFrom);
                        objTabItem.SetMaxCounter(objPageInfo.objaTabs[i].objaPods.Length, objPageInfo.strFrom);
                    }

                    objTabControl.Items.Add(objTabItem);

                    //LinearGradientBrush objTabItemNormalBackground = new LinearGradientBrush();
                    //objTabItemNormalBackground.StartPoint = new Point(0, 0);
                    //objTabItemNormalBackground.EndPoint = new Point(0, 1);

                    //objTabItemNormalBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 252, 253, 253), 0));
                    //objTabItemNormalBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 229, 234, 245), 0.3));
                    //objTabItemNormalBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 207, 215, 235), 0.3));
                    //objTabItemNormalBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 224, 229, 245), 0.7));
                    //objTabItemNormalBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 236, 238, 252), 1));

                    //<GradientStop Color="#FFFBFDFE" Offset="0"/>
                    //<GradientStop Color="#FFEAF6FB" Offset="0.3"/>
                    //<GradientStop Color="#FFCEE7FA" Offset="0.3"/>
                    //<GradientStop Color="#FFB9D1FA" Offset="1"/>

                    //LinearGradientBrush objTabItemSelectedBackground = new LinearGradientBrush();
                    //objTabItemSelectedBackground.StartPoint = new Point(0, 0);
                    //objTabItemSelectedBackground.EndPoint = new Point(0, 1);

                    //objTabItemSelectedBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 251, 253, 254), 0));
                    //objTabItemSelectedBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 234, 246, 251), 0.3));
                    //objTabItemSelectedBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 206, 231, 250), 0.3));
                    //objTabItemSelectedBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 185, 209, 250), 1));


                    //<GradientStop Color="#FFFCFDFD" Offset="0"/>
                    //<GradientStop Color="#FFC6DDF7" Offset="0.3"/>
                    //<GradientStop Color="#FF99C6EE" Offset="0.3"/>
                    //<GradientStop Color="#FFB6D6F1" Offset="0.7"/>
                    //<GradientStop Color="#FFD9E9F9" Offset="1"/>


                    //LinearGradientBrush objTabItemMouseOverBackground = new LinearGradientBrush();
                    //objTabItemMouseOverBackground.StartPoint = new Point(0, 0);
                    //objTabItemMouseOverBackground.EndPoint = new Point(0, 1);

                    //objTabItemMouseOverBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 252, 253, 253), 0));
                    //objTabItemMouseOverBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 198, 221, 247), 0.3));
                    //objTabItemMouseOverBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 153, 198, 238), 0.3));
                    //objTabItemMouseOverBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 182, 214, 241), 0.7));
                    //objTabItemMouseOverBackground.GradientStops.Add(new GradientStop(Color.FromArgb(255, 217, 233, 249), 1));

                    //objTabControl.SetValue(TabControl.pgTabItemNormalBackgroundProperty, objTabItemNormalBackground);
                    //objTabControl.SetValue(TabControl.pgTabItemSelectedBackgroundProperty, objTabItemSelectedBackground);
                    //objTabControl.SetValue(TabControl.pgTabItemMouseOverBackgroundProperty, objTabItemMouseOverBackground);
                }
                return objTabControl;
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "NewTabControl()", "Controls\\VMuktiGrid\\Page\\TabControl.cs");
                return null;
            }
        }
Example #3
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 #4
0
        public ctlTab.TabControl NewTabControl(int pageID)
        {
            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.Stretch;
                objTabControl.Margin = new Thickness(5);

                VMukti.Business.VMuktiGrid.ClsTabCollection objTabs = VMukti.Business.VMuktiGrid.ClsTabCollection.GetAll(pageID);
                foreach (VMukti.Business.VMuktiGrid.ClsTab objTab in objTabs)
                {
                    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 = objTab.TabId;
                    objTabItem.IsSaved = true;

                    ctlPgTabHeader objPgTabHeader = new ctlPgTabHeader();
                    objPgTabHeader.Title = objTab.TabTitle;

                    //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).LoadGrid(objTab.TabId);

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

                    objTabControl.Items.Add(objTabItem);

                }
                return objTabControl;
            }
            catch (Exception ex)
            {
                VMuktiAPI.VMuktiHelper.ExceptionHandler(ex, "NewTabControl()", "Controls\\VMuktiGrid\\Page\\TabControl.cs");
                return null;
            }
        }