add copy IMO to search control
This commit is contained in:
parent
6205efc7a2
commit
66c96daa92
9
ENI2/Properties/Resources.Designer.cs
generated
9
ENI2/Properties/Resources.Designer.cs
generated
@ -1613,6 +1613,15 @@ namespace ENI2.Properties {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to Copy IMO to clipboard.
|
||||||
|
/// </summary>
|
||||||
|
public static string textCopyIMO {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("textCopyIMO", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to Copy to {0}.
|
/// Looks up a localized string similar to Copy to {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -1876,4 +1876,7 @@
|
|||||||
<data name="exit" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
<data name="exit" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||||
<value>..\Resources\exit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
<value>..\Resources\exit.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="textCopyIMO" xml:space="preserve">
|
||||||
|
<value>Copy IMO to clipboard</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
@ -51,6 +51,11 @@ namespace ENI2
|
|||||||
addItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
addItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/documents.png")) };
|
||||||
addItem.Click += this.copyID;
|
addItem.Click += this.copyID;
|
||||||
this.dataGrid.ContextMenu.Items.Add(addItem);
|
this.dataGrid.ContextMenu.Items.Add(addItem);
|
||||||
|
MenuItem copyIMOItem = new MenuItem();
|
||||||
|
copyIMOItem.Header = Properties.Resources.textCopyIMO;
|
||||||
|
copyIMOItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/document_into.png")) };
|
||||||
|
copyIMOItem.Click += this.copyIMO;
|
||||||
|
this.dataGrid.ContextMenu.Items.Add(copyIMOItem);
|
||||||
cancelItem = new MenuItem();
|
cancelItem = new MenuItem();
|
||||||
cancelItem.Header = Properties.Resources.textUndoCancel;
|
cancelItem.Header = Properties.Resources.textUndoCancel;
|
||||||
cancelItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/delete.png")) };
|
cancelItem.Icon = new Image { Source = new BitmapImage(new Uri("pack://application:,,,/Resources/delete.png")) };
|
||||||
@ -297,6 +302,14 @@ namespace ENI2
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void copyIMO(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
if (dataGrid.SelectedItem is MessageCore selectedCore)
|
||||||
|
{
|
||||||
|
Clipboard.SetText(selectedCore.IMO);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
private void logoImage_MouseUp(object sender, MouseButtonEventArgs e)
|
private void logoImage_MouseUp(object sender, MouseButtonEventArgs e)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user