public EditItemForm(MainForm mainForm, string siteName, string siteURL, string searchWord) { InitializeComponent(); this.mainForm = mainForm; siteNameTextBox.Text = siteName; siteURLTextBox.Text = siteURL; siteURLTextBox.Enabled = false; searchWordTextBox.Text = searchWord; searchWordTextBox.Enabled = false; }
public AddItemForm(MainForm form1) { InitializeComponent(); this.mainForm = form1; try { mainForm.AddItemForm(this.siteNameComboBox, this.siteURLComboBox); } catch (Exception) { } }
static void Main(string[] args) { if (System.Diagnostics.Process.GetProcessesByName( System.Diagnostics.Process.GetCurrentProcess().ProcessName).Length > 1) { MessageBox.Show("Already running."); return; } if (args.Length > 0) { System.Threading.Thread.CurrentThread.CurrentUICulture = new CultureInfo(args[0], false); } Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Form f1 = new MainForm(); Application.Run(f1); }