Ejemplo n.º 1
0
        public ServerLogWindow(ShadowsocksController controller, WindowStatus status)
        {
            InitializeComponent();
            I18NUtil.SetLanguage(Resources, @"ServerLogWindow");
            LoadLanguage();

            _controller = controller;
            Closed     += (o, e) => { _controller.ConfigChanged -= controller_ConfigChanged; };
            _controller.ConfigChanged += controller_ConfigChanged;
            LoadConfig(true);

            ServerDataGrid.GridColumnSizer.SortIconWidth = 0;
            if (status == null)
            {
                SizeToContent                    = SizeToContent.Width;
                Height                           = 600;
                WindowStartupLocation            = WindowStartupLocation.CenterScreen;
                ServerDataGrid.ShowBusyIndicator = false;
            }
            else
            {
                ServerDataGrid.ShowBusyIndicator = true;
                SizeToContent = SizeToContent.Manual;
                status.SetStatus(this);
            }
        }
 public ServerLogWindow(ShadowsocksController controller, WindowStatus status)
 {
     InitializeComponent();
     _controller = controller;
     Closed     += (o, e) => { _controller.ConfigChanged -= controller_ConfigChanged; };
     _controller.ConfigChanged += controller_ConfigChanged;
     LoadLanguage();
     LoadConfig();
     if (status == null)
     {
         SizeToContent         = SizeToContent.Width;
         Height                = 400;
         WindowStartupLocation = WindowStartupLocation.CenterScreen;
     }
     else
     {
         SizeToContent         = SizeToContent.Manual;
         WindowStartupLocation = WindowStartupLocation.Manual;
         status.SetStatus(this);
     }
 }