示例#1
0
        void UpdateFormCustomizer()
        {
            formCustomizer.setTitleBar(panelControlBox);
            formCustomizer.setTitleLabel(labelWindowTitle);
            formCustomizer.setMenuStrip(menuStrip1);
            formCustomizer.setIcon(pictureBoxWindowicon);
            formCustomizer.setCloseButton(buttonClose);
            formCustomizer.setMaxiButton(buttonMax);
            formCustomizer.setMiniButton(buttonMin);
            formCustomizer.setStatusStrip(panelStatusStrip);

            service.BackColor   = formCustomizer.BackColor;
            service.BorderColor = formCustomizer.BorderColor;

            panelContent.BackColor = formCustomizer.BackColor;

            panelStatusStrip.BackColor = formCustomizer.BorderColor;
            labelStatusStrip.ForeColor = formCustomizer.TextStatusStripColor;

            fOlvCustomers.BackColor             = formCustomizer.BackColor;
            fOlvCustomers.ForeColor             = Color.WhiteSmoke;
            fOlvCustomers.AlternateRowBackColor = formCustomizer.ShadowColor;

            fOlvCustomers.SelectedBackColor = formCustomizer.BorderColor;
            fOlvCustomers.SelectedForeColor = Color.Black;

            foreach (OLVColumn item in fOlvCustomers.Columns)
            {
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(formCustomizer.BackColor);
                headerstyle.SetForeColor(Color.WhiteSmoke);
                item.HeaderFormatStyle = headerstyle;
            }
        }
示例#2
0
        public mainForm(string gameSelected, gameSelection gsF)
        {
            currentGame    = gameSelected;
            gameSelectForm = gsF;
            bgwListBuilder.WorkerReportsProgress = true;
            bgwListBuilder.DoWork             += new DoWorkEventHandler(bgwListBuilder_DoWork);
            bgwListBuilder.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bgwListBuilder_RunWorkerCompleted);
            InitializeComponent();
            tb_search.Edit.KeyDown += new KeyEventHandler(tb_search_KeyDown);
            setImage();
            // Initialize hot item style
            this.hotItemStyle1.ForeColor = highlightCellColor;
            RowBorderDecoration rbd = new RowBorderDecoration();

            rbd.BorderPen                 = new Pen(primaryCellColor, 0.5f);
            rbd.FillBrush                 = new SolidBrush(Color.FromArgb(32, Color.White));
            rbd.CornerRounding            = 0;
            rbd.BoundsPadding             = new Size(0, 0);
            rbd.LeftColumn                = 1;
            this.hotItemStyle1.Decoration = rbd;
            HeaderFormatStyle headerstyle = new HeaderFormatStyle();

            headerstyle.SetBackColor(headerBackColor);
            filelistview.HeaderFormatStyle = headerstyle;
        }
示例#3
0
        public Form1()
        {
            InitializeComponent();
            HeaderFormatStyle hs = new HeaderFormatStyle();

            hs.SetBackColor(Color.FromArgb(241, 199, 22));
            hs.SetFont(new Font(FontFamily.GenericMonospace, 10, FontStyle.Bold));
            listView.HeaderFormatStyle = hs;
        }
 private void ReloadColumns()
 {
     foreach (OLVColumn item in stListView1.AllColumns)
     {
         var headerstyle = new HeaderFormatStyle();
         headerstyle.SetBackColor(FormThemes.BaseTheme.FormBackColor);
         headerstyle.SetForeColor(FormThemes.BaseTheme.FormForeColor);
         item.HeaderFormatStyle = headerstyle;
     }
 }
示例#5
0
 internal static void adjustMyObjectListViewHeader(ObjectListView vOLVList, Color vForeColour, Color vBackColour)
 {
     foreach (OLVColumn item in vOLVList.Columns)
     {
         var headerstyle = new HeaderFormatStyle();
         headerstyle.SetBackColor(vBackColour);
         headerstyle.SetForeColor(vForeColour);
         item.HeaderFormatStyle = headerstyle;
     }
 }
