private void ShowChat(object sender, MouseButtonEventArgs e) { e.Handled = true; _chatbox = new Chatbox { Owner = this }; _chatbox.ShowWindow(); }
public MainWindow() { InitializeComponent(); var currentDomain = AppDomain.CurrentDomain; // Handler for unhandled exceptions. currentDomain.UnhandledException += GlobalUnhandledExceptionHandler; // Handler for exceptions in threads behind forms. Application.ThreadException += GlobalThreadExceptionHandler; if (BasicTeraData.Instance.WindowData.InvisibleUi) { Visibility = Visibility.Hidden; } System.Windows.Application.Current.Resources["Scale"] = BasicTeraData.Instance.WindowData.Scale; Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle; TeraSniffer.Instance.Enabled = true; NetworkController.Instance.Connected += HandleConnected; NetworkController.Instance.TickUpdated += Update; NetworkController.Instance.SetClickThrouAction += SetClickThrou; NetworkController.Instance.UnsetClickThrouAction += UnsetClickThrou; NetworkController.Instance.GuildIconAction += InstanceOnGuildIconAction; var dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += UpdateKeyboard; dispatcherTimer.Interval = new TimeSpan(0, 0, 1); dispatcherTimer.Start(); EntityStatsImage.Source = BasicTeraData.Instance.ImageDatabase.EntityStats.Source; Chrono.Source = BasicTeraData.Instance.ImageDatabase.Chronobar.Source; Chrono.ToolTip = LP.MainWindow_Only_boss; CloseWindow.Source = BasicTeraData.Instance.ImageDatabase.Close.Source; History.Source = BasicTeraData.Instance.ImageDatabase.History.Source; Config.Source = BasicTeraData.Instance.ImageDatabase.Config.Source; Chatbox.Source = BasicTeraData.Instance.ImageDatabase.Chat.Source; ListEncounter.PreviewKeyDown += ListEncounterOnPreviewKeyDown; UpdateComboboxEncounter(new List <NpcEntity>(), null); Title = "Shinra Meter V" + UpdateManager.Version; BackgroundColor.Opacity = BasicTeraData.Instance.WindowData.MainWindowOpacity; Closing -= ClickThrouWindow_Closing; Topmost = BasicTeraData.Instance.WindowData.Topmost; Scroller.MaxHeight = BasicTeraData.Instance.WindowData.NumberOfPlayersDisplayed * 30; _entityStats = new EntityStatsMain(this); _chatbox = new Chatbox(new List <ChatMessage>()); _windowHistory = new TeradpsHistory(new ConcurrentDictionary <string, NpcEntity>()); Console.WriteLine( "SuperUniqueStringEasilyDetectableToBeAbleToRandomizeTheProgramAndBypassSignatureBasedBlock"); _systemTray = new SystemTray(this); KeyboardHook.Instance.SwitchTopMost += delegate { _systemTray.SwitchStayTop(); }; }
public MainWindow() { InitializeComponent(); var currentDomain = default(AppDomain); currentDomain = AppDomain.CurrentDomain; // Handler for unhandled exceptions. currentDomain.UnhandledException += GlobalUnhandledExceptionHandler; // Handler for exceptions in threads behind forms. Application.ThreadException += GlobalThreadExceptionHandler; if (BasicTeraData.Instance.WindowData.InvisibleUI) { Visibility = Visibility.Hidden; } App.Current.Resources["Scale"] = BasicTeraData.Instance.WindowData.Scale; Process.GetCurrentProcess().PriorityClass = ProcessPriorityClass.Idle; TeraSniffer.Instance.Enabled = true; NetworkController.Instance.Connected += HandleConnected; NetworkController.Instance.TickUpdated += Update; NetworkController.Instance.SetClickThrouAction += SetClickThrou; NetworkController.Instance.UnsetClickThrouAction += UnsetClickThrou; var dispatcherTimer = new DispatcherTimer(); dispatcherTimer.Tick += UpdateKeyboard; dispatcherTimer.Interval = new TimeSpan(0, 0, 1); dispatcherTimer.Start(); PinImage.Source = BasicTeraData.Instance.ImageDatabase.UnPin.Source; EntityStatsImage.Source = BasicTeraData.Instance.ImageDatabase.EntityStats.Source; Chrono.Source = BasicTeraData.Instance.ImageDatabase.Chrono.Source; CloseWindow.Source = BasicTeraData.Instance.ImageDatabase.Close.Source; History.Source = BasicTeraData.Instance.ImageDatabase.History.Source; Config.Source = BasicTeraData.Instance.ImageDatabase.Config.Source; this.Chatbox.Source = BasicTeraData.Instance.ImageDatabase.Chat.Source; ListEncounter.PreviewKeyDown += ListEncounterOnPreviewKeyDown; UpdateComboboxEncounter(new LinkedList <KeyValuePair <Entity, EntityInfo> >(), null); Title = "Shinra Meter V" + UpdateManager.Version; BackgroundColor.Opacity = BasicTeraData.Instance.WindowData.MainWindowOpacity; Closing -= ClickThrouWindow_Closing; Topmost = BasicTeraData.Instance.WindowData.Topmost; _entityStats = new EntityStatsMain(this); _chatbox = new Chatbox(new List <ChatMessage>()); _windowHistory = new TeradpsHistory(new ConcurrentDictionary <string, Entity>()); Console.WriteLine("SuperUniqueStringEasilyDetectableToBeAbleToRandomizeTheProgramAndBypassSignatureBasedBlock"); TrayConfiguration(); }
private void ShowChat(object sender, MouseButtonEventArgs e) { e.Handled = true; _chatbox = new Chatbox(); _chatbox.Show(); }