private void Page_Loaded(object sender, RoutedEventArgs e)
        {
            Main.OnClientRequested += Main_OnClientRequested;
            ShowFileList(false);
            if (Main.FilePaths != null)
            {
                FilePaths = Main.FilePaths.ToList();
                ShowFileList(true);
                list_Files.ItemsSource = FilePaths;
            }
            else
            {
                FilePaths = new List <string>();
                ShowFileList(false);
            }

            NetworkScanner.GetDeviceAddress(out DeviceIP, out DeviceHostName);
            Main.FileSaveURL = Parameters.SavingPath;
            Debug.WriteLine("Save file path: " + Main.FileSaveURL);
            Dispatcher.Invoke(() =>
            {
                txt_DeviceIP.Content = DeviceIP;
                txt_DeviceName.Text  = Parameters.DeviceName;
            });
        }
    /// <summary>
    /// Initializes a MQ Publisher with defined topic at given port and starts publisher thread. Also Starts Screen Capturer
    /// </summary>
    public static void StartSharing()
    {
        string hostname;

        NetworkScanner.GetDeviceAddress(out MyIP, out hostname);
        CommunicationType   = CommunicationTypes.Sender;
        CommunicationPeriod = 1.0 / CommunicationFrequency;
        MyIP              = NetworkScanner.MyIP;
        Publisher         = new MQPublisher(Topic, MyIP, Port);
        TimeBasePublisher = new MQPublisher(TimeBaseTopic, MyIP, TimeBasePort);
        ImageProcessing.StartScreenCapturer();
        IsPublisherEnabled = true;
        SenderThread       = new Thread(PublisherCoreFcn);
        SenderThread.Start();
    }