예제 #1
0
        public MainForm(EvLoop b)
        {
            InitializeComponent();
            //font
            PrivateFontCollection fontCollection = new PrivateFontCollection();

            fontCollection.AddFontFile("font.ttf"); // файл шрифта
            FontFamily family = fontCollection.Families[0];
            // Создаём шрифт и используем далее
            Font font = new Font(family, 20);

            //задача шрифтов
            ChatLog.Font     = font;
            MsgEnterBox.Font = font;
            OnlineLable.Font = font;
            OnlineUsers.Font = font;
            SendButton.Font  = font;

            this.FormClosing += MainForm_FormClosing;
            Loop              = b;
            Loop.SetFormAddress(this);
            ErrorDelegate              = new Error(ErrorMethod);
            GlobalMsgDelegate          = new GlobalMsg(GlobalMsgMethod);
            RefreshOnlineUsersDelegate = new RefreshOnlineUsers(RefreshOnlineUsersMethod);
            this.Hide();
        }
예제 #2
0
파일: Program.cs 프로젝트: x1larus/Client
        static void Main()
        {
            Application.SetHighDpiMode(HighDpiMode.SystemAware);
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            SocketCommunication Sender = new SocketCommunication();
            EvLoop Loop = new EvLoop();

            Sender.SetLoopAddress(Loop);
            Loop.SetSenderAddress(Sender);
            Sender.Connect("172.20.149.33", 3333); //f**k yeah
            Application.Run(new MainForm(Loop));
        }
예제 #3
0
파일: LoginForm.cs 프로젝트: x1larus/Client
        public LoginForm(EvLoop a)
        {
            InitializeComponent();
            PrivateFontCollection fontCollection = new PrivateFontCollection();

            fontCollection.AddFontFile("font.ttf"); // файл шрифта
            FontFamily family = fontCollection.Families[0];
            // Создаём шрифт и используем далее
            Font font = new Font(family, 20);

            //задача шрифтов
            LoginButton.Font        = font;
            AuthorizationLabel.Font = font;

            ErrorLabel.Visible = false;
            Loop                   = a;
            Loop.LoginGUI          = this;
            SuccesfulLoginDelegate = new SuccesfulLogin(SuccesfulLoginMethod);
        }
예제 #4
0
 public void SetLoopAddress(EvLoop a)
 {
     Loop = a;
     return;
 }