private void InitializeComponent() { m_textBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_textBox); m_textBox.Width = Width - DEFAULT_SELECT_TILE_WIDTH; m_textBox.Top = Height; m_textBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_textBox.TextChanged += new EventHandler(m_textBox_TextChanged); Controls.Add(m_textBox); m_button = new MetroTile(); MetroSkinManager.ApplyMetroStyle(m_button); m_button.Tag = m_textBox; m_button.Text = "..."; m_button.TextAlign = ContentAlignment.MiddleCenter; m_button.TileTextFontSize = MetroTileTextSize.Tall; m_button.TileTextFontWeight = MetroTileTextWeight.Bold; m_button.Width = DEFAULT_SELECT_TILE_WIDTH; m_button.Height = m_textBox.Height; m_button.Left = m_textBox.Right; m_button.Top = Height; m_button.Anchor = AnchorStyles.Top | AnchorStyles.Right; m_button.Click += new EventHandler(m_button_Click_dir); Controls.Add(m_button); Height += m_textBox.Height; }
public ProjectManagerControl() { MetroSkinManager.ApplyMetroStyle(this); AutoScroll = true; m_optionsTile = new MetroTileIcon(); MetroSkinManager.ApplyMetroStyle(m_optionsTile); m_optionsTile.Text = "Options"; m_optionsTile.TextAlign = ContentAlignment.MiddleCenter; m_optionsTile.Top = DEFAULT_SEPARATOR; m_optionsTile.Width = Width; m_optionsTile.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_optionsTile.Click += new EventHandler(m_optionsTile_Click); Controls.Add(m_optionsTile); m_filesPanel = new MetroPanel(); MetroSkinManager.ApplyMetroStyle(m_filesPanel); m_filesPanel.Size = new Size(Width, 0); m_filesPanel.AutoSize = true; m_filesPanel.Top = m_optionsTile.Bottom + DEFAULT_SEPARATOR; m_filesPanel.Width = Width; m_filesPanel.Height = Height - m_filesPanel.Top; m_filesPanel.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; Controls.Add(m_filesPanel); }
private void InitializeMainPanel() { m_mainPanel = new MetroPanel(); MetroSkinManager.ApplyMetroStyle(m_mainPanel); m_mainPanel.Dock = DockStyle.Fill; m_mainPanel.Padding = new Padding(20, 2, 20, 20); Controls.Add(m_mainPanel); // tabs. m_mainPanelTabs = new MetroTabControl(); MetroSkinManager.ApplyMetroStyle(m_mainPanelTabs); m_mainPanelTabs.Left = m_mainPanel.Padding.Left; m_mainPanelTabs.Top = m_mainPanel.Padding.Top; m_mainPanelTabs.Width = m_mainPanel.Width - m_mainPanel.Padding.Horizontal; m_mainPanelTabs.Height = m_mainPanel.Height - m_mainPanel.Padding.Vertical; m_mainPanelTabs.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top | AnchorStyles.Bottom; m_mainPanel.Controls.Add(m_mainPanelTabs); // initial pages. InitializeWelcomePage(); InitializeSettingsPage(); InitializeProjectPage(); // sub-panels. InitializeLeftPanel(); InitializeRightPanel(); InitializeBottomPanel(); }
public ScenePageControl() { MetroSkinManager.ApplyMetroStyle(this); InitializeToolbar(); InitializeSceneView(); }
private void addComponentButton_Click(object sender, EventArgs e) { MetroButton btn = sender as MetroButton; if (btn == null) { return; } List <string> components = SceneViewPlugin.ListComponents(); if (components == null || components.Count == 0) { return; } MetroContextMenu menu = new MetroContextMenu(null); MetroSkinManager.ApplyMetroStyle(menu); ToolStripMenuItem menuItem; foreach (string c in components) { menuItem = new ToolStripMenuItem(c); menuItem.Click += new EventHandler(menuItem_addNewComponent_Click); menu.Items.Add(menuItem); } menu.Show(btn, new Point(0, btn.Height)); }
private void m_gameObjectsMenuButton_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(m_scenePath)) { return; } MetroButton btn = sender as MetroButton; if (btn == null) { return; } MetroContextMenu menu = new MetroContextMenu(null); MetroSkinManager.ApplyMetroStyle(menu); ToolStripMenuItem menuItem; menuItem = new ToolStripMenuItem("Add new Game Object"); menuItem.Click += new EventHandler(menuItem_gameObjectAdd_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Remove all Game Objects"); menuItem.Click += new EventHandler(menuItem_gameObjectsRemove_Click); menu.Items.Add(menuItem); menu.Show(btn, new Point(0, btn.Height)); }
private void InitializeComponent() { m_rgbPicker = new RGBPickerControl(); m_rgbPicker.Top = Height; m_rgbPicker.Width = DEFAULT_HEIGHT; m_rgbPicker.Height = DEFAULT_HEIGHT; m_rgbPicker.Anchor = AnchorStyles.Top | AnchorStyles.Left; m_rgbPicker.Click += new EventHandler(m_rgbPicker_Click); m_rgbPicker.ColorChanged += new RGBPickerControl.ColorChangedDelegate(m_rgbPicker_ColorChanged); Controls.Add(m_rgbPicker); m_aTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_aTextBox); m_aTextBox.Top = Height + (m_rgbPicker.Height / 2) - (m_aTextBox.Height / 2); m_aTextBox.Left = m_rgbPicker.Right + 5; m_aTextBox.Width = 40; m_aTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left; m_aTextBox.TextChanged += new EventHandler(m_aTextBox_TextChanged); Controls.Add(m_aTextBox); m_aTrack = new MetroTrackBar(); MetroSkinManager.ApplyMetroStyle(m_aTrack); m_aTrack.Top = Height; m_aTrack.Left = m_aTextBox.Right; m_aTrack.Width = Width - m_aTextBox.Right; m_aTrack.Height = m_rgbPicker.Height; m_aTrack.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_aTrack.Maximum = 255; m_aTrack.ValueChanged += new EventHandler(m_aTrack_ValueChanged); Controls.Add(m_aTrack); Height += m_rgbPicker.Height; }
public ProjectPageControl() { MetroSkinManager.ApplyMetroStyle(this); AutoScroll = true; InitializeGeneral(); InitializeSpecific(); }
private void InitializeComponent() { m_toggle = new MetroToggle(); MetroSkinManager.ApplyMetroStyle(m_toggle); m_toggle.Top = Height; m_toggle.CheckedChanged += new EventHandler(m_toggle_CheckedChanged); Controls.Add(m_toggle); Height += m_toggle.Height; }
private void InitializeEditPage() { MetroPanel page = new MetroPanel(); MetroSkinManager.ApplyMetroStyle(page); page.Dock = DockStyle.Fill; m_mainPanel.Controls.Add(page); AddTabPage(page, TAB_NAME_EDIT); }
private int InitializePrefabSection(int y) { string pref = null; try { if (m_goData.ContainsKey("prefab")) { pref = Newtonsoft.Json.JsonConvert.DeserializeObject <string>(m_goData["prefab"]); } } catch { } if (string.IsNullOrEmpty(pref)) { return(y); } MetroLabel label = new MetroLabel(); MetroSkinManager.ApplyMetroStyle(label); label.Text = "Prefab: " + pref; label.FontWeight = MetroLabelWeight.Bold; label.FontSize = MetroLabelSize.Small; label.Top = y; label.Width = Width; label.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; Controls.Add(label); y = label.Bottom; MetroButton selectPrefabButton = new MetroButton(); MetroSkinManager.ApplyMetroStyle(selectPrefabButton); selectPrefabButton.Text = "Select Prefab"; selectPrefabButton.Top = y; selectPrefabButton.Width = Width; selectPrefabButton.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; selectPrefabButton.Click += new EventHandler(selectPrefabButton_Click); selectPrefabButton.Tag = pref; Controls.Add(selectPrefabButton); y = selectPrefabButton.Bottom + DEFAULT_SEPARATOR; MetroButton applyToPrefabButton = new MetroButton(); MetroSkinManager.ApplyMetroStyle(applyToPrefabButton); applyToPrefabButton.Text = "Apply to Prefab"; applyToPrefabButton.Top = y; applyToPrefabButton.Width = Width; applyToPrefabButton.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; applyToPrefabButton.Click += new EventHandler(applyToPrefabButton_Click); applyToPrefabButton.Tag = pref; Controls.Add(applyToPrefabButton); y = applyToPrefabButton.Bottom + DEFAULT_SEPARATOR; return(y); }
public AssetsControl(SceneViewPlugin.AssetType type, ProjectModel projectModel) { m_type = type; MetroSkinManager.ApplyMetroStyle(this); int y = DEFAULT_SEPARATOR; y = InitializeAssets(projectModel, y); Height = y; }
private void InitializeComponent() { m_textBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_textBox); m_textBox.Width = Width; m_textBox.Top = Height; m_textBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_textBox.TextChanged += new EventHandler(m_textBox_TextChanged); Controls.Add(m_textBox); Height += m_textBox.Height; }
private void InitializeComponent() { m_comboBox = new MetroComboBox(); MetroSkinManager.ApplyMetroStyle(m_comboBox); m_comboBox.BindingContext = new BindingContext(); m_comboBox.DataSource = m_values; m_comboBox.Top = Height; m_comboBox.Width = Width; m_comboBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_comboBox.SelectedValueChanged += new EventHandler(m_comboBox_SelectedValueChanged); Controls.Add(m_comboBox); Height += m_comboBox.Height + m_comboBox.Margin.Vertical; }
private void m_gameObjectsTree_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e) { MainForm mainForm = FindForm() as MainForm; if (mainForm == null) { return; } TreeNode node = e.Node; if (e.Button == MouseButtons.Left) { if (node != null && node.Tag is int) { mainForm.ExploreGameObjectProperties((int)node.Tag, IsGameObjectsPrefabsMode); } else { mainForm.ExploreGameObjectProperties(0, false); } } else if (e.Button == MouseButtons.Right) { MetroContextMenu menu = new MetroContextMenu(null); MetroSkinManager.ApplyMetroStyle(menu); ToolStripMenuItem menuItem; menuItem = new ToolStripMenuItem("Remove"); menuItem.Tag = node.Tag; menuItem.Click += new System.EventHandler(menuItem_nodeRemove_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Add new Game Object"); menuItem.Tag = node.Tag; menuItem.Click += new System.EventHandler(menuItem_nodeAdd_Click); menu.Items.Add(menuItem); if (IsGameObjectsPrefabsMode) { menuItem = new ToolStripMenuItem("Instantiate on scene"); menuItem.Tag = node.Text; menuItem.Click += new System.EventHandler(menuItem_nodeInstantiate_Click); menu.Items.Add(menuItem); } menu.Show(m_gameObjectsTree, e.Location); } }
private void InitializeComponent() { IsProxyEditor = true; m_exploreButton = new MetroButton(); MetroSkinManager.ApplyMetroStyle(m_exploreButton); m_exploreButton.Text = "Explore Items"; m_exploreButton.Width = Width; m_exploreButton.Top = Height; m_exploreButton.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_exploreButton.Click += new System.EventHandler(m_exploreButton_Click); Controls.Add(m_exploreButton); Height = m_exploreButton.Bottom; }
public MetroPromptBox() { MetroSkinManager.ApplyMetroStyle(this); Size = DEFAULT_SIZE; Padding = new Padding(DEFAULT_SEPARATOR, 0, DEFAULT_SEPARATOR, DEFAULT_SEPARATOR); ControlBox = false; ShowInTaskbar = false; Resizable = false; DialogResult = DialogResult.None; m_buttonsPanel = new MetroPanel(); MetroSkinManager.ApplyMetroStyle(m_buttonsPanel); m_buttonsPanel.Height = DEFAULT_BUTTON_HEIGHT + DEFAULT_SEPARATOR; m_buttonsPanel.Padding = new Padding(0, DEFAULT_SEPARATOR, 0, 0); m_buttonsPanel.Dock = DockStyle.Top; Controls.Add(m_buttonsPanel); MetroButton button = new MetroButton(); MetroSkinManager.ApplyMetroStyle(button); button.Text = "&OK"; button.Tag = DialogResult.OK; button.Dock = DockStyle.Left; button.Click += new EventHandler(button_Click); m_buttonsPanel.Controls.Add(button); button = new MetroButton(); MetroSkinManager.ApplyMetroStyle(button); button.Text = "&Cancel"; button.Tag = DialogResult.Cancel; button.Dock = DockStyle.Right; button.Click += new EventHandler(button_Click); m_buttonsPanel.Controls.Add(button); m_valueTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_valueTextBox); m_valueTextBox.Text = ""; m_valueTextBox.Dock = DockStyle.Top; Controls.Add(m_valueTextBox); m_messageLabel = new MetroLabel(); MetroSkinManager.ApplyMetroStyle(m_messageLabel); m_messageLabel.Text = ""; m_messageLabel.Dock = DockStyle.Top; Controls.Add(m_messageLabel); UpdateLayout(); }
private void InitializeRightPanel() { m_rightPanel = new MetroSidePanel(); MetroSkinManager.ApplyMetroStyle(m_rightPanel); m_rightPanel.Text = "Properties Explorer"; m_rightPanel.Side = DockStyle.Right; m_rightPanel.IsRolled = true; m_rightPanel.AnimatedRolling = false; m_rightPanel.OffsetPadding = new Padding(0, 38, 0, 24); m_rightPanel.Width = 250; m_rightPanel.Height = m_mainPanel.Height; m_rightPanel.Docked += new EventHandler(sidePanel_DockUndock); m_rightPanel.Undocked += new EventHandler(sidePanel_DockUndock); m_mainPanel.Controls.Add(m_rightPanel); m_rightPanel.BringToFront(); m_rightPanel.Content.Controls.Clear(); }
private void m_assetsMenuButton_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(m_scenePath)) { return; } MetroButton btn = sender as MetroButton; if (btn == null) { return; } MetroContextMenu menu = new MetroContextMenu(null); MetroSkinManager.ApplyMetroStyle(menu); ToolStripMenuItem menuItem; menuItem = new ToolStripMenuItem("Textures"); menuItem.Click += new EventHandler(menuItem_textures_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Shaders"); menuItem.Click += new EventHandler(menuItem_shaders_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Sounds"); menuItem.Click += new EventHandler(menuItem_sounds_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Music"); menuItem.Click += new EventHandler(menuItem_music_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Fonts"); menuItem.Click += new EventHandler(menuItem_fonts_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Custom Assets"); menuItem.Click += new EventHandler(menuItem_custom_Click); menu.Items.Add(menuItem); menu.Show(btn, new Point(0, btn.Height)); }
private void InitializeGeneral() { m_generalPanel = new MetroPanel(); MetroSkinManager.ApplyMetroStyle(m_generalPanel); m_generalPanel.Size = new Size(); m_generalPanel.AutoSize = true; m_generalPanel.Left = DEFAULT_SECTION_SEPARATOR; m_generalPanel.Top = DEFAULT_SECTION_SEPARATOR; Controls.Add(m_generalPanel); MetroLabel title = new MetroLabel(); MetroSkinManager.ApplyMetroStyle(title); title.Text = "General"; title.Size = new Size(); title.AutoSize = true; m_generalPanel.Controls.Add(title); m_generalNewProjectTile = new MetroTileIcon(); MetroSkinManager.ApplyMetroStyle(m_generalNewProjectTile); m_generalNewProjectTile.Text = "NEW\nPROJECT"; m_generalNewProjectTile.Image = Bitmap.FromFile("resources/icons/appbar.page.new.png"); m_generalNewProjectTile.Size = DEFAULT_TILE_SIZE; m_generalNewProjectTile.Location = new Point(DEFAULT_TILE_SEPARATOR.X, title.Bottom + DEFAULT_TILE_SEPARATOR.Y); m_generalNewProjectTile.Click += new EventHandler(m_generalNewProjectTile_Click); m_generalPanel.Controls.Add(m_generalNewProjectTile); m_generalOpenProjectTile = new MetroTileIcon(); MetroSkinManager.ApplyMetroStyle(m_generalOpenProjectTile); m_generalOpenProjectTile.Text = "OPEN\nPROJECT"; m_generalOpenProjectTile.Image = Bitmap.FromFile("resources/icons/appbar.page.edit.png"); m_generalOpenProjectTile.Size = DEFAULT_TILE_SIZE; m_generalOpenProjectTile.Location = new Point(m_generalNewProjectTile.Right + DEFAULT_TILE_SEPARATOR.X, title.Bottom + DEFAULT_TILE_SEPARATOR.Y); m_generalOpenProjectTile.Click += new EventHandler(m_generalOpenProjectTile_Click); m_generalPanel.Controls.Add(m_generalOpenProjectTile); m_generalImportProjectTile = new MetroTileIcon(); MetroSkinManager.ApplyMetroStyle(m_generalImportProjectTile); m_generalImportProjectTile.Text = "IMPORT\nPROJECT"; m_generalImportProjectTile.Image = Bitmap.FromFile("resources/icons/appbar.page.download.png"); m_generalImportProjectTile.Size = DEFAULT_TILE_SIZE; m_generalImportProjectTile.Location = new Point(m_generalOpenProjectTile.Right + DEFAULT_TILE_SEPARATOR.X, title.Bottom + DEFAULT_TILE_SEPARATOR.Y); m_generalImportProjectTile.Click += new EventHandler(m_generalImportProjectTile_Click); m_generalPanel.Controls.Add(m_generalImportProjectTile); }
private void InitializeSpecific() { m_specificPanel = new MetroPanel(); MetroSkinManager.ApplyMetroStyle(m_specificPanel); m_specificPanel.Size = new Size(); m_specificPanel.AutoSize = true; m_specificPanel.Left = DEFAULT_SECTION_SEPARATOR; m_specificPanel.Top = m_generalPanel.Bottom + DEFAULT_SECTION_SEPARATOR; Controls.Add(m_specificPanel); MetroLabel title = new MetroLabel(); MetroSkinManager.ApplyMetroStyle(title); title.Text = "Project-specific"; title.Size = new Size(); title.AutoSize = true; m_specificPanel.Controls.Add(title); m_specificSaveProjectTile = new MetroTileIcon(); MetroSkinManager.ApplyMetroStyle(m_specificSaveProjectTile); m_specificSaveProjectTile.Text = "SAVE\nPROJECT"; m_specificSaveProjectTile.Image = Bitmap.FromFile("resources/icons/appbar.save.png"); m_specificSaveProjectTile.Size = DEFAULT_TILE_SIZE; m_specificSaveProjectTile.Location = new Point(DEFAULT_TILE_SEPARATOR.X, title.Bottom + DEFAULT_TILE_SEPARATOR.Y); m_specificSaveProjectTile.Click += new EventHandler(m_specificSaveProjectTile_Click); m_specificPanel.Controls.Add(m_specificSaveProjectTile); m_specificExportProjectTile = new MetroTileIcon(); MetroSkinManager.ApplyMetroStyle(m_specificExportProjectTile); m_specificExportProjectTile.Text = "EXPORT\nPROJECT"; m_specificExportProjectTile.Image = Bitmap.FromFile("resources/icons/appbar.page.upload.png"); m_specificExportProjectTile.Size = DEFAULT_TILE_SIZE; m_specificExportProjectTile.Location = new Point(m_specificSaveProjectTile.Right + DEFAULT_TILE_SEPARATOR.X, title.Bottom + DEFAULT_TILE_SEPARATOR.Y); m_specificExportProjectTile.Click += new EventHandler(m_specificExportProjectTile_Click); m_specificPanel.Controls.Add(m_specificExportProjectTile); m_specificCloseProjectTile = new MetroTileIcon(); MetroSkinManager.ApplyMetroStyle(m_specificCloseProjectTile); m_specificCloseProjectTile.Text = "CLOSE\nPROJECT"; m_specificCloseProjectTile.Image = Bitmap.FromFile("resources/icons/appbar.close.png"); m_specificCloseProjectTile.Size = DEFAULT_TILE_SIZE; m_specificCloseProjectTile.Location = new Point(m_specificExportProjectTile.Right + DEFAULT_TILE_SEPARATOR.X, title.Bottom + DEFAULT_TILE_SEPARATOR.Y); m_specificCloseProjectTile.Click += new EventHandler(m_specificCloseProjectTile_Click); m_specificPanel.Controls.Add(m_specificCloseProjectTile); }
private void btn_MouseUp(object sender, MouseEventArgs e) { if (e.Button == MouseButtons.Right) { MetroButton btn = sender as MetroButton; MetroContextMenu menu = new MetroContextMenu(null); MetroSkinManager.ApplyMetroStyle(menu); ToolStripMenuItem menuItem; menuItem = new ToolStripMenuItem("Remove from project"); menuItem.Tag = btn.Tag; menuItem.Click += new EventHandler(menuItem_removeFromProject_Click); menu.Items.Add(menuItem); menu.Show(btn, new Point(btn.Width, 0)); } }
private void m_sceneMenuButton_Click(object sender, EventArgs e) { MetroButton btn = sender as MetroButton; if (btn == null) { return; } MetroContextMenu menu = new MetroContextMenu(null); MetroSkinManager.ApplyMetroStyle(menu); ToolStripMenuItem menuItem; if (string.IsNullOrEmpty(m_scenePath)) { menuItem = new ToolStripMenuItem("New Scene"); menuItem.Click += new EventHandler(menuItem_newScene_Click); menu.Items.Add(menuItem); } else { menuItem = new ToolStripMenuItem("New Scene"); menuItem.Click += new EventHandler(menuItem_newScene_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Save Scene"); menuItem.Click += new EventHandler(menuItem_saveScene_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Save Scene As..."); menuItem.Click += new EventHandler(menuItem_saveSceneAs_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Reload Scene"); menuItem.Click += new EventHandler(menuItem_reloadScene_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Close Scene"); menuItem.Click += new EventHandler(menuItem_closeScene_Click); menu.Items.Add(menuItem); } menu.Show(btn, new Point(0, btn.Height)); }
public ProjectFilesControl() { MetroSkinManager.ApplyMetroStyle(this); m_content = new MetroPanel(); m_content.Dock = DockStyle.Fill; Controls.Add(m_content); m_backImage = Bitmap.FromFile("resources/icons/appbar.arrow.left.png"); m_dirImage = Bitmap.FromFile("resources/icons/appbar.folder.png"); m_fileImage = Bitmap.FromFile("resources/icons/appbar.page.png"); m_fileCodeImage = Bitmap.FromFile("resources/icons/appbar.page.code.png"); m_fileImageImage = Bitmap.FromFile("resources/icons/appbar.page.image.png"); m_fileMusicImage = Bitmap.FromFile("resources/icons/appbar.page.music.png"); m_fileTextImage = Bitmap.FromFile("resources/icons/appbar.page.text.png"); m_fileDomImage = Bitmap.FromFile("resources/icons/appbar.page.xml.png"); RebuildList(); }
private void InitializeComponent() { MetroLabel label; label = new MetroLabel(); MetroSkinManager.ApplyMetroStyle(label); label.Text = "X:"; label.Width = DEFAULT_LABEL_WIDTH; label.Top = Height; label.Anchor = AnchorStyles.Top | AnchorStyles.Left; Controls.Add(label); m_xTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_xTextBox); m_xTextBox.Width = Width - label.Width; m_xTextBox.Top = Height; m_xTextBox.Left = label.Width; m_xTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_xTextBox.TextChanged += new EventHandler(m_xTextBox_TextChanged); Controls.Add(m_xTextBox); Height += m_xTextBox.Height; label = new MetroLabel(); MetroSkinManager.ApplyMetroStyle(label); label.Text = "Y:"; label.Width = DEFAULT_LABEL_WIDTH; label.Top = Height; label.Anchor = AnchorStyles.Top | AnchorStyles.Left; Controls.Add(label); m_yTextBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_yTextBox); m_yTextBox.Width = Width - label.Width; m_yTextBox.Top = Height; m_yTextBox.Left = label.Width; m_yTextBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_yTextBox.TextChanged += new EventHandler(m_yTextBox_TextChanged); Controls.Add(m_yTextBox); Height += m_yTextBox.Height; }
private void InitializeComponent(string message) { m_textBox = new MetroTextBox(); MetroSkinManager.ApplyMetroStyle(m_textBox); m_textBox.ReadOnly = true; m_textBox.DisplayIcon = true; m_textBox.Icon = ZasuvkaPtakopyskaExtender.Properties.Resources.appbar_question; m_textBox.Text = message; m_textBox.Width = Width; m_textBox.Top = Height; m_textBox.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right; m_textBox.UseCustomBackColor = true; m_textBox.UseCustomForeColor = true; m_textBox.BackColor = Color.Red; m_textBox.ForeColor = Color.White; m_textBox.Click += new EventHandler(m_textBox_Click); Controls.Add(m_textBox); Height += m_textBox.Height; }
private void InitializeBottomPanel() { m_bottomPanel = new MetroSidePanel(); MetroSkinManager.ApplyMetroStyle(m_bottomPanel); m_bottomPanel.Text = "Project Files"; m_bottomPanel.Side = DockStyle.Bottom; m_bottomPanel.IsRolled = true; m_bottomPanel.AnimatedRolling = false; m_bottomPanel.Height = 200; m_bottomPanel.Width = m_mainPanel.Width; m_bottomPanel.Docked += new EventHandler(sidePanel_DockUndock); m_bottomPanel.Undocked += new EventHandler(sidePanel_DockUndock); m_mainPanel.Controls.Add(m_bottomPanel); m_bottomPanel.BringToFront(); m_projectFilesPanel = new ProjectFilesControl(); m_projectFilesPanel.Dock = DockStyle.Fill; m_bottomPanel.Content.Controls.Clear(); m_bottomPanel.Content.Controls.Add(m_projectFilesPanel); }
private void InitializeLeftPanel() { m_leftPanel = new MetroSidePanel(); MetroSkinManager.ApplyMetroStyle(m_leftPanel); m_leftPanel.Text = "Project Manager"; m_leftPanel.Side = DockStyle.Left; m_leftPanel.IsRolled = true; m_leftPanel.AnimatedRolling = false; m_leftPanel.OffsetPadding = new Padding(0, 38, 0, 24); m_leftPanel.Width = 250; m_leftPanel.Height = m_mainPanel.Height; m_leftPanel.Docked += new EventHandler(sidePanel_DockUndock); m_leftPanel.Undocked += new EventHandler(sidePanel_DockUndock); m_mainPanel.Controls.Add(m_leftPanel); m_leftPanel.BringToFront(); m_projectManagerPanel = new ProjectManagerControl(); m_projectManagerPanel.Dock = DockStyle.Fill; m_leftPanel.Content.Controls.Add(m_projectManagerPanel); }
public GameObjectPropertiesControl(int handle, bool isPrefab) { if (handle == 0) { throw new ArgumentException("Game Object handle cannot be 0!"); } m_goHandle = handle; m_goIsPrefab = isPrefab; m_goData = SceneViewPlugin.QueryGameObject(handle, isPrefab, "{ \"get\": null }"); MetroSkinManager.ApplyMetroStyle(this); int y = DEFAULT_SEPARATOR; y = InitializePrefabSection(y); y = InitializePropertiesSection(y); y = InitializeComponentsSection(y); Height = y; }
private void tile_MouseUp(object sender, MouseEventArgs e) { MetroTileIcon tile = sender as MetroTileIcon; if (tile == null) { return; } string path = tile.Tag as string; if (e.Button == MouseButtons.Left) { if (Directory.Exists(path)) { ViewPath = path; } else if (File.Exists(path)) { OpenFile(path); } } else if (e.Button == MouseButtons.Right) { MetroContextMenu menu = new MetroContextMenu(null); MetroSkinManager.ApplyMetroStyle(menu); ToolStripMenuItem menuItem; menuItem = new ToolStripMenuItem("Rename"); menuItem.Tag = path; menuItem.Click += new EventHandler(menuItem_rename_Click); menu.Items.Add(menuItem); menuItem = new ToolStripMenuItem("Delete"); menuItem.Tag = path; menuItem.Click += new EventHandler(menuItem_delete_Click); menu.Items.Add(menuItem); menu.Show(tile, e.Location); } }