Skip to content

Instantly share code, notes, and snippets.

public static void ExecuteCommand(String checkOutFile)
{
int ExitCode;
ProcessStartInfo ProcessInfo;
Process process;
ProcessInfo = new ProcessStartInfo(checkOutFile);
ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = false;
ProcessInfo.WorkingDirectory = System.IO.Path.GetDirectoryName(checkOutFile);
@julesx
julesx / program.cs
Created June 21, 2018 15:11
command line work
private static void RunSelectedTests(List<String> apexClasses)
{
using (var cmdProcess = InitCmdProcess())
{
using (StreamWriter cmdProcessWriter = cmdProcess.StandardInput)
{
var selectedTests = string.Join(",", apexClasses);
cmdProcessWriter.WriteLine("sfdx force:apex:test:run -n " + selectedTests);// + " -d \"c:\\my stuff\\logs\"");
}
@julesx
julesx / program.cs
Created June 21, 2018 15:11
command line work
private static void RunSelectedTests(List<String> apexClasses)
{
using (var cmdProcess = InitCmdProcess())
{
using (StreamWriter cmdProcessWriter = cmdProcess.StandardInput)
{
var selectedTests = string.Join(",", apexClasses);
cmdProcessWriter.WriteLine("sfdx force:apex:test:run -n " + selectedTests);// + " -d \"c:\\my stuff\\logs\"");
}
<CheckBox x:Class="WpfApp1.ImageCheckBox"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:WpfApp1"
Name="RootCheckBox"
mc:Ignorable="d"
d:DesignHeight="450" d:DesignWidth="800">
<CheckBox.Template>
public class VisualElementLostFocusBehavior : Behavior<VisualElement>
{
public static readonly BindableProperty CommandProperty =
BindableProperty.Create("Command", typeof(ICommand), typeof(VisualElementLostFocusBehavior));
public ICommand Command
{
get { return (ICommand)GetValue(CommandProperty); }
set { SetValue(CommandProperty, value); }
}
@julesx
julesx / MainWindow.xaml
Created August 11, 2017 18:13
MouseEnterTest
<Window x:Class="WpfApplication16.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication16"
xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
mc:Ignorable="d"
Title="MainWindow" Height="350" Width="525">
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class LoginPage : ContentPage
{
public LoginPage()
{
InitializeComponent();
NavigationPage.SetHasNavigationBar(this, false);
BindingContext = Activator.CreateInstance(Globals.LoginPageViewModel);
// For users without passwords
public class BaseRegisterVm
{
public Constants.AuthenticationType UserType { get; set; }
public BaseRegisterVm()
{
UserType = Constants.AuthenticationType.Windows;
}
@julesx
julesx / frametest.xaml
Created June 2, 2017 15:16
Frame differences between iOS and Android
<StackLayout Orientation="Vertical" Margin="0,10,0,0">
<Label Text="FUNCTIONS" FontSize="Micro" FontAttributes="Bold" HorizontalOptions="Center" Margin="0,0,0,2" />
<Frame Margin="10,0,10,10" Padding="20,5">
<ListView ItemsSource="{Binding MenuItems}" Footer="{Binding}" HasUnevenRows="True">
<ListView.Behaviors>
<behavior:ListBoxDeselectSelectedItemBehavior />
[assembly: Xamarin.Forms.ExportRenderer(typeof(LandscapePage), typeof(LandscapePageRenderer))]
namespace Mobile.Core.Droid.Renderers
{
public class LandscapePageRenderer : PageRenderer
{
protected override void OnElementChanged(ElementChangedEventArgs<Page> e)
{
base.OnElementChanged(e);
((FormsAppCompatActivity)Context).RequestedOrientation = ScreenOrientation.Landscape;