public override void Initialize(PropertiesModel.Property property) { base.Initialize(property); m_info = property.EditorAdditionalData<NumberInfo>(); m_textBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_textBox); m_textBox.Width = 0; m_textBox.Dock = DockStyle.Top; m_textBox.TextChanged += m_textBox_TextChanged; m_textBox.CustomPaintForeground += m_textBox_CustomPaintForeground; m_textBox.Leave += m_textBox_Leave; Content.Controls.Add(m_textBox); UpdateEditor(); m_textBox.Refresh(); }
public override void Initialize(PropertiesModel.Property property) { base.Initialize(property); Resize += PlayCanvas_Vector_PropertyEditor_Resize; m_xTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_xTextBox); m_xTextBox.Width = 0; m_xTextBox.TextChanged += m_xTextBox_TextChanged; m_xTextBox.CustomPaintForeground += m_xTextBox_CustomPaintForeground; m_xTextBox.Leave += m_textBox_Leave; Content.Controls.Add(m_xTextBox); m_yTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_yTextBox); m_yTextBox.Width = 0; m_yTextBox.TextChanged += m_yTextBox_TextChanged; m_yTextBox.CustomPaintForeground += m_yTextBox_CustomPaintForeground; m_yTextBox.Leave += m_textBox_Leave; Content.Controls.Add(m_yTextBox); m_zTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_zTextBox); m_zTextBox.Width = 0; m_zTextBox.TextChanged += m_zTextBox_TextChanged; m_zTextBox.CustomPaintForeground += m_zTextBox_CustomPaintForeground; m_zTextBox.Leave += m_textBox_Leave; Content.Controls.Add(m_zTextBox); UpdateEditor(); m_xTextBox.Refresh(); m_yTextBox.Refresh(); m_zTextBox.Refresh(); }
public override void Initialize(PropertiesModel.Property property) { base.Initialize(property); m_colorBox = new Panel(); m_colorBox.Cursor = Cursors.Hand; m_colorBox.Width = 0; m_colorBox.Height = 48; m_colorBox.Dock = DockStyle.Top; m_colorBox.Click += m_colorBox_Click; m_colorBox.Paint += m_colorBox_Paint; m_alphaTrack = new MetroTrackBar(); MetroSkinManager.ApplyMetroStyle(m_alphaTrack); m_alphaTrack.Width = 0; m_alphaTrack.Height = 16; m_alphaTrack.Dock = DockStyle.Top; m_alphaTrack.Maximum = 255; m_alphaTrack.Value = 255; m_alphaTrack.ValueChanged += m_alphaTrack_ValueChanged; m_alphaTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_alphaTextBox); m_alphaTextBox.Width = 0; m_alphaTextBox.Dock = DockStyle.Top; m_alphaTextBox.TextChanged += m_alphaTextBox_TextChanged; m_alphaTextBox.CustomPaintForeground += m_alphaTextBox_CustomPaintForeground; m_alphaTextBox.Leave += m_alphaTextBox_Leave; Content.Controls.Add(m_alphaTrack); Content.Controls.Add(m_alphaTextBox); Content.Controls.Add(m_colorBox); UpdateEditor(); m_alphaTextBox.Refresh(); }