コード例 #1
0
ファイル: ChatManager.cs プロジェクト: hekar/Vaporized
        public ChatManager(Settings settings)
        {
			this.settings = settings;
            chatMap = new Dictionary<SteamID, ChatDialog>();

            Steam3.AddHandler( this );
        }
コード例 #2
0
ファイル: ReadSettings.cs プロジェクト: hekar/Vaporized
        public Settings Read()
        {
            Settings settings = new Settings();
            //settings.Main.Reload();
            //settings.Color.Reload();

            return settings;
        }
コード例 #3
0
ファイル: SteamContext.cs プロジェクト: hekar/Vaporized
        public static void Initialize(Settings settings)
        {
			Boolean useUdp = settings.Main.steam3_useUdp;
            SteamClient = new SteamClient( useUdp ? ProtocolType.Udp : ProtocolType.Tcp );

            SteamFriends = SteamClient.GetHandler<SteamFriends>();
            SteamUser = SteamClient.GetHandler<SteamUser>();

            ChatManager = new ChatManager(settings);
        }
コード例 #4
0
ファイル: Login.cs プロジェクト: hekar/Vaporized
		public Login (Vapor.State.Settings settings) : 
				base(Gtk.WindowType.Toplevel)
		{
			this.Build ();
			
			this.settings = settings;
			
			SetupDefaults ();
			SetupChildren ();
			AddListeners ();
		}
コード例 #5
0
ファイル: ChatDialog.cs プロジェクト: hekar/Vaporized
        public ChatDialog(Settings settings, SteamID steamId)
        {
            InitializeComponent();

            chatFriend.UpdateFriend( new Friend( steamId ) );

            chatFriend.CanOpenProfile = true;
            chatFriend.BorderStyle = BorderStyle.None;

            chatFriend.DisableContextMenu();
            chatFriend.DisableDoubleClick();

            this.Text = string.Format( "{0} - Chat", chatFriend.Friend.GetName() );

            this.chatFriend.IsHighlighted = false;
			
            setupFonts();
            
			this.txtChat.Select();
        }
コード例 #6
0
ファイル: FriendControl.cs プロジェクト: hekar/Vaporized
        public FriendControl(Vapor.State.Settings settings)
        {
            this.settings = settings;
            InitializeComponent();

            btnAccept.Visible = false;
            btnDeny.Visible = false;

            IsHighlighted = true;

            Steam3.AddHandler( this );

            this.MouseDoubleClick += FriendControl_MouseDoubleClick;
            this.MouseEnter += FriendControl_MouseEnter;
            this.MouseLeave += FriendControl_MouseLeave;

            foreach ( Control ctrl in this.Controls )
            {
                ctrl.MouseDoubleClick += FriendControl_MouseDoubleClick;
                ctrl.MouseEnter += FriendControl_MouseEnter;
                ctrl.MouseLeave += FriendControl_MouseLeave;
            }
        }
コード例 #7
0
ファイル: StatusColor.cs プロジェクト: hekar/Vaporized
 public StatusColor(Settings settings)
 {
     this.settings = settings;
 }
コード例 #8
0
ファイル: SaveSettings.cs プロジェクト: hekar/Vaporized
 public void Save(Settings settings)
 {
     settings.Main.Save();
     settings.Color.Save();
 }
