예제 #1
0
 private void FixUI()
 {
     this.Shown       += UTXBrowserPanel_Shown;
     this.StyleManager = MainPanel.GetStyle();
     ThemeUtil.GetInstance().FixGroupBox(groupBox1);
     ThemeUtil.GetInstance().FixGroupBox(groupBox2);
     ThemeUtil.GetInstance().FixGroupBox(groupBox3);
     ThemeUtil.GetInstance().FixGroupBox(groupBox4);
     ThemeUtil.GetInstance().FixGroupBox(groupBox5);
     ThemeUtil.GetInstance().FixGroupBox(groupBox6);
     utxInspectorGrid.Style = MainPanel.GetStyle().Style;
     utxInspectorGrid.Theme = MainPanel.GetStyle().Theme;
 }
예제 #2
0
        private void FileEditRowPanel_Load(object sender, EventArgs e)
        {
            DataGridViewRow Row = SourceGrid.Rows[RowIndex];

            if (ThemeUtil.GetInstance().IsDark())
            {
            }
            for (int i = SourceGrid.Columns.Count - 1; i >= 0; i--)
            {
                string niceLabel = SourceGrid.Columns[i].HeaderText;
                Panel  tempPanel = new Panel();
                tempPanel.Height = 50;
                tempPanel.Width  = editElementPanel.Width;
                Label tempLabel = new Label();
                if (ThemeUtil.GetInstance().IsDark())
                {
                    tempLabel.BackColor = Color.Transparent;
                    tempLabel.ForeColor = Color.White;
                }
                tempLabel.Text = niceLabel;
                tempPanel.Controls.Add(tempLabel);
                if (niceLabel.StartsWith("rgba") || niceLabel.StartsWith("rgb"))
                {
                    tempLabel.Text = "Color";
                    string color = Row.Cells[i].Value.ToString().PadRight(2, 'F');
                    color = Row.Cells[(i - 1)].Value.ToString().PadRight(2, 'F') + color;
                    color = Row.Cells[(i - 2)].Value.ToString().PadRight(2, 'F') + color;
                    //Add Alpha
                    if (niceLabel.StartsWith("rgba"))
                    {
                        color = Row.Cells[(i - 3)].Value.ToString() + color;
                    }
                    i -= (niceLabel.StartsWith("rgba")) ? 3 : 2;
                    CreateColorEditor(tempPanel, color);
                }
                else
                {
                    TextBox tempTextBox = new TextBox();
                    tempTextBox.Font     = new System.Drawing.Font("Microsoft Sans Serif", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
                    tempTextBox.Size     = new System.Drawing.Size(360, 26);
                    tempTextBox.Location = new Point(100, 0);
                    tempTextBox.Text     = Row.Cells[i].Value.ToString();
                    tempTextBox.TabIndex = 1;
                    tempPanel.Controls.Add(tempTextBox);
                }
                editElementPanel.Controls.Add(tempPanel);
                tempPanel.Dock = DockStyle.Top;
            }
        }
 public MainPanel()
 {
     _Instance = this;
     InitializeComponent();
     this.StyleManager = ninjaStyleManager;
     ThemeUtil.GetInstance().LoadTheme();
     //ThemeUtil.GetInstance().FixGroupBox(groupBox1);
     ThemeUtil.GetInstance().FixGroupBox(groupBox2);
     ThemeUtil.GetInstance().FixGroupBox(groupBox3);
     if (ThemeUtil.GetInstance().IsDark())
     {
         menuStrip1.BackColor = ColorTranslator.FromHtml("#202020");
         menuStrip1.ForeColor = Color.LightGray;
     }
     Properties.Settings.Default.PropertyChanged += Default_PropertyChanged;
 }
예제 #4
0
 public FileEditPanel()
 {
     InitializeComponent();
     this.StyleManager = MainPanel.GetStyle();
     ThemeUtil.GetInstance().FixControls(this.Controls);
     ThemeUtil.GetInstance().FixControl(metroLabel3);
     ThemeUtil.GetInstance().FixControl(metroLabel1);
     ThemeUtil.GetInstance().FixControl(metroLabel4);
     ThemeUtil.GetInstance().FixControl(columnsLabel);
     ThemeUtil.GetInstance().FixControl(recordsLabel);
     if (ThemeUtil.GetInstance().IsDark())
     {
         ThemeUtil.GetInstance().FixGroupBox(groupBox1);
         menuStrip1.BackColor = ColorTranslator.FromHtml("#202020");
         menuStrip1.ForeColor = Color.LightGray;
         fileEditorGrid.Theme = MainPanel.GetStyle().Theme;
         fileEditorGrid.Style = MainPanel.GetStyle().Style;
     }
     //fileEditorGrid.AutoSizeColumnsMode = DataGridViewAutoSizeColumnsMode.DisplayedCells;
 }