Category:C#

  • Combination of quartz and topshelf to realize window timing service

    Time:2022-5-5

    1、 New console application 2、 Select the item, right-click manage nuget package, and add four: Quartz Quartz.Plugins Topshelf log4net  3、 Create project file Three configuration files: must be placed in the project root directory. (1)log4net.config View Code (2)quartz.config  true SampleJob SampleGroup Sample job for Quartz Server QuartzTopshelf.Jobs.SampleJob, QuartzTopshelf true false key1 value1 key2 value2 SampleSimpleTrigger […]

  • Solution to the dllnotfoundexception error reported by unity3d

    Time:2022-5-5

    cause The unity program is built on the PC and then taken to other people’s machines. As a result, some functions are abnormal. Look at the log Fallback handler could not load library: xxx.dll DllNotFoundException: xxx.dll At first glance, I thought it was a missing DLL, but in fact it was not. First of all, […]

  • Dynamic splicing expression

    Time:2022-5-4

    Will we encounter the following query requirements in the project? For example, you need to find members that meet the following conditions:  Condition group 1: male members aged 30-40 Condition group 2: female members aged 20-30 Condition group 3: members aged 60-80 with Unknown Gender There are and relationships within condition groups, but there are […]

  • Unity3d uses fairygui to customize font operation

    Time:2022-5-4

    Recently, UI students used a new font (sharp characters, sharp lines, black Jane in full bloom) and found that all the fonts were cut into pictures, which scared me to death Process of using fonts with unity3d and fairygui 1. The first step must be to find art students to get the fonts they find […]

  • 2022-03-09 switching between two scenes of unity 3D

    Time:2022-5-3

    Article catalogue effect Implementation steps 1. Create a scene 2. Add button 3. Write c# script to realize switching 4. Add component to button 5. Add two scenes to build Test effect reference material effect Click the button in Scene1 to enter scene2. Implementation steps 1. Create a scene Right click in assets to create […]

  • C#tcp communication

    Time:2022-5-3

    C # based on socket client and server communication Server Server interface Server code public partial class FormMain : Form { private List<Socket> ClientSockets; private BindingList<string> ClientIPPorts; private Socket socketWatch; private Socket socketSend;// send out private bool IsStart; private Action<string> ShowMsgAction; private Action UpdateListViewDataAction; public FormMain() { InitializeComponent(); ShowMsgAction += new Action<string>(ShowMsg); UpdateListViewDataAction += new […]

  • Example: use C # Net to teach you how to develop wechat official account (1) — access

    Time:2022-5-3

    Today I’m going to write a series to help Net Xiaobai has realized the development of its own wechat official account step by step. First of all, I would like to thank an iron friend who has provided me with a private learning and experimental environment for free over the years (although the company has […]

  • C # based socket chat room (with source code)

    Time:2022-5-3

    Chat room based on c#-socket preface Source code: https://gitee.com/TL0902/term/blob/master/C%23%E8%81%8A%E5%A4%A9%E5%AE%A4/Tchat.rar You can download it directly. The development tool is vs2019; I’ve seen that everyone likes dry goods, and there are ready-made codes. I don’t know you can’t live through Saturday and Sunday! Recently, I wrote a small program to build a chat room through socket. The […]

  • Get and set methods in C #

    Time:2022-5-3

    1. First, define the properties of your own class. The type is Privata and the variable name starts with an underscore public class student { private int _id; private string _name; } 2. Then select the above code block, first Ctrl + R, then Ctrl + e, and the following interface will appear. Click apply […]

  • Three methods of c# loading word

    Time:2022-5-3

    This experience content share three different methods of loading word documents through c# program. namely: 1. Load local word document 2. Load word document in read-only mode 3. Load word from stream [program environment] Windows 10 Visual Studio 2017 Word class library – spire Doc for . NET Word version-2013 (. Docx) [reference assembly] Before […]

  • How unity3d changes the background color of a button

    Time:2022-5-3

    I won’t talk more nonsense. Let’s look at the code directly~ using UnityEngine; using System.Collections; public class ButtonStyle : MonoBehaviour { public Color _ color;// Select the background color in the editing environment. The transparency cannot be 0 public Texture2D tex; Void ongui() {GUI. Button (New Rect (0,0100100), “tex”); color oldcolor = GUI. BackgroundColor; // […]

  • Two methods of c# obtaining file name and file path

    Time:2022-5-3

    Two methods of c# obtaining file name and file path Method 1 Method 2 Method 1 OpenFileDialog open = new OpenFileDialog(); open.RestoreDirectory = true; string fullname = open.FileName; string path = System. IO. Path. GetDirectoryName(fullname);// route string name = System. IO. Path. GetFileName(fullname);// name Method 2 OpenFileDialog open = new OpenFileDialog(); open.RestoreDirectory = true; string […]