Baran Topal

Categories


Technology

Merging 2 video files – .NET way

Hi again! There are couple of video recording solutions for Windows and most of them are time limited. The following solution uses ffmpeg to merge different type of video files. It is using the 64-bit of ffmpeg. Use at your own risk 😛 Btw, it will merge more than one file into a file named as OUTPUT on your desktop. If the file exists, [...]

baranbaran

FileWatcher vs. well, manual handling

Well, one can easily check the state of a file (whether it is used or not) via FileWatcher in C#.NET. Following is more handy if you want to handle it manually and need to log it. // create an event public delegate void FileUpdatedEventHandler (object sender, EventArgs e); public event FileUpdateEventHandler Updated; private _lastWrite = [...]

baranbaran

searching for a string in an MSSQL db

Nowadays, I am using some other 3rd party solution for the need to find a string in an MSSQL but well, this one might be handy and I can verify it works just fine. Lose the tags and type your db and search str instead of mydbname and I want to find USE mydbname declare @SearchStr nvarchar(100) Set @SearchStr = 'I want to find%' -- [...]

baranbaran

another form before main form in C#

I remember that I needed yet another form before the main form. The elegant way to do that is as follows: static class Program { /// /// The main entry point for the application. /// [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form1 f1 = new Form1(); f1.Opacity [...]

baranbaran

fancy closing of a C#

Long ago, I wanted to have a fading effect in my windows form application. Here you go: public partial class Form1 : Form { bool fading = false; bool fadingComplete = false; System.Windows.Forms.Timer myTimer = null; public Form1() { InitializeComponent(); } protected override void OnClosing(CancelEventArgs e) { if (fading && [...]

baranbaran

version of VS in csproj file

Long ago, I need to determine the Visual Studio version of a csproj file: csproj is an xml file and the content is something similar as follows: Debug AnyCPU 9.0.21022 If you don’t have got .sln file, examining the csproj is a way to determine where the project is structured. Product Name Product Version File Format Visual Studio [...]

baranbaran

C# and SNK (Capcom vs. SNK)

Long ago, I had a C# solution with some projects in it and every project had its own snk file. I was curious: 1) What is the use of snk files? 2) How to create a snk file for my project newly added to my solution? Assemblies can be assigned a cryptographic signature, called a strong name, which provides name uniqueness for the assembly [...]

baranbaran