Exemple #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();
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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);
        }
Exemple #4
0
 public void SetLoopAddress(EvLoop a)
 {
     Loop = a;
     return;
 }