예제 #1
0
 private void reloadSetting()
 {
     libraryPath.Text = ConfigurationManager.ReadSetting("library");
     vita_ip.Text     = ConfigurationManager.ReadSetting("vita_ip");
     vita_port.Text   = ConfigurationManager.ReadSetting("vita_port");
     cma_path.Text    = ConfigurationManager.ReadSetting("cma_path");
     loadUSBDrive();
     connectionType.SelectedIndex = ConfigurationManager.ReadSetting("connection_type") == "0" ? 0 : 1;
     try
     {
         USBDrive.SelectedIndex = Int16.Parse(ConfigurationManager.ReadSetting("usb_drive"));
     }
     catch (Exception)
     {
     }
     if (USBDrive.SelectedIndex > -1)
     {
         copyManager = FileCopyManager.instance(USBDrive.Items[USBDrive.SelectedIndex].ToString());
         copyManager.StartCopyWorker();
     }
     if (vita_ip.Text != "" && vita_port.Text != "")
     {
         manager = FTPManager.instance(vita_ip.Text, vita_port.Text);
         manager.StartFTPWorker();
         ftpStatus.Text = "Starting...";
     }
     else
     {
         ftpStatus.Text = "Need PSVita IP And Port";
     }
 }
예제 #2
0
        public static FTPManager instance(string ip, string port)
        {
            if (_instance == null)
            {
                _instance = new FTPManager(ip, port);
            }
            _instance.ip   = ip;
            _instance.port = port;

            return(_instance);
        }