merge UI and C#