This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// | |
/// </summary> | |
public class VMCopyToMenu | |
{ | |
public string MainMenuItemName { get; set; } | |
public ObservableCollection<VMCopyToMenuItem> MenuItems { get; set; } | |
public IList Children |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private ObservableCollection<VMCopyToMenu> Menus; | |
/// <summary> | |
/// | |
/// </summary> | |
public TreeViewWindow() | |
{ | |
InitializeComponent(); | |
Menus = new ObservableCollection<VMCopyToMenu>(); | |
LoadMenuItems(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<TreeView x:Name="SampleTree2"> | |
<TreeView.Resources> | |
<HierarchicalDataTemplate DataType="{x:Type local:VMCopyToMenu}" ItemsSource="{Binding MenuItems}"> | |
<TextBlock Text="{Binding MainMenuItemName}"/> | |
</HierarchicalDataTemplate> | |
<HierarchicalDataTemplate DataType="{x:Type local:VMCopyToMenuItem}" ItemsSource="{Binding MenuItems}" x:Key="Level2" | |
ItemTemplate="{StaticResource Level3}"> | |
<TextBlock Text="{Binding MainMenuItemName}"/> | |
</HierarchicalDataTemplate> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task.Run(() => | |
{ | |
isDirectoryCopySuccessful = CopyHelper.CopyDirectory(sourceLocation, destinationLocation); | |
Win.Application.Current.Dispatcher.Invoke(() => | |
{ | |
BaseWindow.HideNotification(); | |
ShowMessage?.Invoke("Files copied into destination location successfully", "Information"); | |
}); | |
}).ContinueWith((t) => |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// | |
/// </summary> | |
/// <param name="destinationPath"></param> | |
/// <param name="sourcePath"></param> | |
/// <returns></returns> | |
public static bool CheckDestinationPathCorrectness(this string destinationPath, string sourcePath) | |
{ | |
var isValidPath = default(bool); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// | |
/// </summary> | |
/// <returns></returns> | |
private static void InstallUpdateSyncWithInfo() | |
{ | |
try | |
{ | |
if (ApplicationDeployment.IsNetworkDeployed) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8" ?> | |
<configuration > | |
<add key="Mode" value="NoMode"/> | |
</configuration> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<DataGrid Grid.Row="1" x:Name="DataGrid" HorizontalAlignment="Left" VerticalAlignment="Top" ItemsSource="{Binding PersonDetails}"> | |
<!--<DataGrid.Resources> | |
<local:OneReturnsTrueConverter x:Key="OneReturnsTrueConverter"/> | |
<ContextMenu x:Key="DataRowContextMenu"> | |
<MenuItem x:Name="RowContMenuProp" Header="Properties" | |
DataContext="{Binding Parent.PlacementTarget.Tag , RelativeSource={RelativeSource Self}}" | |
IsEnabled="{Binding Path=IsMarried, Converter={StaticResource OneReturnsTrueConverter}}" /> | |
</ContextMenu> | |
</DataGrid.Resources>--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
System.Xml.Serialization.XmlSerializer ser = new System.Xml.Serialization.XmlSerializer(typeof(Response)); | |
using (StringReader sr = new StringReader(categories)) | |
{ | |
var result = ser.Deserialize(sr); | |
} | |
[Serializable, XmlRoot("response")] | |
public class Response | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static void WmGetMinMaxInfo(IntPtr hwnd, IntPtr lParam) | |
{ | |
MINMAXINFO mmi = (MINMAXINFO)Marshal.PtrToStructure(lParam, typeof(MINMAXINFO)); | |
int MONITOR_DEFAULTTONEAREST = 0x00000002; | |
IntPtr monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); | |
if (monitor != IntPtr.Zero) | |
{ | |
MONITORINFO monitorInfo = new MONITORINFO(); |
OlderNewer