Example #1
0
        private void SearchButton_Click(object sender, EventArgs e)
        {
            Form mdiParent = this.MdiParent;

            this.Close();

            ChooseType.ShowAllArticles(CurrentMode, mdiParent);
        }
Example #2
0
        static void Main(string[] args)
        {
            /*string MUTEX_GUID = "artykuly_coliber";
             *
             * Settings.oneMutex = null;
             *
             * try
             * {
             *  Settings.oneMutex = Mutex.OpenExisting(MUTEX_GUID);
             * }
             * catch (WaitHandleCannotBeOpenedException)
             * {
             *  // Mutex nie istnieje, obsługa wyjątku
             * }
             *
             * if (Settings.oneMutex == null)
             * {
             *  Settings.oneMutex = new Mutex(true, MUTEX_GUID);
             * }
             * else
             * {
             *  Process currentProcess = Process.GetCurrentProcess();
             *
             *  String processName = currentProcess.ProcessName;
             *  Int32 currentProcessId = currentProcess.Id;
             *
             *  Process[] processes = Process.GetProcessesByName(processName);
             *
             *  foreach (Process p in processes)
             *  {
             *      // Bring the existing instance to the front
             *
             *      if (p.Id != currentProcessId)
             *      {
             *          IntPtr windowHandle = p.MainWindowHandle;
             *          SetForegroundWindow(windowHandle.ToInt32());
             *      }
             * }
             *
             *  Settings.oneMutex.Close();
             *  return;
             * }
             *
             * ProcessMonitor.Init("coliber");*/

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            ChooseType CT = new ChooseType(1, 3, new Form());

            /* if (args.Length == 2)
             * {
             *   ChooseType CT = new ChooseType(Int32.Parse(args[0]), Int32.Parse(args[1]));
             * }
             * else if (args.Length == 3)
             * {
             *   ChooseType CT = new ChooseType(Int32.Parse(args[0]), Int32.Parse(args[1]), args[2]);
             * }*/
        }