private void AddLabelButt_Click(object sender, RoutedEventArgs e) { Window addWindow = new AddLabelWindow(); addWindow.ShowDialog(); MesurementsDataGrid.Items.Refresh(); }
private void MenuItemAddSimpleLabel_Click(object sender, RoutedEventArgs e) { var wnd = new AddLabelWindow(); if (wnd.ShowDialog() == true) { AddSpanElement(wnd.textBoxContent.Text, Mouse.GetPosition(null), new Point()); PushCommandToHistory(new AddCommand(this, m_LoadedCanvasItems.Last())); } }
private void MenuItemCreateNewLayout_Click(object sender, RoutedEventArgs e) { var alw = new AddLabelWindow(); if (alw.ShowDialog() == true) { LayoutProperties.Name = alw.textBoxContent.Text; var path = string.Format("{0}\\{1}\\{2}", Directory.GetCurrentDirectory(), Properties.Settings.Default.LayoutDir, alw.textBoxContent.Text); if (Directory.Exists(path)) { MessageBox.Show("Layout with name " + CurrentLayoutName + " is exists!", "Error", MessageBoxButton.OK, MessageBoxImage.Asterisk); return; } Directory.CreateDirectory(path); //File.Create(string.Format("{0}\\{1}", path, LayoutConfigFile)).Dispose(); ClearLayout(); } }