Example #1
0
        public MainFormP(ISharedAble s, bool isServer)
        {
            this._serverThread = new Thread(() => { });
            this._isServer     = isServer;
            switch (s)
            {
            case Client c:
                this._server = c;
                break;

            case Server se:
                this._server = se;
                break;
            }

            InitializeComponent();

            this._idStreamMap.Columns.Add("Type", 90, HorizontalAlignment.Left);
            this._idStreamMap.Columns.Add("Position", 50, HorizontalAlignment.Left);
            this._idStreamMap.Columns.Add("SenderToken", 100, HorizontalAlignment.Left);
            this._idStreamMap.Columns.Add("Path", -2, HorizontalAlignment.Left);
            this._TokenList.Columns.Add("Trusted", 100, HorizontalAlignment.Left);
            this._TokenList.Columns.Add("remember", 100, HorizontalAlignment.Left);
            this._TokenList.Columns.Add("Description", -2, HorizontalAlignment.Left);
            this._RememberList.Columns.Add("Type", 100, HorizontalAlignment.Left);
            this._RememberList.Columns.Add("Value", 100, HorizontalAlignment.Left);
            this._RememberList.Columns.Add("Description", -2, HorizontalAlignment.Left);
            this._RegList.Columns.Add("CloseFileStream", 100, HorizontalAlignment.Left);
            this._RegList.Columns.Add("UserConfirm", 100, HorizontalAlignment.Left);
            this._RegList.Columns.Add("OpenWith", 100, HorizontalAlignment.Left);
            this._RegList.Columns.Add("Arguments", 300, HorizontalAlignment.Left);
            this._RegList.Columns.Add("Description", -2, HorizontalAlignment.Left);

            this._idStreamMap.Name  = "ID";
            this._TokenList.Name    = "TO";
            this._RememberList.Name = "RE";
            this._RegList.Name      = "RG";

            this.B_StartServer.Text = "Start " + s.GetType().Name;
        }
Example #2
0
 private void StartServer(ISharedAble s, IPAddress ipAddress)
 {
     s.Start(ipAddress);
 }