static void Main(string[] args) { Console.Write("Enter login:"******"Enter password:"******"Ok"); Packer.Initialize(); _client = new AdClient(); if (_client == null) { return; } Console.WriteLine("Waiting.."); Thread.Sleep(3000); _allObjects = _client.Dictionaries.GetObjects(); _bot = new TelegramBotClient(Properties.RemoteBot.Default.Token); _bgw = new BackgroundWorker(); _bgw.DoWork += CheckBot; _bgw.RunWorkerAsync(); Console.WriteLine("RemoteBot {0} started.", Properties.RemoteBot.Default.Name); _client.OnConnectionChanged += OnConnectionChanged; Console.ReadKey(); }
public bool Step() { if (Width == MaxSize && Height == MaxSize) { return(false); } _turn = !_turn; if (_turn) { Width += STEP_SIZE; } else { Height += STEP_SIZE; } if (Width > MaxSize) { Width = MaxSize; } if (Height > MaxSize) { Height = MaxSize; } Packer.Initialize(Width, Height, false); foreach (var item in Items) { Insert(item.AtlasImage, out Rect rect); item.Rect = rect; } return(true); }