internal static void InitializeConsole(MainWindow wnd) { if (s_console == null) s_console = new ConsoleWindow(wnd); else throw new InvalidOperationException("Console is already initialized."); }
public LoadingWindow(MainWindow window) { InitializeComponent(); this.Owner = window; this.Style = window.Style; window.StyleChanged += (o, e) => this.Style = this.Owner.Style; m_window = window; }
/// <summary> /// Initializes a new instance of <see cref="Kamilla.PacketViewer.WPF.ConsoleWindow"/> class. /// </summary> public ConsoleWindow(MainWindow window) { InitializeComponent(); m_maxConsoleEntries = Configuration.GetValue("Max Console Entries", 512); m_window = window; this.Style = window.Style; window.StyleChanged += (o, e) => this.Style = m_window.Style; window.Activated += new EventHandler(MainWindow_Activated); ConsoleWriter.ConsoleWrite += new ConsoleWriteEventHandler(ConsoleWriter_ConsoleWrite); Console.WriteLine("Console Window Initialized."); }
internal ViewerImplementation(MainWindow window) { m_window = window; m_interopHelper = new WindowInteropHelper(window); m_items = new ViewerItemCollection(this); m_items.ItemQueried += new ViewerItemEventHandler(m_items_ItemQueried); m_packetAddedHandler = new PacketAddedEventHandler(m_currentLog_PacketAdded); m_parsingWorker = new BackgroundWorker() { WorkerSupportsCancellation = true }; m_parsingWorker.DoWork += new DoWorkEventHandler(m_parsingWorker_DoWork); m_pluginCommands = new List<PluginCommand>(); }
public GoToPacketWindow(MainWindow window) { this.Owner = window; InitializeComponent(); this.Style = window.Style; m_count = window.Implementation.CurrentLog.Count; ui_lblPacketNumber.Content = Strings.GoTo_PacketNumber.LocalizedFormat(0, m_count - 1); //var item = window.SelectedItem; //if (item == null) // ui_tbValue.Text = "0"; //else // ui_tbValue.Text = window.SelectedItem.Index.ToString(); }
public SearchWindow(MainWindow window) { this.Owner = window; InitializeComponent(); m_window = window; this.Style = window.Style; window.StyleChanged += (o, e) => this.Style = this.Owner.Style; window.Implementation.ProtocolChanged += new EventHandler(Implementation_ProtocolChanged); if (window.CurrentProtocol != null && window.CurrentProtocol.OpcodesEnumType != null) this.UpdateOpcodeNames(); var modeRadioButtons = new[] { ui_rbBinaryContents, ui_rbOpcodes, ui_rbPacketContents, ui_rbParserOutput, ui_rbTextContents }; // Load Recent Searches, must be first var recentSearches = Configuration.GetValue("Searches", new List<string>()); int delta = recentSearches.Count - s_nRecentSearches; if (delta > 0) recentSearches.RemoveRange(s_nRecentSearches, delta); m_recentSearches = new ObservableCollection<string>(recentSearches); // Load Search Mode var mode = Configuration.GetValue("Mode", SearchMode.Opcodes); if (!Enum.IsDefined(typeof(SearchMode), mode)) mode = SearchMode.Opcodes; var modeString = mode.ToString(); modeRadioButtons.Single(button => (string)button.Tag == modeString).IsChecked = true; // Load Misc Options ui_cbMatchCase.IsChecked = Configuration.GetValue("CaseSensitive", false); ui_cbRegex.IsChecked = Configuration.GetValue("Regex", false); ui_cbAllowSpecialChars.IsChecked = Configuration.GetValue("Chars", false); }