public void FolderPasteTo_Click(object sender, RoutedEventArgs e) { TreeViewItem ClickedItem = Utility.GetClickedTreeViewItem(sender, Tree_Hierarchy); CopyPaster.PasteTo(this, Tree_Hierarchy, ClickedItem.Name); WindowTitle.AddStar(this); }
public void FolderRemove_Click(object sender, RoutedEventArgs e) { TreeViewItem ClickedItem = Utility.GetClickedTreeViewItem(sender, Tree_Hierarchy); DataHandler.RemoveFolder(ClickedItem.Name); WindowTitle.AddStar(this); }
//========================================================================================== // Add new folder //========================================================================================== public void LocationAddFolder_Click(object sender, RoutedEventArgs e) { MenuItem ClickedButton = sender as MenuItem; ContextMenu ClickedMenu = ClickedButton.Parent as ContextMenu; TreeViewItem ClickedItem = Utility.FindNodeByName(ClickedMenu.Name, Tree_Hierarchy.Items); DataHandler.AddFolderFull(this, ClickedItem); WindowTitle.AddStar(this); }
private void Text_DecisionAction_Changed(object sender, TextChangedEventArgs e) { if (ChangeEventsDisabled == true) { return; } WindowTitle.AddStar(this); TextBox Sender = sender as TextBox; int Index = Int32.Parse(Sender.Name.Substring(Sender.Name.Length - 2)); if (SelectedLocation != null) { while (SelectedLocation.Decisions.Count < Index + 1) { SelectedLocation.Decisions.Add(new LocationDecision()); } SelectedLocation.Decisions[Index].Action = Sender.Text; } }
public void Folder_KeyDown(object sender, KeyEventArgs e) { e.Handled = true; TreeViewItem SelectedItem = sender as TreeViewItem; if (e.Key == Key.C && Keyboard.IsKeyDown(Key.LeftCtrl)) { CopyPaster.IsCut = false; CopyPaster.CopyObjectName = SelectedItem.Name; } else if (e.Key == Key.X && Keyboard.IsKeyDown(Key.LeftCtrl)) { CopyPaster.IsCut = true; CopyPaster.CopyObjectName = SelectedItem.Name; } else if (e.Key == Key.V && Keyboard.IsKeyDown(Key.LeftCtrl)) { CopyPaster.PasteTo(this, Tree_Hierarchy, SelectedItem.Name); WindowTitle.AddStar(this); } }
private void Text_Description_Changed(object sender, TextChangedEventArgs e) { if (ChangeEventsDisabled == true) { return; } if (SelectedLocation != null) { WindowTitle.AddStar(this); //TextRange textRange = new TextRange(Text_Description.Document.ContentStart, Text_Description.Document.ContentEnd); var Paragraphs = Text_Description.Document.Blocks.ToList(); String Output = ""; for (int i = 0; i < Paragraphs.Count; i++) { Output += "<p>"; TextRange textRange = new TextRange(Paragraphs[i].ContentStart, Paragraphs[i].ContentEnd); Output += textRange.Text; Output += "</p>"; } Output = Output.Replace("\r\n", "<br>"); SelectedLocation.Description = Output; } }
private void Text_Guid_Changed(object sender, TextChangedEventArgs e) { if (ChangeEventsDisabled == true) { return; } WindowTitle.AddStar(this); TreeViewItem SelectedItem = Tree_Hierarchy.SelectedItem as TreeViewItem; if (SelectedItem != null) { SelectedItem.Header = Text_Guid.Text; } if (SelectedLocation != null) { SelectedLocation.Guid = Text_Guid.Text; } else if (SelectedSelector != null) { SelectedSelector.Guid = Text_Guid.Text; } }
private void DataGrid_CellChanged(object sender, EventArgs e) { WindowTitle.AddStar(this); }