Started work on the 'Folder Roots'. Added the skeleton of this feature to the ProfileManager form.
This commit is contained in:
@@ -14,19 +14,46 @@ namespace DataOrganizer
|
||||
{
|
||||
private string MachineNameLabelText { get; } = "The Machine Name property determines what\r\nprofile will be loaded automatically (Currently: '{0}').";
|
||||
private bool IsUpdating { get; set; }
|
||||
private ContextMenu FolderGroupListContextMenu { get; set; } = new ContextMenu();
|
||||
|
||||
public ProfileManager()
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
var renameMenuItem = new MenuItem("Rename");
|
||||
var deleteMenuItem = new MenuItem("Delete");
|
||||
FolderGroupListContextMenu.MenuItems.Add(renameMenuItem);
|
||||
FolderGroupListContextMenu.MenuItems.Add(deleteMenuItem);
|
||||
|
||||
ProfilesComboBox.SelectedIndexChanged += ProfilesComboBox_SelectedIndexChanged;
|
||||
ProfileNameTextBox.TextChanged += ToggleAddOrUpdateButton;
|
||||
NewContentLocationTextBox.TextChanged += ToggleAddOrUpdateButton;
|
||||
MachineNameTextBox.TextChanged += MachineNameTextBox_TextChanged;
|
||||
FolderGroupsTreeView.NodeMouseClick += FolderGroupsTreeView_NodeMouseClick;
|
||||
renameMenuItem.Click += RenameMenuItem_Click;
|
||||
deleteMenuItem.Click += DeleteMenuItem_Click;
|
||||
|
||||
UpdateProfileComboBox();
|
||||
}
|
||||
|
||||
private void FolderGroupsTreeView_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
|
||||
{
|
||||
if (e.Button == MouseButtons.Right)
|
||||
{
|
||||
FolderGroupListContextMenu.Show(FolderGroupsTreeView, e.Location);
|
||||
}
|
||||
}
|
||||
|
||||
private void DeleteMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void RenameMenuItem_Click(object sender, EventArgs e)
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private void MachineNameTextBox_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (MachineNameTextBox.Text.Length > 0)
|
||||
@@ -122,5 +149,17 @@ namespace DataOrganizer
|
||||
AddOrUpdateProfileButton.Text = "Update";
|
||||
IsUpdating = true;
|
||||
}
|
||||
|
||||
private void InsertGroupName_Click(object sender, EventArgs e)
|
||||
{
|
||||
if(!string.IsNullOrEmpty(FolderGroupNameTextBox.Text))
|
||||
{
|
||||
if (!FolderGroupsTreeView.Nodes.ContainsKey(FolderGroupNameTextBox.Text))
|
||||
FolderGroupsTreeView.Nodes.Add(FolderGroupNameTextBox.Text);
|
||||
}
|
||||
|
||||
FolderGroupNameTextBox.Text = string.Empty;
|
||||
FolderGroupNameTextBox.Focus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user