Esempio n. 1
0
        private void _SetStatusText(string sStatus = "", StatusColoring sc = StatusColoring.Normal)
        {
            sSAVE_Status = sStatus;
            scSAVE       = sc;

            _RefreshStatusText();
        }
Esempio n. 2
0
        public void SetStatusText(string sStatus = csStatusDefault, StatusColoring sc = StatusColoring.Normal)
        {
            if (m_txtStatus == null)
            {
                return;
            }

            if (sStatus.Length == 0)
            {
                m_txtStatus.Text = csStatusDefault;
            }
            else
            {
                m_txtStatus.Text = sStatus;
            }

            UpdateAppMemInfo();

            switch (sc)
            {
            case StatusColoring.Success:
                m_txtStatus.Background = new SolidColorBrush(Colors.Green);
                m_txtStatus.Foreground = new SolidColorBrush(Colors.White);
                break;

            case StatusColoring.Warning:
                m_txtStatus.Background = new SolidColorBrush(Colors.Yellow);
                m_txtStatus.Foreground = new SolidColorBrush(Colors.Red);
                break;

            case StatusColoring.Error:
                m_txtStatus.Background = new SolidColorBrush(Colors.Red);
                m_txtStatus.Foreground = new SolidColorBrush(Colors.Yellow);
                break;

            //case StatusColoring.Normal :
            default:
                m_txtStatus.Background = new SolidColorBrush(m_Theme.ThemeColors.AppStatusBack);
                m_txtStatus.Foreground = new SolidColorBrush(m_Theme.ThemeColors.AppStatusFore);
                break;
            }
        }
Esempio n. 3
0
        private void m_AppFrame_OnNext(object sender, EventArgs e)
        {
            if (!DeviceNetworkInformation.IsNetworkAvailable)
            {
                if (!DeviceNetworkInformation.IsCellularDataEnabled)
                {
                    ConnectionSettingsTask connectionSettingsTask = new ConnectionSettingsTask();
                    connectionSettingsTask.ConnectionSettingsType = ConnectionSettingsType.WiFi;
                    connectionSettingsTask.Show();

                    return;
                }
                else
                {
                    MessageBox.Show("ATT: For security reasons and high amount of possible data FTP connection through the Internet and Public WiFi networks is not recommended!");
                }
            }

            m_AppFrame.ShowButtonNext(false);

            parPanel.Visibility = Rsc.Collapsed;

            if (chbAutoLogOn.IsChecked.Value)
            {
                btnLogUsr.Visibility = Rsc.Collapsed;
                btnLogPw.Visibility  = Rsc.Collapsed;
            }

            if (chbAutoPasv.IsChecked.Value)
            {
                btnPasv.Visibility = Rsc.Collapsed;
            }

            //lastFilePanel.Visibility = Rsc.Collapsed; //Rsc.Visible;
            SetLastFile("", false);

            pathPanel.Visibility    = Rsc.Visible;
            custCmdPanel.Visibility = Rsc.Visible;
            logPanel.Visibility     = Rsc.Visible;

            svrAddr.Text        = " ";
            svrTit.Text         = " ";
            svrPanel.Visibility = Rsc.Visible;

            //WP81 FIX
            //m_ftpc.SetFastConnection( chbFastConn.IsChecked.Value, chbFastConnEx.IsChecked.Value );

            NationalChrsToTestFileNames = "";
            if (chbNatFsNames.IsChecked.Value)
            {
                NationalChrsToTestFileNames = " (ÁáÉéÍíÓóÖöŐőÚúÜüŰű)";
            }

            sSAVE_Status = "";
            scSAVE       = StatusColoring.Normal;

            _Log("21", "Connecting...");

            SaveToReg();

            //unkLISTresLEN sign reset...
            m_AppFrame.TRACE = "";

            m_ftpc.CloseAllSockets();

            m_ftpc.IPAddress       = txSvrIP.Text.ToString();
            m_ftpc.Port            = Int32.Parse(txSvrPort.Text.ToString());
            m_ftpc.UserName        = txUsr.Text.ToString();
            m_ftpc.PassWord        = txPwd.Text.ToString();
            m_ftpc.AutoLogOn       = chbAutoLogOn.IsChecked.Value;
            m_ftpc.AutoPassiveMode = chbAutoPasv.IsChecked.Value;

            m_ftpc.Connect();
        }