コード例 #1
0
ファイル: Program.cs プロジェクト: bakern/FTPbox
        static void Main(string[] args)
        {
            Settings.Load();
            Account = new AccountController();
            Account = Settings.DefaultProfile;

            // Allocate console
            if (args.Length > 0 && args.Contains("-console"))
                aConsole.Allocate();

            Settings.IsDebugMode = args.Contains("-debug");
            Settings.IsNoMenusMode = args.Contains("-nomenus");

            Log.Init(Common.DebugLogPath, l.Debug | l.Info | l.Warning | l.Error | l.Client, true, Settings.IsDebugMode);

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            if (!DLLsExist)
            {
                MessageBox.Show("The required DLL files to run this program are missing. Please make sure all the needed files are in the installation folder and then run the application. If you cannot find these files, just reinstall FTPbox.", "FTPbox - Missing Resources", MessageBoxButtons.OK, MessageBoxIcon.Error);
                Process.GetCurrentProcess().Kill();
            }
            else
            {
                if (CheckArgs(args))
                {
                    KillUnecessaryDLLs();
                    CheckForPreviousInstances();
                    Application.Run(new fMain());
                }
            }
        }
コード例 #2
0
ファイル: Settings.cs プロジェクト: bakern/FTPbox
        /// <summary>
        /// Saves Profiles & General settings to the config file
        /// </summary>
        public static void Save(AccountController account = null)
        {
            SaveGeneral();

            SaveProfile(account);

            SaveCertificates();
        }
コード例 #3
0
ファイル: FileLog.cs プロジェクト: bakern/FTPbox
        public FileLog(AccountController account)
        {
            _controller = account;

            Files = new List<FileLogItem>();
            Folders = new List<string>();

			Log.Write(l.Info, "Opened FileLog");
		}
コード例 #4
0
ファイル: WebInterface.cs プロジェクト: BroneKot/FTPbox
        private Thread _wiThread; // Upload or remove the web interface thread

        #endregion Fields

        #region Constructors

        public WebInterface(AccountController account)
        {
            this.controller = account;
            _wiThread = new Thread(StartUpdate);
        }
コード例 #5
0
ファイル: FolderWatcher.cs プロジェクト: 404NoFound/FTPbox
 public FolderWatcher(AccountController account)
 {
     this.controller = account;
 }
コード例 #6
0
ファイル: Settings.cs プロジェクト: hbklove8/FTPbox
        /// <summary>
        /// Puts data from Profile Class to the Profiles list
        /// and then saves the Profiles list to the config file
        /// </summary>
        public static void SaveProfile(AccountController account = null)
        {
            var def = account ?? Profiles[General.DefaultProfile];

            if (General.DefaultProfile >= Profiles.Count)
                Profiles.Add(def);
            else
                Profiles[General.DefaultProfile] = def;

            string config_prof = JsonConvert.SerializeObject(Profiles, Formatting.Indented);
            File.WriteAllText(confProfiles, config_prof);
        }
コード例 #7
0
ファイル: Client.cs プロジェクト: CKoewing/FTPbox
        private SftpClient _sftpc; // And our SFTP client

        #endregion Fields

        #region Constructors

        public Client(AccountController account)
        {
            this.controller = account;
            this.Certificates = new X509Certificate2Collection();
        }
コード例 #8
0
ファイル: Client.cs プロジェクト: bakern/FTPbox
 public Client(AccountController account)
 {
     _controller = account;
     _certificates = new X509Certificate2Collection();
 }
コード例 #9
0
ファイル: Client.cs プロジェクト: 404NoFound/FTPbox
        private SftpClient _sftpc; // And our SFTP client

        #endregion Fields

        #region Constructors

        public Client(AccountController account)
        {
            this.controller = account;
        }
コード例 #10
0
ファイル: SyncQueueItem.cs プロジェクト: bakern/FTPbox
 public SyncQueueItem(AccountController account)
 {
     controller = account;
 }
コード例 #11
0
ファイル: FolderWatcher.cs プロジェクト: hbklove8/FTPbox
 public FolderWatcher(AccountController account)
 {
     this.controller = account;
 }
コード例 #12
0
ファイル: SftpClient.cs プロジェクト: stlcours/FTPbox
 public SftpClient(AccountController account)
 {
     Controller = account;
 }
コード例 #13
0
ファイル: TransferValidator.cs プロジェクト: st4ck/FTPbox
 public SizeTransferValidator(AccountController controller)
 {
     Controller = controller;
 }
コード例 #14
0
 public Client(AccountController account)
 {
     this.controller   = account;
     this.Certificates = new X509Certificate2Collection();
 }