示例#1
0
        void MethodBodyControl_DataContextChanged(object sender, DependencyPropertyChangedEventArgs e)
        {
            var data = DataContext as MethodBodyVM;

            if (data == null)
            {
                return;
            }

            var ownerWindow = Window.GetWindow(this);

            localsListHelper            = new LocalsListHelper(localsListView, ownerWindow);
            instructionsListHelper      = new InstructionsListHelper(instructionsListView, ownerWindow);
            exceptionHandlersListHelper = new ExceptionHandlersListHelper(ehListView, ownerWindow);

            localsListHelper.OnDataContextChanged(data);
            instructionsListHelper.OnDataContextChanged(data);
            exceptionHandlersListHelper.OnDataContextChanged(data);
        }
示例#2
0
 protected override void CopyItemsAsText(SwitchInstructionVM[] instrs)
 {
     Array.Sort(instrs, (a, b) => a.Index.CompareTo(b.Index));
     InstructionsListHelper.CopyItemsAsTextToClipboard(instrs.Select(a => a.InstructionVM).ToArray());
 }