コード例 #1
0
 void loginCommand()
 {
     if (CacheManager.Instance.LoginUser.UserName.Equals("未知用户"))
     {
         LoginWindow loginWin = new LoginWindow();
         loginWin.Closed += (s, arg) =>
         {
             if (loginWin.DialogResult.Value)
             {
                 this.UserName = CacheManager.Instance.LoginUser.UserName;
             }
         };
         loginWin.ShowDialog();
     }
     else
     {
         OSKernel.Presentation.Login.Summary.IndexView userInfo = new OSKernel.Presentation.Login.Summary.IndexView("userInfo");
         userInfo.ShowDialog();
     }
 }
コード例 #2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            BinaryServerFormatterSinkProvider serverProvider = new BinaryServerFormatterSinkProvider();

            serverProvider.TypeFilterLevel = System.Runtime.Serialization.Formatters.TypeFilterLevel.Full;
            BinaryClientFormatterSinkProvider clientProvider = new BinaryClientFormatterSinkProvider();

            IDictionary properties = new Hashtable();

            properties["port"] = 0;
            TcpChannel tcpChannel = new TcpChannel(properties, clientProvider, serverProvider);

            ChannelServices.RegisterChannel(tcpChannel, false);

            IServices server = (IServices)Activator.GetObject(typeof(IServices), "tcp://localhost:55555/Triathlon");
            //IServices server = new ServerProxy("127.0.0.1", 55555);
            ClientController ctrl   = new ClientController(server);
            LoginWindow      window = new LoginWindow(ctrl);

            Application.Run(window);
        }
コード例 #3
0
        //Closing事件
        private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
        {
            LoginWindow LW = new LoginWindow();

            LW.Show();
        }
コード例 #4
0
 public void set(LoginController loginController, LoginWindow loginWindow, AppWindow appWindow)
 {
     this.loginController = loginController;
     this.loginWindow     = loginWindow;
     this.appWindow       = appWindow;
 }
コード例 #5
0
 private void personalInitalize()
 {
     loginUI = new LoginWindow(this);
     loginUI.ShowDialog();
 }
コード例 #6
0
        void Application_Startup(object sender, StartupEventArgs e)
        {
            LoginWindow window = new LoginWindow();

            window.Show();
        }