public static void Log(string s, object color = null)
 {
     if (box == null)
     {
         return;
     }
     try
     {
         box.Invoke(new Action(delegate
         {
             string stamp = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString() + " : ";
             Color c;
             if (color != null)
             {
                 c = (Color)color;
             }
             else
             {
                 c = Color.Black;
             }
             box.SelectionStart  = box.TextLength;
             box.SelectionLength = 0;
             box.SelectionColor  = c;
             box.AppendText(stamp + s + "\n");
             BackendLog.Write(stamp + s + "\n");
             box.SelectionColor = box.ForeColor;
             box.ScrollToCaret();
         }));
     }
     catch { }
 }
Beispiel #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            checkBox1.Enabled           =
                checkBox2.Enabled       =
                    checkBox3.Enabled   =
                        button6.Enabled = false;
            BackendLog.Clear();
            string globalip = textBox1.Text;

            ProviderInfo.backendIP  = textBox1.Text;
            RedirectorServer.useSSL = checkBox1.Checked;
            if (!checkBox2.Checked)
            {
                RedirectorServer.targetPort = 30001;
            }
            MagmaServer.basicMode = true;
            RichTextBox rtb1 = null;

            RedirectorServer.box        =
                BlazeServer.box         =
                    Webserver.box       =
                        MagmaServer.box = rtb1;
            RedirectorServer.Start();
            BlazeServer.Start();
            MagmaServer.Start();
            if (checkBox3.Checked)
            {
                Webserver.Start();
            }
        }
Beispiel #3
0
 private void Start()
 {
     BackendLog.Clear();
     ProviderInfo.backendIP  = toolStripTextBox3.Text;
     RedirectorServer.box    =
         BlazeServer.box     = rtb2;
     Webserver.box           = rtb5;
     MagmaServer.box         = rtb4;
     RedirectorServer.useSSL = checkBox1.Checked;
     RedirectorServer.Start();
     BlazeServer.Start();
     MagmaServer.Start();
     Webserver.Start();
 }
Beispiel #4
0
 public static void Log(string s)
 {
     if (box == null)
     {
         return;
     }
     try
     {
         box.Invoke(new Action(delegate
         {
             string stamp = DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString() + " : ";
             box.AppendText(stamp + s + "\n");
             BackendLog.Write(stamp + s + "\n");
             box.SelectionStart = box.Text.Length;
             box.ScrollToCaret();
         }));
     }
     catch { }
 }