示例#6
0
 private void adjustMyObjectListViewHeader()
 {
     BorderStyle = BorderStyle.None;
     foreach (OLVColumn item in Columns)
     {
         var headerstyle = new HeaderFormatStyle();
         headerstyle.SetBackColor(FormThemes.BaseTheme.FormBackColor);
         headerstyle.SetForeColor(FormThemes.BaseTheme.FormForeColor);
         item.HeaderFormatStyle = headerstyle;
     }
 }
示例#7
0
        private void SetColumnHeaderStyles()
        {
            ObjectListGpus.HeaderUsesThemes = false;

            HeaderFormatStyle headerStyle = new HeaderFormatStyle();

            headerStyle.SetBackColor(ThemeColors.ListHeaderNormalBackground);
            headerStyle.SetForeColor(ThemeColors.ListHeaderNormalForeground);
            headerStyle.SetFont(this.Font);
            ObjectListGpus.HeaderWordWrap    = true;
            ObjectListGpus.HeaderFormatStyle = headerStyle;
        }
示例#8
0
        public void GenerateListView(ObjectListView varListView, List <ListViewColumnsInfo> nameSizeList)
        {
            List <OLVColumn> columnsList = new List <OLVColumn>();
            var totalColumns             = nameSizeList.Count();
            int counter = 0;

            foreach (ListViewColumnsInfo nameSize in nameSizeList)
            {
                counter++;
                OLVColumn columnHeader = new BrightIdeasSoftware.OLVColumn();
                columnHeader.Text       = nameSize.Header;
                columnHeader.IsVisible  = nameSize.Visible;
                columnHeader.AspectName = nameSize.Header;

                // Only for last column
                if (totalColumns == counter)
                {
                    var lastColumn        = nameSizeList.Last();
                    var withoutLastColumn = nameSizeList.Where(x => !x.Header.Equals(lastColumn));
                    var withOfAll         = withoutLastColumn.Sum(x => x.ColumnSize);
                    columnHeader.AutoResize(ColumnHeaderAutoResizeStyle.HeaderSize);
                    int colWidthAfterAutoResizeByContent = columnHeader.Width;
                    if (nameSize.ColumnSize > colWidthAfterAutoResizeByContent)
                    {
                        columnHeader.Width = nameSize.ColumnSize;
                    }
                    else
                    {
                        columnHeader.Width = colWidthAfterAutoResizeByContent;
                    }
                }
                else
                {
                    columnHeader.Width = nameSize.ColumnSize;
                }

                // Set header style
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(Color.FromArgb(83, 83, 91));
                headerstyle.SetForeColor(Color.White);
                columnHeader.HeaderFormatStyle = headerstyle;
                if (nameSize.IsButton)
                {
                    columnHeader.IsButton     = nameSize.IsButton;
                    columnHeader.TextAlign    = HorizontalAlignment.Center;
                    columnHeader.ButtonSizing = OLVColumn.ButtonSizingMode.FixedBounds;
                    columnHeader.ButtonSize   = new Size(15, 15);
                }
                columnsList.Add(columnHeader);
                varListView.AllColumns.Add(columnHeader);
            }
            varListView.Columns.AddRange(columnsList.Cast <System.Windows.Forms.ColumnHeader>().ToArray());
        }
        private void adjustMyObjectListViewHeader()
        {
            foreach (OLVColumn item in olvWebsites.Columns)
            {
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(parentForm.colourDarker);
                headerstyle.SetForeColor(parentForm.colourLightest);
                item.HeaderFormatStyle = headerstyle;
            }

            foreach (OLVColumn item in olvWebsites.Columns)
            {
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(parentForm.colourDarker);
                headerstyle.SetForeColor(parentForm.colourLightest);
                item.HeaderFormatStyle = headerstyle;
            }
        }