コード例 #9
0
ファイル: MainForm.Designer.cs プロジェクト: hekar/Vaporized
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent(Settings settings)
        {
            this.components = new System.ComponentModel.Container();
            this.panel1 = new System.Windows.Forms.Panel();
            this.stateComboBox = new System.Windows.Forms.ComboBox();
            this.vaporContextMenu1 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.addFriendToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
            this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
            this.vaporContextMenu2 = new System.Windows.Forms.ContextMenuStrip(this.components);
            this.showHideToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripSeparator();
            this.exitToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.menuStrip = new System.Windows.Forms.MenuStrip();
            this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.exitToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.steamToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.addFriendToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
            this.friendsFlow = new Vapor.FriendsListControl();
            this.selfControl = new Vapor.FriendControl(settings);
            this.toolsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.optionsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
            this.panel1.SuspendLayout();
            this.vaporContextMenu1.SuspendLayout();
            this.vaporContextMenu2.SuspendLayout();
            this.menuStrip.SuspendLayout();
            this.SuspendLayout();
            // 
            // panel1
            // 
            this.panel1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.panel1.Controls.Add(this.stateComboBox);
            this.panel1.Controls.Add(this.selfControl);
            this.panel1.Dock = System.Windows.Forms.DockStyle.Top;
            this.panel1.Location = new System.Drawing.Point(0, 26);
            this.panel1.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(280, 67);
            this.panel1.TabIndex = 0;
            // 
            // stateComboBox
            // 
            this.stateComboBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                        | System.Windows.Forms.AnchorStyles.Right)));
            this.stateComboBox.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.stateComboBox.FormattingEnabled = true;
            this.stateComboBox.Items.AddRange(new object[] {
            "Online",
            "Away",
            "Busy",
            "Snooze",
            "Offline"});
            this.stateComboBox.Location = new System.Drawing.Point(71, 30);
            this.stateComboBox.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.stateComboBox.Name = "stateComboBox";
            this.stateComboBox.Size = new System.Drawing.Size(202, 24);
            this.stateComboBox.TabIndex = 1;
            this.stateComboBox.SelectedIndexChanged += new System.EventHandler(this.stateComboBox_SelectedIndexChanged);
            // 
            // vaporContextMenu1
            // 
            this.vaporContextMenu1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.addFriendToolStripMenuItem,
            this.toolStripMenuItem1,
            this.refreshToolStripMenuItem});
            this.vaporContextMenu1.Name = "vaporContextMenu1";
            this.vaporContextMenu1.ShowImageMargin = false;
            this.vaporContextMenu1.Size = new System.Drawing.Size(136, 54);
            // 
            // addFriendToolStripMenuItem
            // 
            this.addFriendToolStripMenuItem.Name = "addFriendToolStripMenuItem";
            this.addFriendToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.addFriendToolStripMenuItem.Text = "Add Friend...";
            this.addFriendToolStripMenuItem.Click += new System.EventHandler(this.addFriendToolStripMenuItem_Click);
            // 
            // toolStripMenuItem1
            // 
            this.toolStripMenuItem1.Name = "toolStripMenuItem1";
            this.toolStripMenuItem1.Size = new System.Drawing.Size(132, 6);
            // 
            // refreshToolStripMenuItem
            // 
            this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem";
            this.refreshToolStripMenuItem.Size = new System.Drawing.Size(135, 22);
            this.refreshToolStripMenuItem.Text = "Refresh";
            this.refreshToolStripMenuItem.Click += new System.EventHandler(this.refreshListToolStripMenuItem_Click);
            // 
            // notifyIcon1
            // 
            this.notifyIcon1.ContextMenuStrip = this.vaporContextMenu2;
            this.notifyIcon1.Text = "Vapor";
            this.notifyIcon1.Visible = true;
            this.notifyIcon1.MouseDoubleClick += new System.Windows.Forms.MouseEventHandler(this.notifyIcon1_MouseDoubleClick);
            // 
            // vaporContextMenu2
            // 
            this.vaporContextMenu2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.showHideToolStripMenuItem,
            this.toolStripMenuItem2,
            this.exitToolStripMenuItem});
            this.vaporContextMenu2.Name = "vaporContextMenu2";
            this.vaporContextMenu2.ShowImageMargin = false;
            this.vaporContextMenu2.Size = new System.Drawing.Size(132, 54);
            // 
            // showHideToolStripMenuItem
            // 
            this.showHideToolStripMenuItem.Name = "showHideToolStripMenuItem";
            this.showHideToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
            this.showHideToolStripMenuItem.Text = "[Show/Hide]";
            this.showHideToolStripMenuItem.Click += new System.EventHandler(this.showHideToolStripMenuItem_Click);
            // 
            // toolStripMenuItem2
            // 
            this.toolStripMenuItem2.Name = "toolStripMenuItem2";
            this.toolStripMenuItem2.Size = new System.Drawing.Size(128, 6);
            // 
            // exitToolStripMenuItem
            // 
            this.exitToolStripMenuItem.Name = "exitToolStripMenuItem";
            this.exitToolStripMenuItem.Size = new System.Drawing.Size(131, 22);
            this.exitToolStripMenuItem.Text = "Exit";
            this.exitToolStripMenuItem.Click += new System.EventHandler(this.exitToolStripMenuItem_Click);
            // 
            // menuStrip
            // 
            this.menuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.fileToolStripMenuItem,
            this.steamToolStripMenuItem,
            this.toolsToolStripMenuItem});
            this.menuStrip.Location = new System.Drawing.Point(0, 0);
            this.menuStrip.Name = "menuStrip";
            this.menuStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System;
            this.menuStrip.Size = new System.Drawing.Size(280, 26);
            this.menuStrip.TabIndex = 2;
            this.menuStrip.Text = "menuStrip";
            // 
            // fileToolStripMenuItem
            // 
            this.fileToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.exitToolStripMenuItem1});
            this.fileToolStripMenuItem.Name = "fileToolStripMenuItem";
            this.fileToolStripMenuItem.Size = new System.Drawing.Size(40, 22);
            this.fileToolStripMenuItem.Text = "&File";
            // 
            // exitToolStripMenuItem1
            // 
            this.exitToolStripMenuItem1.Name = "exitToolStripMenuItem1";
            this.exitToolStripMenuItem1.Size = new System.Drawing.Size(99, 22);
            this.exitToolStripMenuItem1.Text = "E&xit";
            // 
            // steamToolStripMenuItem
            // 
            this.steamToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.addFriendToolStripMenuItem1});
            this.steamToolStripMenuItem.Name = "steamToolStripMenuItem";
            this.steamToolStripMenuItem.Size = new System.Drawing.Size(66, 22);
            this.steamToolStripMenuItem.Text = "&Friends";
            // 
            // addFriendToolStripMenuItem1
            // 
            this.addFriendToolStripMenuItem1.Name = "addFriendToolStripMenuItem1";
            this.addFriendToolStripMenuItem1.Size = new System.Drawing.Size(152, 22);
            this.addFriendToolStripMenuItem1.Text = "&Add Friend";
            // 
            // friendsFlow
            // 
            this.friendsFlow.AutoScroll = true;
            this.friendsFlow.ContextMenuStrip = this.vaporContextMenu1;
            this.friendsFlow.Dock = System.Windows.Forms.DockStyle.Fill;
            this.friendsFlow.FlowDirection = System.Windows.Forms.FlowDirection.TopDown;
            this.friendsFlow.Location = new System.Drawing.Point(0, 93);
            this.friendsFlow.Margin = new System.Windows.Forms.Padding(4);
            this.friendsFlow.Name = "friendsFlow";
            this.friendsFlow.Size = new System.Drawing.Size(280, 485);
            this.friendsFlow.TabIndex = 0;
            this.friendsFlow.WrapContents = false;
            // 
            // selfControl
            // 
            this.selfControl.AvatarHash = null;
            this.selfControl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
            this.selfControl.CanOpenProfile = false;
            this.selfControl.IsHighlighted = true;
            this.selfControl.Location = new System.Drawing.Point(4, 4);
            this.selfControl.Margin = new System.Windows.Forms.Padding(5);
            this.selfControl.Name = "selfControl";
            this.selfControl.Size = new System.Drawing.Size(271, 56);
            this.selfControl.TabIndex = 0;
            // 
            // toolsToolStripMenuItem
            // 
            this.toolsToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
            this.optionsToolStripMenuItem});
            this.toolsToolStripMenuItem.Name = "toolsToolStripMenuItem";
            this.toolsToolStripMenuItem.Size = new System.Drawing.Size(55, 22);
            this.toolsToolStripMenuItem.Text = "&Tools";
            // 
            // optionsToolStripMenuItem
            // 
            this.optionsToolStripMenuItem.Name = "optionsToolStripMenuItem";
            this.optionsToolStripMenuItem.Size = new System.Drawing.Size(152, 22);
            this.optionsToolStripMenuItem.Text = "&Options";
            // 
            // MainForm
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(280, 578);
            this.Controls.Add(this.friendsFlow);
            this.Controls.Add(this.panel1);
            this.Controls.Add(this.menuStrip);
            this.MainMenuStrip = this.menuStrip;
            this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
            this.MinimumSize = new System.Drawing.Size(19, 239);
            this.Name = "MainForm";
            this.Text = "Vapor";
            this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.MainForm_FormClosing);
            this.ResizeEnd += new System.EventHandler(this.MainForm_ResizeEnd);
            this.VisibleChanged += new System.EventHandler(this.MainForm_VisibleChanged);
            this.panel1.ResumeLayout(false);
            this.vaporContextMenu1.ResumeLayout(false);
            this.vaporContextMenu2.ResumeLayout(false);
            this.menuStrip.ResumeLayout(false);
            this.menuStrip.PerformLayout();
            this.ResumeLayout(false);
            this.PerformLayout();

        }