Category:C#

  • WinForm capture of C ා Console.WriteLine Content to log file

    Time:2020-9-23

    Problem description The previous project of my colleague is a WinForm program similar to the server background. The main interface is hidden and only the program icon is displayed in the taskbar.There is no logging function in the whole project Console.WriteLine Print information. When debugging, you can use VS to view the output content, but […]

  • Example of C ා socket communication

    Time:2020-9-23

    In the last article, we introduced the socket foundation – TCP and UDP protocols and the differences between themSenior’s blogThe principle of socket and the development process of the two protocols are mainly recorded. 1、 Introduction to socket communication 1. Introduce socket first according to the Convention Many things in windows are borrowed from the […]

  • C ා PC version of wechat message monitoring automatic reply method

    Time:2020-9-23

    Recently, a wechat customer needs to set up a personal wechat to monitor group message keywords and realize automatic reply function, because he has a lot of groups. If many buyers inquire, one by one reply is too troublesome. For example, if someone in the group sends keyword product 1, the relevant description of product […]

  • C ා npoi excel copy sheet across workbooks

    Time:2020-9-22

    Copying a sheet across worksheets does not simply copy the sheet’s data to a new sheet. You need to copy data and formulas, including data format, cell style, and so on, to the new sheet. The current version of npoi is 2.5.1, and its Excel processing can support the sheet copy between xssf (2007 and […]

  • C ා asynchronous programming several points need to pay attention to

    Time:2020-9-22

    Try not to write an asynchronous method with a return value of void Under normal circumstances, it is recommended that you do not write an asynchronous method with a return value type of void, because doing so will break the contract between the method’s initiator and the method itself, which could have ensured that the […]

  • WinForm music program example

    Time:2020-9-21

    This is a program developed using WinForm to play specific music sounds on a computer, including central C and international standard tones. The interface is as follows: . net is actually very powerful. Using. Net WinForm development is quite efficient and worth learning. Download: https://hovertree.com/h/bjag/mcmub5gm.htm

  • A thorough understanding of callback from the perspective of IL_ Commission_ Pointer

    Time:2020-9-21

    A thorough understanding of callback from the perspective of IL_ Commission_ Pointer catalog A thorough understanding of callback from the perspective of IL_ Commission_ Pointer 1. The background of writing this article 1.1. Delegation can help code encapsulation better 1.2. Delegation makes it easier to run methods in other classes anytime, anywhere 1.3. Delegation is […]

  • Unity realizes the countdown function

    Time:2020-9-21

    In this paper, we share the specific code of unity to realize the countdown function for your reference. The specific content is as follows There are two ways to realize countdown, one is update, the other is coprocess. Here only show the core of the algorithm ideas, there are harvest also please point like Oh […]

  • WinForm wechat code scanning login

    Time:2020-9-20

    Source code also need to be optimized, do not like spray. Official wechat documents: https://developers.weixin.qq.com/doc/oplatform/Website_ App/WeChat_ Login/Wechat_ Login.html Preliminary preparation: 1. Wechat open platform developer qualification certification https://open.weixin.qq.com/ It costs 300, about 1-2 days   2. It takes about 1-2 days to create a website application with registered domain name and logo   3. Get […]

  • Unity implements countdown component

    Time:2020-9-20

    preface The countdown function has always been very important in the game, whether it’s activity opening time or skill cooling.This paper implements a general countdown component, realizes the basic function of countdown, and supports callback after countdown. Design ideas 1. The implementation of countdown is through coprocessing. Waitforseconds (delay) can execute the method once every […]

  • Difficulties and solutions in WinForm development

    Time:2020-9-19

    When we develop various applications, we will encounter many different problems. These problems involve architecture, module combination, interface processing, common part abstraction and so on. Taking WinForm development as an example, we introduce the following aspects: system modularization, interface component selection, business module scenario division, interface base class and auxiliary class processing, code generation tool […]

  • AES byte array encryption and decryption process

    Time:2020-9-19

    The most commonly used example of Microsoft’s official website is MSDN https://docs.microsoft.com/zh-cn/dotnet/api/system.security.cryptography.aes?view=netframework-4.8However, this example is not easy to use, with too many restrictions and poor generality. In actual use, I encounter more situations like this:1. Input a byte array and output the encrypted byte array directly after AES encryption.2. Input an encrypted byte array, after […]