예제 #1
0
 public void ApplyParam(LocalShellTerminalParam param)
 {
     _param = param;
     if(param is CygwinTerminalParam)
         this.Text = GApp.Strings.GetString("Form.CygwinLoginDialog.TextCygwin");
     else
         this.Text = GApp.Strings.GetString("Form.CygwinLoginDialog.TextSFU");
 }
예제 #2
0
 internal LocalShellTerminalParam(LocalShellTerminalParam p)
     : base(p)
 {
     _home = p._home;
     _shell = p._shell;
 }
예제 #3
0
 internal LocalShellTerminalParam(LocalShellTerminalParam p)
     : base(p)
 {
     _home  = p._home;
     _shell = p._shell;
 }
예제 #4
0
        protected override void OnLoad(EventArgs e)
        {
            base.OnLoad (e);
            if(_param==null)
                _param = new CygwinTerminalParam(); //�f�t�H���g�l�Ŗ��߂�
            else
                _param = (LocalShellTerminalParam)_param.Clone();
            _param.RenderProfile = null;
            _param.Caption = null;

            _homeDirectoryBox.Text = _param.Home;
            _shellBox.Text = _param.Shell;

            StringCollection c = GApp.ConnectionHistory.LogPaths;
            foreach(string p in c) _logFileBox.Items.Add(p);

            if(GApp.Options.DefaultLogType!=LogType.None) {
                _logTypeBox.SelectedIndex = (int)GApp.Options.DefaultLogType;
                string t = GUtil.CreateLogFileName("cygwin");
                _logFileBox.Items.Add(t);
                _logFileBox.Text = t;
            }
            else
                _logTypeBox.SelectedIndex = 0;

            AdjustUI();
        }
예제 #5
0
 public Connector(LocalShellTerminalParam param, ISocketWithTimeoutClient client)
 {
     _param = param;
     _client = client;
 }
예제 #6
0
 public static Connector AsyncPrepareSocket(ISocketWithTimeoutClient client, LocalShellTerminalParam param)
 {
     Connector c = new Connector(param, client);
     GUtil.CreateThread(new ThreadStart(c.AsyncConnect)).Start();
     return c;
 }
예제 #7
0
 public Connector(LocalShellTerminalParam param)
 {
     _param = param;
 }
예제 #8
0
 private static bool IsCygwin(LocalShellTerminalParam tp)
 {
     return tp is CygwinTerminalParam;
 }
예제 #9
0
 protected static void PrepareEnv(LocalShellTerminalParam p)
 {
     if(!_cygwinDLL_loaded && IsCygwin(p)) {
         //����̂݁Acygwin.dll�����[�h�ł���悤�Ɋ‹��ϐ���lj� SFU�̂Ƃ��͗]�v����
         char[] buf = new char[1024];
         int n = Win32.GetEnvironmentVariable("PATH", buf, buf.Length);
         string newval = new string(buf, 0, n) + ";" + CygwinUtil.GuessRootDirectory() + "\\bin";
         Win32.SetEnvironmentVariable("PATH", newval);
         _cygwinDLL_loaded = true;
     }
 }
예제 #10
0
 //�ڑ����Socket��������ĕԂ��B���s�����parent��e�ɂ��ăG���[��\�����Anull��Ԃ��B
 public static ConnectionTag PrepareSocket(IWin32Window parent, LocalShellTerminalParam param)
 {
     try {
         return new Connector(param).Connect();
     }
     catch(Exception ex) {
         string key = IsCygwin(param)? "Message.CygwinUtil.FailedToConnect" : "Message.SFUUtil.FailedToConnect";
         GUtil.Warning(parent, GEnv.Strings.GetString(key)+ex.Message);
         return null;
     }
 }
예제 #11
0
 //cygwin�̓����I�ڑ�
 public static ConnectionTag CreateNewLocalShellConnection(IWin32Window parent, LocalShellTerminalParam param)
 {
     return LocalShellUtil.PrepareSocket(parent, param);
 }