Esempio n. 1
0
    public static string SetOp(string left, string right)
    {
        if (XString.Eq(left
                       , "Server.Id"
                       ))
        {
            ServerWindow.Text = right;
        }
        else if (XString.Eq(left, "Logfile"))
        {
            if (XString.Eq(right, "Delete"))
            {
                XLog.DeleteLogfile();
            }
        }

        //else if (XString.Eq(left
        //    , "test"
        //    ))
        //{
        //    var doc = Dte.ActiveDocument as Document;
        //    var selection = doc.Selection as TextSelection;
        //    selection.MoveToAbsoluteOffset(1, false);
        //    selection.MoveToAbsoluteOffset(5, true);
        //}



        return("");
    }
Esempio n. 2
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.");
     }
 }
Esempio n. 3
0
 private void EnableButton_Click(object sender, EventArgs e)
 {
     Ide.StatusBar_Set("Enable starts...");
     if (ServerManager.CanEnable())
     {
         Thread.Sleep(250);
         XLog.DeleteLogfile();
         Thread.Sleep(1250);
         ServerManager.EnableServer();
         Ide.StatusBar_Set("Enable succeeded");
     }
     else
     {
         Ide.StatusBar_Set("Enable failed, because the settings are invalid.");
     }
 }