示例#10
0
        public UC_Main_Task_Pane( )
        {
            InitializeComponent();
            oLV_Overview.FullRowSelect = true;

            oLV_Overview.SelectedRowDecoration = new TintedColumnDecoration(oLV_Cl_Fertigungsstatus);

            oLV_Overview.TintSortColumn = true;
            oLV_Overview.SelectedColumn = oLV_Cl_Fertigungsstatus;
            oLV_Overview.Sort(oLV_Cl_Fertigungsstatus);

            oLV_Overview.SelectedColumnTint = Color.FromArgb(45, 248, 131, 121);

            foreach (OLVColumn result in oLV_Overview.Columns)
            {
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(Color.FromArgb(255, 255, 255, 255));
                result.HeaderFormatStyle = headerstyle;
                result.MinimumWidth      = 30;
            }
        }
示例#11
0
        public MaxPluginForm()
        {
            InitializeComponent();
            this.DoubleBuffered         = true;
            this.StartPosition          = FormStartPosition.Manual;
            this.Location               = new Point(0, 0);
            this.MaximizeBox            = false;
            this.FormBorderStyle        = System.Windows.Forms.FormBorderStyle.FixedDialog;
            openFileDialog.Filter       = "brg files|*.brg|grn files|*.grn";
            saveFileDialog.Filter       = "brg files|*.brg|grn files|*.grn";
            saveFileDialog.AddExtension = false;

            // Update Colors
            uiUp = CuiUpdater.GetInstance();
            mainMenuStrip.Renderer     = new ToolStripMaxPluginRenderer();
            mainStatusStrip.SizingGrip = false;
            mainStatusStrip.BackColor  = uiUp.GetControlColor();
            mainStatusStrip.ForeColor  = uiUp.GetTextColor();

            for (int i = 0; i < mainTabControl.TabPages.Count; i++)
            {
                mainTabControl.TabPages[i].BackColor = uiUp.GetControlColor();
                mainTabControl.TabPages[i].ForeColor = uiUp.GetTextColor();
            }

            // Brg Tab
            brgDataSplitContainer.Panel2MinSize = 350;
            brgObjectsGroupBox.ForeColor        = uiUp.GetTextColor();
            brgImportGroupBox.ForeColor         = uiUp.GetTextColor();
            brgMeshInterpTypeGroupBox.ForeColor = uiUp.GetTextColor();
            attachpointGroupBox.ForeColor       = uiUp.GetTextColor();
            brgMeshFlagsGroupBox.ForeColor      = uiUp.GetTextColor();
            brgMeshFormatGroupBox.ForeColor     = uiUp.GetTextColor();
            brgMeshAnimTypeGroupBox.ForeColor   = uiUp.GetTextColor();
            brgOptionsGroupBox.ForeColor        = uiUp.GetTextColor();
            brgExportGroupBox.ForeColor         = uiUp.GetTextColor();

            brgMeshFlagsCheckedListBox.ItemCheck    += brgMeshFlagsCheckedListBox_ItemCheck;
            brgMeshFlagsCheckedListBox.BackColor     = uiUp.GetEditControlColor();
            brgMeshFlagsCheckedListBox.ForeColor     = uiUp.GetTextColor();
            brgMeshFlagsCheckedListBox.BorderStyle   = BorderStyle.FixedSingle;
            brgMeshFlagsCheckedListBox.MultiColumn   = true;
            brgMeshFlagsCheckedListBox.CheckOnClick  = true;
            brgMeshFlagsCheckedListBox.ColumnWidth   = 150;
            brgMeshFlagsCheckedListBox.DataSource    = Enum.GetValues(typeof(BrgMeshFlag));
            brgMeshFormatCheckedListBox.ItemCheck   += brgMeshFormatCheckedListBox_ItemCheck;
            brgMeshFormatCheckedListBox.BackColor    = uiUp.GetEditControlColor();
            brgMeshFormatCheckedListBox.ForeColor    = uiUp.GetTextColor();
            brgMeshFormatCheckedListBox.BorderStyle  = BorderStyle.FixedSingle;
            brgMeshFormatCheckedListBox.MultiColumn  = true;
            brgMeshFormatCheckedListBox.CheckOnClick = true;
            brgMeshFormatCheckedListBox.ColumnWidth  = 150;
            brgMeshFormatCheckedListBox.DataSource   = Enum.GetValues(typeof(BrgMeshFormat));

            keyframeRadioButton.CheckedChanged          += brgMeshAnimTypeRadioButton_CheckedChanged;
            nonuniRadioButton.CheckedChanged            += brgMeshAnimTypeRadioButton_CheckedChanged;
            skinBoneRadioButton.CheckedChanged          += brgMeshAnimTypeRadioButton_CheckedChanged;
            interpolationTypeCheckBox.CheckStateChanged += brgMeshInterpolationTypeCheckBox_CheckStateChanged;

            // Tree List View Style
            HeaderFormatStyle treelistviewstyle = new HeaderFormatStyle();

            treelistviewstyle.SetBackColor(uiUp.GetControlColor());
            treelistviewstyle.SetForeColor(uiUp.GetTextColor());
            treelistviewstyle.Normal.FrameColor = uiUp.GetButtonLightShadow();
            treelistviewstyle.Normal.FrameWidth = 1;
            treelistviewstyle.Hot.BackColor     = uiUp.GetEditControlColor();
            treelistviewstyle.Hot.FrameColor    = uiUp.GetButtonLightShadow();
            treelistviewstyle.Hot.FrameWidth    = 1;

            // Brg Objects View
            this.brgObjectsTreeListView.MouseEnter             += TreeListView_MouseEnter;
            this.brgObjectsTreeListView.SelectedIndexChanged   += brgObjectsTreeListView_SelectionChanged;
            this.brgObjectsTreeListView.OwnerDraw               = true;
            this.brgObjectsTreeListView.RowHeight               = 10;
            this.brgObjectsTreeListView.BorderStyle             = BorderStyle.FixedSingle;
            this.brgObjectsTreeListView.OverlayText.BorderColor = uiUp.GetButtonDarkShadow();
            this.brgObjectsTreeListView.OverlayText.BorderWidth = 2;
            this.brgObjectsTreeListView.BackColor               = uiUp.GetEditControlColor();
            this.brgObjectsTreeListView.ForeColor               = uiUp.GetTextColor();
            this.brgObjectsTreeListView.HeaderFormatStyle       = treelistviewstyle;
            this.brgObjectsTreeListView.FullRowSelect           = true;
            this.brgObjectsTreeListView.HideSelection           = false;
            this.brgObjectsTreeListView.CanExpandGetter         = delegate(object rowObject)
            {
                if (rowObject is BrgMesh)
                {
                    return(((BrgMesh)rowObject).MeshAnimations.Count > 0);
                }

                return(false);
            };
            this.brgObjectsTreeListView.ChildrenGetter = delegate(object rowObject)
            {
                if (rowObject is BrgMesh)
                {
                    return(((BrgMesh)rowObject).MeshAnimations);
                }

                return(null);
            };
            OLVColumn nameCol = new OLVColumn("Name", "Name");

            nameCol.Width = 675;
            this.brgObjectsTreeListView.Columns.Add(nameCol);


            // Attachpoints
            attachpointListBox.MouseDoubleClick += attachpointListBox_MouseDoubleClick;
            attachpointListBox.BackColor         = uiUp.GetEditControlColor();
            attachpointListBox.ForeColor         = uiUp.GetTextColor();
            string[] atpts = new string[55];
            Array.Copy(BrgAttachpoint.AttachpointNames, atpts, 55);
            Array.Sort(atpts);
            attachpointListBox.DataSource = atpts;

            // Materials
            extractMatButton.FlatStyle               = FlatStyle.Flat;
            extractMatButton.BackColor               = uiUp.GetEditControlColor();
            extractMatButton.ForeColor               = uiUp.GetTextColor();
            extractMatButton2.FlatStyle              = FlatStyle.Flat;
            extractMatButton2.BackColor              = uiUp.GetEditControlColor();
            extractMatButton2.ForeColor              = uiUp.GetTextColor();
            materialGroupBox.BackColor               = uiUp.GetControlColor();
            materialGroupBox.ForeColor               = uiUp.GetTextColor();
            diffuseMaxTextBox.BackColor              = uiUp.GetEditControlColor();
            diffuseMaxTextBox.ForeColor              = uiUp.GetTextColor();
            ambientMaxTextBox.BackColor              = uiUp.GetEditControlColor();
            ambientMaxTextBox.ForeColor              = uiUp.GetTextColor();
            specularMaxTextBox.BackColor             = uiUp.GetEditControlColor();
            specularMaxTextBox.ForeColor             = uiUp.GetTextColor();
            selfIllumMaxTextBox.BackColor            = uiUp.GetEditControlColor();
            selfIllumMaxTextBox.ForeColor            = uiUp.GetTextColor();
            textureMaxTextBox.BackColor              = uiUp.GetEditControlColor();
            textureMaxTextBox.ForeColor              = uiUp.GetTextColor();
            reflectionMaxTextBox.BackColor           = uiUp.GetEditControlColor();
            reflectionMaxTextBox.ForeColor           = uiUp.GetTextColor();
            bumpMapMaxTextBox.BackColor              = uiUp.GetEditControlColor();
            bumpMapMaxTextBox.ForeColor              = uiUp.GetTextColor();
            opacityMaxTextBox.BackColor              = uiUp.GetEditControlColor();
            opacityMaxTextBox.ForeColor              = uiUp.GetTextColor();
            specularLevelMaxTextBox.BackColor        = uiUp.GetEditControlColor();
            specularLevelMaxTextBox.ForeColor        = uiUp.GetTextColor();
            materialFlagsGroupBox.BackColor          = uiUp.GetControlColor();
            materialFlagsGroupBox.ForeColor          = uiUp.GetTextColor();
            materialFlagsCheckedListBox.ItemCheck   += materialFlagsCheckedListBox_ItemCheck;
            materialFlagsCheckedListBox.BackColor    = uiUp.GetEditControlColor();
            materialFlagsCheckedListBox.ForeColor    = uiUp.GetTextColor();
            materialFlagsCheckedListBox.BorderStyle  = BorderStyle.FixedSingle;
            materialFlagsCheckedListBox.MultiColumn  = true;
            materialFlagsCheckedListBox.CheckOnClick = true;
            materialFlagsCheckedListBox.ColumnWidth  = 150;
            materialFlagsCheckedListBox.DataSource   = Enum.GetValues(typeof(BrgMatFlag));

            // Grn Tab
            grnDataSplitContainer.Panel2MinSize = 350;
            grnExportGroupBox.ForeColor         = uiUp.GetTextColor();
            grnObjectsGroupBox.ForeColor        = uiUp.GetTextColor();
            grnPropsGroupBox.ForeColor          = uiUp.GetTextColor();

            grnPropsListBox.BackColor   = uiUp.GetEditControlColor();
            grnPropsListBox.ForeColor   = uiUp.GetTextColor();
            grnPropsListBox.BorderStyle = BorderStyle.None;

            // Grn Tree View
            this.grnObjectsTreeListView.MouseEnter             += TreeListView_MouseEnter;
            this.grnObjectsTreeListView.SelectedIndexChanged   += grnObjectsTreeListView_SelectedIndexChanged;
            this.grnObjectsTreeListView.OwnerDraw               = true;
            this.grnObjectsTreeListView.RowHeight               = 10;
            this.grnObjectsTreeListView.BorderStyle             = BorderStyle.FixedSingle;
            this.grnObjectsTreeListView.OverlayText.BorderColor = uiUp.GetButtonDarkShadow();
            this.grnObjectsTreeListView.OverlayText.BorderWidth = 2;
            this.grnObjectsTreeListView.BackColor               = uiUp.GetEditControlColor();
            this.grnObjectsTreeListView.ForeColor               = uiUp.GetTextColor();
            this.grnObjectsTreeListView.HeaderFormatStyle       = treelistviewstyle;
            this.grnObjectsTreeListView.FullRowSelect           = true;
            this.grnObjectsTreeListView.HideSelection           = false;
            this.grnObjectsTreeListView.CanExpandGetter         = delegate(object rowObject)
            {
                if (rowObject is GrnBone)
                {
                    int rowIndex = grn.File.Bones.IndexOf((GrnBone)rowObject);
                    return(grn.File.Bones.Exists(x => x.ParentIndex == rowIndex));
                }
                else if (rowObject is GrnMaterial)
                {
                    return(((GrnMaterial)rowObject).DiffuseTexture != null);
                }

                return(false);
            };
            this.grnObjectsTreeListView.ChildrenGetter = delegate(object rowObject)
            {
                if (rowObject is GrnBone)
                {
                    int            rowIndex = grn.File.Bones.IndexOf((GrnBone)rowObject);
                    List <GrnBone> bones    = grn.File.Bones.FindAll(x => x.ParentIndex == rowIndex);
                    bones.Remove((GrnBone)rowObject);
                    return(bones);
                }
                else if (rowObject is GrnMaterial)
                {
                    return(new object[] { ((GrnMaterial)rowObject).DiffuseTexture });
                }

                return(null);
            };
            nameCol       = new OLVColumn("Name", "Name");
            nameCol.Width = 675;
            this.grnObjectsTreeListView.Columns.Add(nameCol);
        }
