private void HasLoaded(object sender, RoutedEventArgs e) { string ip = Constants.ISLAN ? "127.0.0.1" : new WebClient().DownloadString("http://icanhazip.com"); string name = "Dennis"; #if !DEBUG ServerConnection.I.Port = 4444; name = "Indie " + name; #endif Core.Util.Log.I.Add(name); User.I.Load(ip, PeerConnection.GetLocalIPAddress(), name); ServerConnection.I.Connect(); Navigator.I.Init(); Log.Show(); }
private void Form1_Load(object sender, EventArgs e) { ///////////////// Dock Pannels this.dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.Controls.Add(this.dockPanel); this.graph = new Editor(); graph.Text = "dddddddddd"; graph.Show(this.dockPanel, DockState.Document); this.log = new Log.Log(); log.Text = "dddddddddd"; log.Show(this.dockPanel, DockState.DockBottom); if (log.init()) { } //logger.Info("Модуль логгера инициализирован"); //else logger.Error("Ошибка инициализации модуля логгера"); this.tools = new Toolbox(); tools.Text = "Типы объектов"; tools.Show(this.dockPanel, DockState.DockLeft); /////////////////////////////// new Thread(new ThreadStart(new Action(() => { while (!stopAllThreads) { logger.Log(LogLevel.Debug, "debug mes"); logger.Log(LogLevel.Trace, "debug mes"); Thread.Sleep(500); logger.Log(LogLevel.Info, "info mes"); logger.Log(LogLevel.Warn, "inhhhfo mes"); logger.Log(LogLevel.Error, "info mes"); logger.Log(LogLevel.Fatal, "info mes"); Thread.Sleep(500); } }))).Start(); }