Пример #1
0
 public ChatService(VideoSync videoSync, RichTextBox chatArea)
 {
     this.VideoSync = videoSync;
     this.ChatArea = chatArea;
     this.ChatArea.TextChanged += OnChatTextChanged;
     this.VideoSync.InputWrapper += OnNetworkInput;
 }
Пример #2
0
        public VideoForm(String url)
        {
            InitializeComponent();

            #region VideoSync Setup
            VideoSync = new VideoSync(this, ref Player, Properties.Settings.Default.SyncPollingInterval);
            VideoSync.MaxDelay = Properties.Settings.Default.MaxDelay;
            #endregion

            #region ChatService Setup
            ChatService = new ChatService(VideoSync, ChatArea);
            #endregion

            #region Settings Setup
            ipbox.Text = Properties.Settings.Default.LastIP;
            SettingsForm = new SettingsForm();
            #endregion

            #region Parse URL (if SyncMP4 was used to open a file [open with..])
            if (url != null && url != "")
            {
                try
                {
                    Player.URL = url;
                }
                catch (Exception e)
                {
                    MessageBox.Show(this, "The file you attempted to open isn't compatible with the current version of SyncMP4.", "Unable to open file", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    Debug.Log(e);
                }
            }
            #endregion

            OpenUrlForm = new OpenUrlForm();
        }