Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions CampusPulugin/CanvasWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Windows.Controls;
using System.Windows.Controls;
using System.Windows;
using Microsoft.Win32;
using System.Windows.Media.Imaging;
Expand Down Expand Up @@ -225,7 +225,6 @@ private void ShowTextEditorModal(Border border)
bool initialIsItalic = textBlock.FontStyle == FontStyles.Italic;
bool initialIsUnderline = textBlock.TextDecorations != null && textBlock.TextDecorations.Contains(TextDecorations.Underline[0]);


Type? editorWindowType = Type.GetType("CanvasPlugin.TextEditWindow");
if (editorWindowType == null)
{
Expand Down Expand Up @@ -324,7 +323,6 @@ private void ShowTextEditorModal(Border border)
textBlock.FlowDirection = FlowDirection.LeftToRight;
textBlock.TextWrapping = TextWrapping.Wrap;
}

}
}

Expand Down Expand Up @@ -511,7 +509,6 @@ private ContextMenu CreateContextMenu(FrameworkElement element)
deleteItem.Click += (s, e) => DeleteElement(element);
contextMenu.Items.Add(deleteItem);


MenuItem bringForwardItem = new MenuItem
{
Header = "一つ手前へ移動",
Expand Down Expand Up @@ -585,7 +582,6 @@ private void ChangeZOrder(UIElement? element, ZOrderChangeType changeType)

int maxZ = children.OfType<UIElement>().Select(System.Windows.Controls.Panel.GetZIndex).DefaultIfEmpty(0).Max();
System.Windows.Controls.Panel.SetZIndex(element, maxZ + 1);

}
else if (changeType == ZOrderChangeType.SendToBack)
{
Expand All @@ -594,7 +590,6 @@ private void ChangeZOrder(UIElement? element, ZOrderChangeType changeType)

int minZ = children.OfType<UIElement>().Select(System.Windows.Controls.Panel.GetZIndex).DefaultIfEmpty(0).Min();
System.Windows.Controls.Panel.SetZIndex(element, minZ - 1);

}
else
{
Expand Down Expand Up @@ -633,7 +628,6 @@ private void ChangeZOrder(UIElement? element, ZOrderChangeType changeType)
}
}


private void ContextMenu_BringToFront(object sender, RoutedEventArgs e)
{
MenuItem? item = sender as MenuItem;
Expand Down Expand Up @@ -692,7 +686,6 @@ public void StickyNoteButton_Click(object sender, RoutedEventArgs e)
VerticalAlignment = System.Windows.VerticalAlignment.Center,
HorizontalAlignment = HorizontalAlignment.Stretch,


FontFamily = new System.Windows.Media.FontFamily("Segoe UI"),
FontSize = 30,
Foreground = Brushes.Black,
Expand Down Expand Up @@ -1127,7 +1120,7 @@ public void MainCanvas_Drop(object sender, DragEventArgs e)
};

Point dropPoint = e.GetPosition(MainCanvas);
AddElementToCanvas(newImage, dropPoint.X - newImage.Width / 2, dropPoint.Y - newImage.Height / 2);
AddElementToCanvas(newImage, dropPoint.X - (newImage.Width / 2), dropPoint.Y - (newImage.Height / 2));
SelectElement(newImage);
}
catch (Exception ex)
Expand Down