Exemple #1
0
 private void OnDisableClicked(object sender, RoutedEventArgs e)
 {
     try
     {
         FiddlerIISProxy.Off();
         DrawStatus();
     }
     catch (Exception exception)
     {
         ShowMessageBoxWithError(exception);
     }
 }
Exemple #2
0
        private void DrawStatus()
        {
            var status = FiddlerIISProxy.Status();

            if (status)
            {
                BrdrStatus.Background = new SolidColorBrush(Colors.DarkSeaGreen);
                TxtStatus.Text        = "On";
                Title = "Diddle: On";
            }
            else
            {
                BrdrStatus.Background = new SolidColorBrush(Colors.DarkGray);
                TxtStatus.Text        = "Off";
                Title = "Diddle: Off";
            }
        }
Exemple #3
0
        public static void Main(string[] args)
        {
            try
            {
                if (args.Length != 1)
                {
                    PrintHelp();
                    return;
                }

                switch (args[0])
                {
                case "on":
                    FiddlerIISProxy.On();
                    break;

                case "off":
                    FiddlerIISProxy.Off();
                    break;

                case "status":
                    var status = FiddlerIISProxy.Status();
                    if (status)
                    {
                        Console.ForegroundColor = ConsoleColor.Green;
                        Console.WriteLine("On");
                    }
                    else
                    {
                        Console.ForegroundColor = ConsoleColor.Yellow;
                        Console.WriteLine("Off");
                    }
                    Console.ResetColor();
                    break;
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }