예제 #1
0
        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);
        }
예제 #2
0
        public void FolderRemove_Click(object sender, RoutedEventArgs e)
        {
            TreeViewItem ClickedItem = Utility.GetClickedTreeViewItem(sender, Tree_Hierarchy);

            DataHandler.RemoveFolder(ClickedItem.Name);
            WindowTitle.AddStar(this);
        }
예제 #3
0
        //==========================================================================================
        // 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);
        }
예제 #4
0
        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;
            }
        }
예제 #5
0
        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);
            }
        }
예제 #6
0
        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;
            }
        }
예제 #7
0
        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;
            }
        }
예제 #8
0
 private void DataGrid_CellChanged(object sender, EventArgs e)
 {
     WindowTitle.AddStar(this);
 }