Exemple #1
0
 private void ClearLogfileButton_Click(object sender, EventArgs e)
 {
     if (XLog.Exists)
     {
         XLog.DeleteLogfile();
         XMB.Info("The Logfile has been deleted.");
     }
     else
     {
         XMB.Info("The Logfile has already been deleted.");
     }
 }
Exemple #2
0
    private void OpenLogfileButton_Click(object sender, EventArgs e)
    {
        if (XLog.Exists)
        {
            XLog.DeleteLogfileIfTooLarge();

            var process = new Process();
            process.StartInfo.FileName  = "notepad";
            process.StartInfo.Arguments = "\"" + XLog.LogFile + "\"";
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.CreateNoWindow         = true;
            process.StartInfo.UseShellExecute        = false;
            process.Start();
        }
        else
        {
            XMB.Info("No logs are available.");
        }
    }
Exemple #3
0
    private void LabButton_Click(object sender, EventArgs e)
    {
        var temp = Path.GetTempPath();

        if (!temp.EndsWith("\\"))
        {
            temp += "\\";
        }
        temp += "IdeX";
        if (!Directory.Exists(temp))
        {
            Directory.CreateDirectory(temp);
        }
        var labExe = temp + "\\IdexLab_64.exe";

        if (!File.Exists(labExe))
        {
            byte[] exeBytes = IdeX.MainResource.IdexLab_64;
            using (var stream = new FileStream(labExe, FileMode.CreateNew, FileAccess.Write))
            {
                byte[] bytes = exeBytes;
                stream.Write(bytes, 0, bytes.Length);
                stream.Close();
                stream.Dispose();
            }
        }
        if (File.Exists(labExe))
        {
            var process = new Process();
            process.StartInfo.FileName  = labExe;
            process.StartInfo.Arguments = "";
            process.StartInfo.RedirectStandardOutput = true;
            process.StartInfo.CreateNoWindow         = true;
            process.StartInfo.UseShellExecute        = false;
            process.Start();
        }
        else
        {
            XMB.Info("The IdeX Lab is not available.");
        }
    }
Exemple #4
0
    private void EnableButton_Click(object sender, EventArgs e)
    {
        ServerIdText.Text = ServerIdText.Text.Trim();

        if (!ServerId_CheckSyntax())
        {
            XMB.Info("The given Id is not valid.");
            ServerIdText.Focus();
            return;
        }

        if (!Marker_CheckSyntax())
        {
            XMB.Info("The given Marker is not valid.");
            MarkerText.Focus();
            return;
        }

        GeneralPageInstance.SaveSettingsToStorage();
        ServerManager.EnableServer();
    }
Exemple #5
0
    private void RunButton_Click(object sender, EventArgs e)
    {
        var command = RequestText.Text;
        var code    = "";

        if (XString.Eq(command, "1"))
        {
            code = IdexLab.MainResource.Request_1;
        }
        else if (XString.Eq(command, "2"))
        {
            code = IdexLab.MainResource.Request_2;
        }
        else if (XString.Eq(command, "all"))
        {
            code = IdexLab.MainResource.Request_All;
        }
        else
        {
            XMB.Info("Command is unknown.", ProductInfo.Name);
        }
        RequestText.Text = code;
    }