Esempio n. 1
0
        private void Form1_Shown(object sender, EventArgs e)
        {
            uniwinc = new UniWinC();

            UniWinC.RegisterWindowStyleChangedCallback(type => {
                Console.WriteLine($"Style changed: {type}");
            });

            // ファイルドロップ時、その内容を出力
            UniWinC.RegisterDropFilesCallback(msg => {
                droppedFiles = msg;
                filesDropped = true;
            });

            // 解像度変更時、モニター一覧を更新
            UniWinC.RegisterMonitorChangedCallback(count => {
                monitorChanged = true;
            });
            UpdateMonitorCombobox();    // 初回の一覧取得

            //  モニタ一覧を表示
            PrintMonitorInfo();

            // 定期的にフラグを監視して処理
            timerMainLoop.Start();
        }