Beispiel #1
0
 public MainWindow() : base(800, 600, false)
 {
     Version     = "LancerEdit " + Platform.GetInformationalVersion <MainWindow>();
     MaterialMap = new MaterialMap();
     MaterialMap.AddRegex(new LibreLancer.Ini.StringKeyValue("^nomad.*$", "NomadMaterialNoBendy"));
     MaterialMap.AddRegex(new LibreLancer.Ini.StringKeyValue("^n-texture.*$", "NomadMaterialNoBendy"));
     FLLog.UIThread   = this;
     FLLog.AppendLine = (x, severity) =>
     {
         logText.AppendLine(x);
         if (logText.Length > 16384)
         {
             logText.Remove(0, logText.Length - 16384);
         }
         logBuffer.SetText(logText.ToString());
         if (severity == LogSeverity.Error)
         {
             errorTimer = 9;
             Bell.Play();
         }
     };
     Config      = EditorConfiguration.Load();
     logBuffer   = new TextBuffer(32768);
     recentFiles = new RecentFilesHandler(OpenFile);
 }
Beispiel #2
0
 public override void Save()
 {
     if (validXml)
     {
         File.WriteAllText(path, textEditor.GetText());
         uiContext.Stylesheet = currentStylesheet;
     }
     else
     {
         Bell.Play();
     }
 }