54 Commits

Author SHA1 Message Date
Alexei Agüero Alba
138199e811
Correctly implement Dispose pattern in FormBase for use on derived classes 2022-12-05 17:18:54 -05:00
FlorianDahn
f39b1d11be Integration of changes
Integrate some changes and cleanups

Co-Authored-By: Alexey <110727638+ZavaruKitsu@users.noreply.github.com>
2022-10-09 17:12:52 +02:00
ZavaruKitsu
21cdbf4db6 deps: update Telegram.Bot and other libs 2022-09-21 22:49:14 +03:00
FlorianDahn
0ebce16490 Remove unnecessary null checks 2022-07-02 14:05:57 +02:00
FlorianDahn
2c567419ec Update MessageClient.cs
- increasing parameters for Get/SetCommand methods
- adding DeleteBotCommands methods
2022-05-15 23:17:01 +02:00
FlorianDahn
72a1fa3c99 Replacing Client in ResultBase and subclasses
- replace Client with Device to allow more access
- making Client in DeviceSession public to allow access from outside
2022-05-15 15:41:24 +02:00
FlorianDahn
d08cbe8b0e Bugfix with MessageResult leads to having not access to MessageClient 2022-04-16 15:36:55 +02:00
FlorianDahn
ff3c22566a Comment Cleanup 2022-01-05 18:40:44 +01:00
FlorianDahn
4f85677deb Comment Cleanup 2022-01-05 18:39:06 +01:00
FlorianDahn
fc33da0496 Fixing empty message field 2021-12-17 15:15:58 +01:00
FlorianDahn
31e52887ba V17 - Big Update
- Adding a message loop interface to build custom message loops
- extracting default message loop from BotBase into seperate class
- updates to BotBaseBuilder for integration of custom message loops
- updating all result classes for using the new Update object of V17
- improving MessageResult and UpdateResult classes
- BotBase has been prepared for cleanup (a lot of comments)
- Comment cleanup at the next build
- updating Readme
2021-11-26 17:57:49 +01:00
FlorianDahn
ae9dd17ae3 Adding NavigationController for better and optional Push/Pop navigation 2021-07-25 01:54:16 +02:00
FlorianDahn
264a998052 Update FormBase.cs
- making more basic methods virtual for easiert overriding
- adding existing control check to AddControl method
2021-06-07 01:33:19 +02:00
FlorianDahn
adc18891e0 Update MessageResult.cs 2021-02-28 17:40:02 +01:00
FlorianDahn
15a8b8897f Updates and improvements
- refactoring of ButtonGrid control for more readability
- refactoring of TaggedButtonGrid control for more readability
- adding Index parameter to ButtenClickedEventArgs
- adding FindRowByButton method to ButtonForm to get the row index
-
2021-02-28 15:34:04 +01:00
FlorianDahn
91048b4f7c Async invoke fixes and ButtonGrid update
- removing unused imports
- adding null check for async handler invokes
- fixing PageCount calculation on ButtonGrid
2021-02-27 20:51:47 +01:00
FlorianDahn
dc8cb81284 Adding Init method to controls 2021-02-20 01:39:37 +01:00
FlorianDahn
6b404545df Update MessageResult.cs
- adding more parameters to ConfirmAction method
2021-01-15 16:53:45 +01:00
FlorianDahn
46160b54ae Update DataResult.cs
- adding DownloadRawDocument & DownloadRawTextDocument functions
2020-12-22 15:40:18 +01:00
FlorianDahn
cf9e2285f1 Adding DynamicButton for Button with dynamic Text updates
For use, call the ButtonGrid.Updated() method
2020-07-25 15:11:15 +02:00
FlorianDahn
7a7a65c3a7 Update FormBase.cs
- adding RemoveAllControls method
2020-07-25 15:07:36 +02:00
FlorianDahn
fb7b624ad8 BotCommands and refactoring
- refactoring SystemCalls to BotCommand (due new Telegram Bot update)
- Adding UploadBotCommands method to BotBase
- refactoring and simplifying BotBase constructors
- adding getBotCommands and SetBotCommands to MessageClient
2020-04-11 19:12:34 +02:00
FlorianDahn
0cdb8c3a1a Adding StateMachine for Session serialization
- adding multiple classes and interfaces for Session Serialization and recovery after restart
2020-04-05 13:13:11 +07:00
FlorianDahn
8b9929198a Modal and Form updates
- adding ReturnFromModal method to FormBase, will get invoked if context leaves a ModalDialog
- ModalDialog contains ParentForm for better navigation
- ModalDialog invokes ReturnFromModal on parentForm after closing
- adding ShowBackButton to PromptDialog for show a back button
2020-04-04 19:52:15 +07:00
FlorianDahn
7a3e4721bd Update DataResult.cs
- adding DownloadAudio
- adding an optional method for all available ones to save attachments directly to a file
2020-04-03 21:54:32 +07:00
FlorianDahn
6a62d73fe0 Adding Edited Features
- FormBase: adding Edited method
- MessageClient: adding MessageEdit event
- GroupForm: adding Edited method
- DeviceSession: adding ChatTitle
2020-04-02 12:37:53 +07:00
FlorianDahn
37ef30ebee - changing OpenModal and NavigateTo to virtual, so you could override it 2020-03-25 18:10:13 +07:00
FlorianDahn
fba922049f Updates and fixes
- adding IsFirstHandler to allow controls to skip Actions which has been invoked already (i.e. due to navigation)
- adding Hidden method to ButtonGrid to fix re-rendering Buttons after opening a Modal form and comming back
- improving and fixing the Cleanup method for ButtonGrid to prevent "Keyboard jumping" for ReplyKeyboard on mobile devices.
- renaming some old *Result objects to *EventArgs for more clear definitions
2020-03-25 12:37:16 +07:00
FlorianDahn
d5a9a5f7a4 - adding Hidden method to ControlBase which will be called on leaving form or on opening a modal one 2020-03-25 12:27:01 +07:00
FlorianDahn
aa38492bde - more refactoring and renaming models *Result to *EventArgs 2020-03-23 13:06:52 +07:00
FlorianDahn
8e6de4a0e1 - Refactoring and moving all EventArgs structures to folder Args 2020-03-23 13:02:31 +07:00
FlorianDahn
2989456fe5 - change Formbase for better navigation management 2019-12-04 01:28:15 +01:00
FlorianDahn
a08ba8f512 -update on FormBase which should prevent issues on control management 2019-12-02 03:46:40 +01:00
FlorianDahn
6ebdd9f208 - additional stuff for group management 2019-11-23 02:41:17 +01:00
FlorianDahn
0eab45bdbb - making Events property of FormBase public, for use in sub classes
- making ResultBase derive from Eventargs
- adding messagetype to messageresult
2019-11-21 21:38:20 +01:00
FlorianDahn
9cbde4830e - adding OpenModal/CloseModal features to leave a form open and "just" show a prompt and get back
- added new "ModalDialog" class to present modal forms
- updating examples for prompt dialog to use the modal feature
2019-10-11 22:37:54 +02:00
FlorianDahn
d1456d5bd1 - update readme and formbase 2019-09-28 01:17:38 +02:00
FlorianDahn
5c69289198 - small additions 2019-09-27 23:18:18 +02:00
FlorianDahn
256cac825f - adding Load method for controls 2019-09-26 20:50:33 +02:00
FlorianDahn
56c7754408 - Added ToggleButton as an easy switch control (i.e. for settings page)
- added control id, for easier separating of controls in one form
- added automatic event selection for specific controls, to not raise an event for other controls who has invoked it
- changed Action method
- added example
2019-08-23 14:02:24 +02:00
FlorianDahn
e4da70d37d - Update of FormBase for better async event management
- Update of ControlBase for partial rendering options
- Updating serveral base classes to better asyc event management
- separating Enums into different folder
- some small bug fixes
- removed "CustomEventManagement" cause it doesnt make sense now
2019-07-14 22:22:04 +02:00
FlorianDahn
e13cb6d4ef - Updating NavigateTo to set PreviousForm now correctly 2019-06-26 12:48:25 +02:00
FlorianDahn
fe1aafc9a5 - added IsDisposed to form
- removed FormSwitched from FormBase and added to DeviceSession (more logical message loop)
- added PreviousForm to DeviceSession, contains last opened form (at initial form is null)
-BotBase message loop update
- now navigation is possible from every form, not just the latest ones as before
2019-06-22 15:15:29 +02:00
FlorianDahn
4f1eae543d - adding Delete Options for Both sides to AutoCleanForm
- general Performance improvements
- Adding MessageReceived Event to DeviceSession, will be called before "message loop"
- AutoCleanForm optimized and clean process added to public function MessageCleanup (so you could call on your own)
- IsGroup for DeviceSession fixed to correct test
- IsChannel added to DeviceSession

