Inheritance: System.Windows.Forms.Form
Ejemplo n.º 1
0
        private bool Command_SetGameFolder_Dialog(string warning)
        {
            var wasHomeDisabled = false;

            try {
                using (var input = new guiInputGameFolder(warning)) {
                    if (_home?.Visible == true)
                    {
                        _home.Enabled   = false;
                        wasHomeDisabled = true;
                    }
                    var result = input.ShowDialog();
                    if (result == DialogResult.OK)
                    {
                        BaseFolder = input.Folder.Value;
                        return(true);
                    }
                    return(false);
                }
            }
            finally {
                if (wasHomeDisabled)
                {
                    _home.Enabled = true;
                }
            }
        }
Ejemplo n.º 2
0
		private bool Command_SetGameFolder_Dialog(string warning) {
			var wasHomeDisabled = false;
			try {
				using (var input = new guiInputGameFolder(warning)) {
					if (_home?.Visible == true) {
						_home.Enabled = false;
						wasHomeDisabled = true;
					}
					var result = input.ShowDialog();
					if (result == DialogResult.OK) {
						BaseFolder = input.Folder.Value;
						return true;
					}
					return false;
				}
			}
			finally {
				if (wasHomeDisabled) {
					_home.Enabled = true;
				}
			}
		}