示例#12
0
        void UpdateFormCustomizer()
        {
            formCustomizer.setTitleBar(panelControlBox);
            formCustomizer.setTitleLabel(labelWindowTitle);
            formCustomizer.setIcon(pictureBoxWindowicon);
            formCustomizer.setCloseButton(buttonClose);
            formCustomizer.setMaxiButton(buttonMax);
            formCustomizer.setMiniButton(buttonMin);


            splitContainer1.BackColor        = formCustomizer.BorderColor;
            splitContainer1.Panel1.BackColor = formCustomizer.BackColor;
            splitContainer1.Panel2.BackColor = formCustomizer.BackColor;
            splitContainer1.SplitterWidth    = 2;

            splitContainer2.BackColor        = formCustomizer.BorderColor;
            splitContainer2.Panel1.BackColor = formCustomizer.BackColor;
            splitContainer2.Panel2.BackColor = formCustomizer.BackColor;
            splitContainer2.SplitterWidth    = 2;

            panelContent.BackColor                  = formCustomizer.BackColor;
            fOlvSubscriptions.BackColor             = formCustomizer.BackColor;
            fOlvSubscriptions.ForeColor             = Color.WhiteSmoke;
            fOlvSubscriptions.AlternateRowBackColor = formCustomizer.ShadowColor;

            fOlvSubscriptions.SelectedBackColor = formCustomizer.BorderColor;
            fOlvSubscriptions.SelectedForeColor = Color.Black;

            fOlvSpecialOrders.BackColor             = formCustomizer.BackColor;
            fOlvSpecialOrders.ForeColor             = Color.WhiteSmoke;
            fOlvSpecialOrders.AlternateRowBackColor = formCustomizer.ShadowColor;

            fOlvSpecialOrders.SelectedBackColor = formCustomizer.BorderColor;
            fOlvSpecialOrders.SelectedForeColor = Color.Black;


            fOlvSubPosting.BackColor             = formCustomizer.BackColor;
            fOlvSubPosting.ForeColor             = Color.WhiteSmoke;
            fOlvSubPosting.AlternateRowBackColor = formCustomizer.ShadowColor;

            fOlvSubPosting.SelectedBackColor = formCustomizer.BorderColor;
            fOlvSubPosting.SelectedForeColor = Color.Black;

            foreach (OLVColumn item in fOlvSubscriptions.Columns)
            {
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(formCustomizer.BackColor);
                headerstyle.SetForeColor(Color.WhiteSmoke);
                item.HeaderFormatStyle = headerstyle;
            }
            foreach (OLVColumn item in fOlvSpecialOrders.Columns)
            {
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(formCustomizer.BackColor);
                headerstyle.SetForeColor(Color.WhiteSmoke);
                item.HeaderFormatStyle = headerstyle;
            }

            foreach (OLVColumn item in fOlvSubPosting.Columns)
            {
                var headerstyle = new HeaderFormatStyle();
                headerstyle.SetBackColor(formCustomizer.BackColor);
                headerstyle.SetForeColor(Color.WhiteSmoke);
                item.HeaderFormatStyle = headerstyle;
            }
        }