static void Main()
 {
     Console.WriteLine(DIR);
     LowLevelKeyHooker.SetHook();
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     core = new SteamChatCore();
     LowLevelKeyHooker.UnHook();
 }
Exemple #2
0
        public ChatForm(SteamChatCore core)
        {
            this.core = core;
            this.InitializeComponent();
            this.BackColor        = Color.LightGray;
            this.TransparencyKey  = Color.LightGray;
            this.messageList      = new List <MessageLabel>();
            this.whookList        = new List <LowLevelWindowHooker>();
            this.ChatFormLocation = new Point(int.Parse(ConfigurationManager.AppSettings["ScreenPositionX"]), int.Parse(ConfigurationManager.AppSettings["ScreenPositionY"]));

            this.inputPanel           = new Panel();
            this.inputPanel.BackColor = Color.FromArgb(220, 220, 220);
            this.inputPanel.Width     = 615;
            this.Controls.Add(this.inputPanel);

            this.chatListCombo = new ComboBox();
            this.chatListCombo.DropDownStyle = ComboBoxStyle.DropDownList;
            this.chatListCombo.Location      = new Point(5, MARGIN);
            this.chatListCombo.Width         = 115;
            this.inputPanel.Controls.Add(this.chatListCombo);

            this.infoLabel = new Label();
            this.infoLabel.SetBounds(5, MARGIN + this.chatListCombo.Height + 5, 115, 20);
            this.infoLabel.TextAlign = ContentAlignment.TopCenter;
            this.inputPanel.Controls.Add(this.infoLabel);

            this.mainTextBox          = new InputTextBox(this.infoLabel);
            this.mainTextBox.Location = new Point(125, MARGIN);
            this.mainTextBox.SetBounds(125, MARGIN, 435, 40);
            this.mainTextBox.Font      = new Font(this.mainTextBox.Font.FontFamily, 9F, FontStyle.Regular, GraphicsUnit.Point, ((byte)(129)));
            this.mainTextBox.Multiline = true;
            this.inputPanel.Controls.Add(this.mainTextBox);

            this.sendButton = new Button();
            this.sendButton.SetBounds(565, MARGIN, 45, this.mainTextBox.Height);
            this.sendButton.Text      = "Send";
            this.sendButton.BackColor = Color.FromArgb(220, 220, 220);
            this.sendButton.Click    += this.SendButton_Click;
            this.inputPanel.Controls.Add(this.sendButton);
            this.inputPanel.Height = this.mainTextBox.Height + (MARGIN * 2);

            this.textZone = new Label();

            this.Controls.Add(this.textZone);

            this.setChatAreaHeight(int.Parse(ConfigurationManager.AppSettings["MsgHeight"]));
            this.Deactivate += chatFormFocusLoseEvent;
            LowLevelKeyHooker.KeyBoardHook += this.keyEventListener;

            this.chatListCombo.DataSource            = this.core.ChatInterface.ChattingRooms;
            this.chatListCombo.SelectedValueChanged += this.selectChange;
        }
 public SettingForm(SteamChatCore core)
 {
     this.InitializeComponent();
     this.core = core;
     LowLevelKeyHooker.KeyBoardHook += this.keyboardHook;
 }