Пример #1
0
 public MainForm()
 {
     InitializeComponent();
     richTextBox.MouseWheel += new MouseEventHandler(OnMouseWheel);
     IsFullScreen            = false;
     // Инициализируем локальные хранилища
     Storage  = new LibraryStorage();
     Config   = new ConfigStorage();
     Username = Config.GetValue("Username");
     // Открываем последнюю книгу
     OpenLastBook();
     // Пытаемся подключится к серверу
     ConnectServer();
 }
Пример #2
0
        public LibraryForm(LibraryStorage storage, ConfigStorage config, IConnection connection)
        {
            InitializeComponent();
            Storage    = storage;
            Config     = config;
            Connection = connection;
            dataGridView.SelectionChanged += OnSelectionChanged;

            UpdateStatusLabel();
            DrawBooksTable();

            if (IsConnected)
            {
                Connection.MessageReceived += OnIncomingMessage;
                Shown += OnShown;
            }
        }
Пример #3
0
        public Form1()
        {
            InitializeComponent();

            this._storage = new LibraryStorage();
        }