Examples:
- SimpleForm (#1) derived now from AutoCleanForm to show deletion mode for both sides
2019-05-04 16:32:48 +02:00
FlorianDahn
b14fa2dc87 - adding new SentData Event in FormBase for User uploads (for Photo, Audio, Video, Contact, Location, Document)
- adding RequestUserLocation and RequestUserContact to Device class
- Update to Device class
- updating examples
- adding example for data upload
- small documentary Updates (Readme.md)
2019-03-27 14:01:48 +07:00
FlorianDahn
211bc55aff - Cleanup of unecessary init calls
- added form1/form2 option to start menu in test project
- added example for different forms with and without event handlers
- added form examples to Readme.md
2019-03-20 17:42:33 +07:00
FlorianDahn
c6666f72bc - Improvements to system calls
- system calls now async with await
- added start command to example
- added "handled" property to system call event args
2019-03-20 16:57:10 +07:00
FlorianDahn
da80af86e3 Small fix in Systemcall management 2019-03-20 13:44:44 +07:00
FlorianDahn
bbf90deccc - Added easy to use Proxy functionality into constructor
- improved DeviceSession
- added IsGroup property to DeviceSession
2019-03-20 11:14:38 +07:00
FlorianDahn
3856271e30 - Updated system call management
- parameters are now easier available
- example project added parameter example
2019-03-18 12:03:55 +07:00